OSDN Git Service

Remove leftover profiles entry from power menu
authorMichael Bestas <mikeioannina@cyanogenmod.org>
Thu, 4 Feb 2016 22:47:05 +0000 (00:47 +0200)
committerGerrit Code Review <gerrit@cyanogenmod.org>
Mon, 8 Feb 2016 13:56:19 +0000 (05:56 -0800)
* No longer available

Change-Id: Ifac7e1181dc53af5788f54444ef75a345a888fa2

res/values/cm_arrays.xml
res/values/cm_strings.xml
src/com/android/settings/cyanogenmod/PowerMenuActions.java

index e219da5..c2f4128 100644 (file)
         <item>power</item>
         <item>reboot</item>
         <item>screenshot</item>
-        <item>profile</item>
         <item>airplane</item>
         <item>users</item>
         <item>bugreport</item>
index 93d387c..a938e14 100644 (file)
     <string name="power_menu_title">Power menu</string>
     <string name="power_menu_reboot_title">Reboot menu</string>
     <string name="power_menu_screenshot_title">Screenshot</string>
-    <string name="power_menu_profiles_title">Profile switcher</string>
     <string name="power_menu_airplane_title">Airplane mode</string>
     <string name="power_menu_users_title">User switcher</string>
     <string name="power_menu_settings_title">Settings shortcut</string>
     <string name="power_menu_bug_report_title">Bug report</string>
     <string name="power_menu_sound_title">Sound panel</string>
     <string name="power_menu_bug_report_disabled">Bug reporting is disabled in development settings</string>
-    <string name="power_menu_profiles_disabled">System profiles are disabled</string>
 
     <!-- Buttons - Enable navbar -->
     <string name="disable_navkeys_title">Enable on-screen nav bar</string>
index 932d4e5..6a02a97 100644 (file)
@@ -35,7 +35,9 @@ import com.android.internal.logging.MetricsLogger;
 import com.android.settings.R;
 import com.android.settings.SettingsPreferenceFragment;
 import com.android.internal.util.cm.PowerMenuConstants;
+
 import cyanogenmod.providers.CMSettings;
+
 import org.cyanogenmod.internal.logging.CMMetricsLogger;
 
 import static com.android.internal.util.cm.PowerMenuConstants.*;
@@ -49,7 +51,6 @@ public class PowerMenuActions extends SettingsPreferenceFragment {
 
     private CheckBoxPreference mRebootPref;
     private CheckBoxPreference mScreenshotPref;
-    private CheckBoxPreference mProfilePref;
     private CheckBoxPreference mAirplanePref;
     private CheckBoxPreference mUsersPref;
     private CheckBoxPreference mSettingsPref;
@@ -252,17 +253,6 @@ public class PowerMenuActions extends SettingsPreferenceFragment {
     private void updatePreferences() {
         boolean bugreport = Settings.Secure.getInt(getContentResolver(),
                 Settings.Secure.BUGREPORT_IN_POWER_MENU, 0) != 0;
-        boolean profiles = CMSettings.System.getInt(getContentResolver(),
-                CMSettings.System.SYSTEM_PROFILES_ENABLED, 1) != 0;
-
-        if (mProfilePref != null) {
-            mProfilePref.setEnabled(profiles);
-            if (profiles) {
-                mProfilePref.setSummary(null);
-            } else {
-                mProfilePref.setSummary(R.string.power_menu_profiles_disabled);
-            }
-        }
 
         if (mBugReportPref != null) {
             mBugReportPref.setEnabled(bugreport);