diff options
author | Danesh M <danesh@cyngn.com> | 2016-05-11 19:27:30 -0700 |
---|---|---|
committer | Gerrit Code Review <gerrit@cyanogenmod.org> | 2016-05-13 13:35:51 -0700 |
commit | c15b40696b535c39615a34017f648f601573b0e0 (patch) | |
tree | f9d6cb1bdd84ec8d55a2cb9a70734e61e610b458 /src/com/android | |
parent | d135b55b76afebd8f4f1b595f91a7a3193266520 (diff) | |
download | packages_apps_Settings-c15b40696b535c39615a34017f648f601573b0e0.zip packages_apps_Settings-c15b40696b535c39615a34017f648f601573b0e0.tar.gz packages_apps_Settings-c15b40696b535c39615a34017f648f601573b0e0.tar.bz2 |
Settings : Filter livelockscreen, button for secondary users
Secondary users should not be able to configure either of those.
OPO-696
Change-Id: I43409c090fb12df576c29297fb506c70e6583bce
Diffstat (limited to 'src/com/android')
-rw-r--r-- | src/com/android/settings/ButtonSettings.java | 16 | ||||
-rw-r--r-- | src/com/android/settings/SecuritySettings.java | 2 | ||||
-rw-r--r-- | src/com/android/settings/SettingsActivity.java | 1 |
3 files changed, 9 insertions, 10 deletions
diff --git a/src/com/android/settings/ButtonSettings.java b/src/com/android/settings/ButtonSettings.java index 09c9b7d..109d7dc 100644 --- a/src/com/android/settings/ButtonSettings.java +++ b/src/com/android/settings/ButtonSettings.java @@ -407,8 +407,8 @@ public class ButtonSettings extends SettingsPreferenceFragment implements try { // Only show the navigation bar category on devices that have a navigation bar // unless we are forcing it via development settings - boolean forceNavbar = CMSettings.Secure.getInt(getContentResolver(), - CMSettings.Secure.DEV_FORCE_SHOW_NAVBAR, 0) == 1; + boolean forceNavbar = CMSettings.Global.getInt(getContentResolver(), + CMSettings.Global.DEV_FORCE_SHOW_NAVBAR, 0) == 1; boolean hasNavBar = WindowManagerGlobal.getWindowManagerService().hasNavigationBar() || forceNavbar; @@ -628,13 +628,13 @@ public class ButtonSettings extends SettingsPreferenceFragment implements } private static void writeDisableNavkeysOption(Context context, boolean enabled) { - CMSettings.Secure.putInt(context.getContentResolver(), - CMSettings.Secure.DEV_FORCE_SHOW_NAVBAR, enabled ? 1 : 0); + CMSettings.Global.putInt(context.getContentResolver(), + CMSettings.Global.DEV_FORCE_SHOW_NAVBAR, enabled ? 1 : 0); } private void updateDisableNavkeysOption() { - boolean enabled = CMSettings.Secure.getInt(getActivity().getContentResolver(), - CMSettings.Secure.DEV_FORCE_SHOW_NAVBAR, 0) != 0; + boolean enabled = CMSettings.Global.getInt(getActivity().getContentResolver(), + CMSettings.Global.DEV_FORCE_SHOW_NAVBAR, 0) != 0; mDisableNavigationKeys.setChecked(enabled); } @@ -687,8 +687,8 @@ public class ButtonSettings extends SettingsPreferenceFragment implements return; } - writeDisableNavkeysOption(context, CMSettings.Secure.getInt(context.getContentResolver(), - CMSettings.Secure.DEV_FORCE_SHOW_NAVBAR, 0) != 0); + writeDisableNavkeysOption(context, CMSettings.Global.getInt(context.getContentResolver(), + CMSettings.Global.DEV_FORCE_SHOW_NAVBAR, 0) != 0); } diff --git a/src/com/android/settings/SecuritySettings.java b/src/com/android/settings/SecuritySettings.java index cc46ba7..6337800 100644 --- a/src/com/android/settings/SecuritySettings.java +++ b/src/com/android/settings/SecuritySettings.java @@ -348,7 +348,7 @@ public class SecuritySettings extends SettingsPreferenceFragment // Add live lock screen preference if supported PreferenceGroup generalCategory = (PreferenceGroup) root.findPreference(KEY_GENERAL_CATEGORY); - if (pm.hasSystemFeature(LIVE_LOCK_SCREEN_FEATURE) && generalCategory != null) { + if (pm.hasSystemFeature(LIVE_LOCK_SCREEN_FEATURE) && generalCategory != null && Utils.isUserOwner()) { boolean moveToTop = getResources().getBoolean( R.bool.config_showLiveLockScreenSettingsFirst); diff --git a/src/com/android/settings/SettingsActivity.java b/src/com/android/settings/SettingsActivity.java index d1aefad..a68005a 100644 --- a/src/com/android/settings/SettingsActivity.java +++ b/src/com/android/settings/SettingsActivity.java @@ -298,7 +298,6 @@ public class SettingsActivity extends Activity R.id.home_settings, R.id.dashboard, R.id.privacy_settings_cyanogenmod, - R.id.button_settings }; private static final String[] ENTRY_FRAGMENTS = { |