diff options
author | Amith Yamasani <yamasani@google.com> | 2013-04-22 13:37:58 -0700 |
---|---|---|
committer | Amith Yamasani <yamasani@google.com> | 2013-04-22 17:03:30 -0700 |
commit | 1bad7141b4c602399beaddde49ac295ae1a89afc (patch) | |
tree | 4a237224e63795143ff4839cb112bd5af76639e7 /src/com/android/settings/users/UserSettings.java | |
parent | bf3391f19b6f1733825de07d9c602545f8818c64 (diff) | |
download | packages_apps_Settings-1bad7141b4c602399beaddde49ac295ae1a89afc.zip packages_apps_Settings-1bad7141b4c602399beaddde49ac295ae1a89afc.tar.gz packages_apps_Settings-1bad7141b4c602399beaddde49ac295ae1a89afc.tar.bz2 |
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
Diffstat (limited to 'src/com/android/settings/users/UserSettings.java')
-rw-r--r-- | src/com/android/settings/users/UserSettings.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/com/android/settings/users/UserSettings.java b/src/com/android/settings/users/UserSettings.java index 676951e..605daa5 100644 --- a/src/com/android/settings/users/UserSettings.java +++ b/src/com/android/settings/users/UserSettings.java @@ -45,6 +45,7 @@ import android.preference.Preference.OnPreferenceClickListener; import android.preference.PreferenceGroup; import android.provider.ContactsContract; import android.provider.ContactsContract.Contacts; +import android.provider.Settings.Secure; import android.util.Log; import android.util.SparseArray; import android.view.Menu; @@ -305,7 +306,9 @@ public class UserSettings extends SettingsPreferenceFragment int userId = newUserInfo.id; UserHandle user = new UserHandle(userId); mUserManager.setUserRestriction(UserManager.DISALLOW_MODIFY_ACCOUNTS, true, user); - + mUserManager.setUserRestriction(UserManager.DISALLOW_SHARE_LOCATION, true, user); + Secure.putStringForUser(getContentResolver(), + Secure.LOCATION_PROVIDERS_ALLOWED, "", userId); Bitmap bitmap = BitmapFactory.decodeResource(getResources(), UserSettings.USER_DRAWABLES[ userId % UserSettings.USER_DRAWABLES.length]); |