Fix repeating apps on pause/resume

Preference list was getting duplicated on pausing and resuming the activity.

Pull the user info out of the preference list and make it a static header
so that it stays fixed. Can now remove all entries before re-adding.

Disable location by default and disable ability to change Unknown sources
 toggle.

Bug: 8685561
Bug: 8688400

Change-Id: I64ce728d5369e03ddaba562bcd66bb0720a037d2
This commit is contained in:
Amith Yamasani
2013-04-22 13:37:58 -07:00
parent bf3391f19b
commit 1bad7141b4
5 changed files with 130 additions and 32 deletions

View File

@@ -257,10 +257,8 @@ public class SecuritySettings extends SettingsPreferenceFragment
KEY_TOGGLE_INSTALL_APPLICATIONS);
mToggleAppInstallation.setChecked(isNonMarketAppsAllowed());
boolean isSideloadingAllowed =
!um.hasUserRestriction(UserManager.DISALLOW_INSTALL_UNKNOWN_SOURCES);
// Side loading of apps.
mToggleAppInstallation.setEnabled(isSideloadingAllowed);
mToggleAppInstallation.setEnabled(mIsPrimary);
// Package verification, only visible to primary user and if enabled
mToggleVerifyApps = (CheckBoxPreference) findPreference(KEY_TOGGLE_VERIFY_APPLICATIONS);