summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/java/android/provider/Settings.java7
-rw-r--r--policy/src/com/android/internal/policy/impl/GlobalActions.java3
2 files changed, 9 insertions, 1 deletions
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index 91f7a50..ddcdf55 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -2873,6 +2873,12 @@ public final class Settings {
public static final String POWER_MENU_AIRPLANE_ENABLED = "power_menu_airplane_enabled";
/**
+ * Whether power menu user switcher is enabled
+ * @hide
+ */
+ public static final String POWER_MENU_USER_ENABLED = "power_menu_user_enabled";
+
+ /**
* Whether power menu silent mode is enabled
* @hide
*/
@@ -2961,6 +2967,7 @@ public final class Settings {
POWER_MENU_PROFILES_ENABLED,
POWER_MENU_AIRPLANE_ENABLED,
POWER_MENU_SILENT_ENABLED,
+ POWER_MENU_USER_ENABLED,
};
// Settings moved to Settings.Secure
diff --git a/policy/src/com/android/internal/policy/impl/GlobalActions.java b/policy/src/com/android/internal/policy/impl/GlobalActions.java
index af55b9b..77bcf65 100644
--- a/policy/src/com/android/internal/policy/impl/GlobalActions.java
+++ b/policy/src/com/android/internal/policy/impl/GlobalActions.java
@@ -436,7 +436,8 @@ class GlobalActions implements DialogInterface.OnDismissListener, DialogInterfac
}
// next: optionally add a list of users to switch to
- if (SystemProperties.getBoolean("fw.power_user_switcher", false)) {
+ if (Settings.System.getInt(mContext.getContentResolver(),
+ Settings.System.POWER_MENU_USER_ENABLED, 0) == 1) {
addUsersToMenu(mItems);
}