Remove 'SIM Card Lock' from Security & Location settings for CDMA phones.
This commit is contained in:
committed by
Wink Saville
parent
caf7d199e8
commit
5ee0635923
@@ -489,6 +489,8 @@
|
||||
<string name="security_settings_title">Security & location</string>
|
||||
<!-- Main Settings screen setting option summary text for the item tot ake you to the security and location screen -->
|
||||
<string name="security_settings_summary">Set My Location, screen unlock, SIM card lock, credential storage lock</string>
|
||||
<!-- Main Settings screen setting option summary text for the item to take you to the CDMA security and location screen -->
|
||||
<string name="cdma_security_settings_summary">Set My Location, screen unlock, credential storage lock</string>
|
||||
<!-- In the security screen, the header title for settings related to Passwords-->
|
||||
<string name="security_passwords_title">Passwords</string>
|
||||
|
||||
|
@@ -70,7 +70,8 @@
|
||||
<com.android.settings.IconPreferenceScreen
|
||||
settings:icon="@drawable/ic_settings_security"
|
||||
android:title="@string/security_settings_title"
|
||||
android:summary="@string/security_settings_summary">
|
||||
android:summary="@string/security_settings_summary"
|
||||
android:key="security_settings">
|
||||
<intent
|
||||
android:action="android.intent.action.MAIN"
|
||||
android:targetPackage="com.android.settings"
|
||||
|
@@ -20,6 +20,7 @@ import android.os.Bundle;
|
||||
import android.preference.PreferenceActivity;
|
||||
import android.preference.PreferenceGroup;
|
||||
import android.provider.Settings.System;
|
||||
import android.telephony.TelephonyManager;
|
||||
|
||||
public class Settings extends PreferenceActivity {
|
||||
|
||||
@@ -34,6 +35,17 @@ public class Settings extends PreferenceActivity {
|
||||
|
||||
addPreferencesFromResource(R.xml.settings);
|
||||
|
||||
int activePhoneType = TelephonyManager.getDefault().getPhoneType();
|
||||
|
||||
// do not display SIM lock for CDMA phone
|
||||
if (TelephonyManager.PHONE_TYPE_CDMA == activePhoneType) {
|
||||
findPreference("security_settings").setSummary(
|
||||
R.string.cdma_security_settings_summary);
|
||||
} else {
|
||||
findPreference("security_settings").setSummary(
|
||||
R.string.security_settings_summary);
|
||||
}
|
||||
|
||||
PreferenceGroup parent = (PreferenceGroup) findPreference(KEY_PARENT);
|
||||
Utils.updatePreferenceToSpecificActivityOrRemove(this, parent, KEY_SYNC_SETTINGS, 0);
|
||||
Utils.updatePreferenceToSpecificActivityOrRemove(this, parent, KEY_SEARCH_SETTINGS, 0);
|
||||
|
Reference in New Issue
Block a user