Skip to content

Commit

Permalink
ROMControl: Remove leftover profiles entry from power menu
Browse files Browse the repository at this point in the history
* No longer available

Change-Id: Ifac7e1181dc53af5788f54444ef75a345a888fa2
  • Loading branch information
mikeNG authored and Meninblack007 committed Feb 10, 2016
1 parent 953feae commit ba3bccb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 16 deletions.
1 change: 0 additions & 1 deletion res/values/arrays.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@
<item>reboot</item>
<item>screenshot</item>
<item>screenrecord</item>
<item>profile</item>
<item>airplane</item>
<item>users</item>
<item>settings</item>
Expand Down
2 changes: 0 additions & 2 deletions res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -470,15 +470,13 @@
<string name="power_menu_reboot_title">Reboot menu</string>
<string name="power_menu_screenshot_title">Screenshot</string>
<string name="power_menu_screenrecord_title">Screenrecord</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_lockdown_title">Device lockdown</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>

<!-- Superuser indicator on status bar -->
<string name="su_indicator">Superuser indicator</string>
Expand Down
16 changes: 3 additions & 13 deletions src/com/aokp/romcontrol/fragments/PowerMenuSettingsFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@
import android.provider.Settings;

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.*;
Expand Down Expand Up @@ -69,7 +71,6 @@ public SettingsPreferenceFragment() {
private SwitchPreference mRebootPref;
private SwitchPreference mScreenshotPref;
private SwitchPreference mScreenrecordPref;
private SwitchPreference mProfilePref;
private SwitchPreference mAirplanePref;
private SwitchPreference mUsersPref;
private SwitchPreference mSettingsPref;
Expand Down Expand Up @@ -287,17 +288,6 @@ private void updateUserConfig(boolean enabled, String action) {
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);
Expand Down Expand Up @@ -363,4 +353,4 @@ protected int getMetricsCategory() {
return CMMetricsLogger.POWER_MENU_ACTIONS;
}
}
}
}

0 comments on commit ba3bccb

Please sign in to comment.