Skip to content

Commit

Permalink
Remove QuickBoot preference if package isn't available
Browse files Browse the repository at this point in the history
Change-Id: I6f00b6be8d87c1013d2c695d93e66d276017b0a1

Conflicts:
	src/com/android/settings/DevelopmentSettings.java
  • Loading branch information
dhacker29 authored and Alberto97 committed Dec 24, 2014
1 parent 3ec6f3f commit 534c337
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/com/android/settings/DevelopmentSettings.java
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ public class DevelopmentSettings extends SettingsPreferenceFragment
private static final String HDCP_CHECKING_KEY = "hdcp_checking";
private static final String HDCP_CHECKING_PROPERTY = "persist.sys.hdcp_checking";
private static final String ENABLE_QUICKBOOT= "enable_quickboot";
private static final String QUICKBOOT_PACKAGE_NAME = "com.qapp.quickboot";
private static final String LOCAL_BACKUP_PASSWORD = "local_backup_password";
private static final String HARDWARE_UI_PROPERTY = "persist.sys.ui.hw";
private static final String MSAA_PROPERTY = "debug.egl.force_msaa";
Expand Down Expand Up @@ -297,7 +298,7 @@ public void onCreate(Bundle icicle) {
removePreference(mEnableOemUnlock);
mEnableOemUnlock = null;
}
mQuickBoot= findAndInitCheckboxPref(ENABLE_QUICKBOOT);
mQuickBoot = findAndInitCheckboxPref(ENABLE_QUICKBOOT);
mAllowMockLocation = findAndInitCheckboxPref(ALLOW_MOCK_LOCATION);
mDebugViewAttributes = findAndInitCheckboxPref(DEBUG_VIEW_ATTRIBUTES);
mPassword = (PreferenceScreen) findPreference(LOCAL_BACKUP_PASSWORD);
Expand All @@ -308,7 +309,11 @@ public void onCreate(Bundle icicle) {
disableForUser(mEnableAdb);
disableForUser(mClearAdbKeys);
disableForUser(mEnableTerminal);
disableForUser(mPassword);
disableForUser(mQuickBoot);
}

if (!isPackageInstalled(getActivity(), QUICKBOOT_PACKAGE_NAME)) {
removePreference(mQuickBoot);
}

mDebugAppPref = findPreference(DEBUG_APP_KEY);
Expand Down

0 comments on commit 534c337

Please sign in to comment.