Loading src/com/android/settings/DevelopmentSettings.java +13 −0 Original line number Diff line number Diff line Loading @@ -46,6 +46,7 @@ import android.os.ServiceManager; import android.os.StrictMode; import android.os.SystemProperties; import android.os.Trace; import android.os.UserHandle; import android.preference.CheckBoxPreference; import android.preference.ListPreference; import android.preference.MultiCheckPreference; Loading Loading @@ -213,6 +214,11 @@ public class DevelopmentSettings extends PreferenceFragment mPassword = (PreferenceScreen) findPreference(LOCAL_BACKUP_PASSWORD); mAllPrefs.add(mPassword); if (!android.os.Process.myUserHandle().equals(UserHandle.OWNER)) { disableForUser(mEnableAdb); disableForUser(mPassword); } mDebugAppPref = findPreference(DEBUG_APP_KEY); mAllPrefs.add(mDebugAppPref); mWaitForDebugger = findAndInitCheckboxPref(WAIT_FOR_DEBUGGER_KEY); Loading Loading @@ -284,6 +290,13 @@ public class DevelopmentSettings extends PreferenceFragment removeHdcpOptionsForProduction(); } private void disableForUser(Preference pref) { if (pref != null) { pref.setEnabled(false); mDisabledPrefs.add(pref); } } private CheckBoxPreference findAndInitCheckboxPref(String key) { CheckBoxPreference pref = (CheckBoxPreference) findPreference(key); if (pref == null) { Loading Loading
src/com/android/settings/DevelopmentSettings.java +13 −0 Original line number Diff line number Diff line Loading @@ -46,6 +46,7 @@ import android.os.ServiceManager; import android.os.StrictMode; import android.os.SystemProperties; import android.os.Trace; import android.os.UserHandle; import android.preference.CheckBoxPreference; import android.preference.ListPreference; import android.preference.MultiCheckPreference; Loading Loading @@ -213,6 +214,11 @@ public class DevelopmentSettings extends PreferenceFragment mPassword = (PreferenceScreen) findPreference(LOCAL_BACKUP_PASSWORD); mAllPrefs.add(mPassword); if (!android.os.Process.myUserHandle().equals(UserHandle.OWNER)) { disableForUser(mEnableAdb); disableForUser(mPassword); } mDebugAppPref = findPreference(DEBUG_APP_KEY); mAllPrefs.add(mDebugAppPref); mWaitForDebugger = findAndInitCheckboxPref(WAIT_FOR_DEBUGGER_KEY); Loading Loading @@ -284,6 +290,13 @@ public class DevelopmentSettings extends PreferenceFragment removeHdcpOptionsForProduction(); } private void disableForUser(Preference pref) { if (pref != null) { pref.setEnabled(false); mDisabledPrefs.add(pref); } } private CheckBoxPreference findAndInitCheckboxPref(String key) { CheckBoxPreference pref = (CheckBoxPreference) findPreference(key); if (pref == null) { Loading