Avoid SElinux denial accessing SIM card lock
This change avoids the following SELinux denial:
W/SharedPreferenc(28238): type=1400 audit(0.0:8): avc: denied\
{ search } for name="com.android.settings" dev="mmcblk0p25"\
ino=8209 scontext=u:r:radio:s0 tcontext=u:object_r:system_app\
_data_file:s0 tclass=dir op_res=-13 ppid=318 pcomm="main"\
tgid=1850 tgcomm="m.android.phone"
When accessing Settings->Security->Set up SIM card lock.
There is really no need to store this information in
SharedPreferences anyway.
(cherrypicked from commit bef7221a7dc1a5827903e62bf3b02a42e52f5066)
Change-Id: I3ba30d5d5e2c5b3c379397fbb06325101acaf490
diff --git a/res/xml/sim_lock_settings.xml b/res/xml/sim_lock_settings.xml
index 0246ea2..ee25fdf 100644
--- a/res/xml/sim_lock_settings.xml
+++ b/res/xml/sim_lock_settings.xml
@@ -21,6 +21,7 @@
<SwitchPreference
android:key="sim_toggle"
android:title="@string/sim_pin_toggle"
+ android:persistent="false"
android:summaryOn="@string/sim_lock_on"
android:summaryOff="@string/sim_lock_off"/>
@@ -30,6 +31,7 @@
android:title="@string/sim_pin_change"
android:dialogTitle="@string/sim_change_pin"
android:dialogMessage="@string/sim_enter_old"
+ android:persistent="false"
android:positiveButtonText="@string/sim_enter_ok"
android:negativeButtonText="@string/sim_enter_cancel"/>