OSDN Git Service

Reduce jank in User Settings
authorAmith Yamasani <yamasani@google.com>
Wed, 29 May 2013 16:39:07 +0000 (09:39 -0700)
committerAmith Yamasani <yamasani@google.com>
Wed, 29 May 2013 16:39:07 +0000 (09:39 -0700)
Don't recreate the list on resume.
Cache the default circled icon.

Bug: 8802380
Change-Id: I46520b591fc3ffd5e51a1c7dda86e811c03a76a2

src/com/android/settings/users/UserSettings.java

index 193e8c9..5145e10 100644 (file)
@@ -201,15 +201,10 @@ public class UserSettings extends SettingsPreferenceFragment
         loadProfile();
         setHasOptionsMenu(true);
         IntentFilter filter = new IntentFilter(Intent.ACTION_USER_REMOVED);
+        filter.addAction(Intent.ACTION_USER_ADDED);
         filter.addAction(Intent.ACTION_USER_INFO_CHANGED);
         getActivity().registerReceiverAsUser(mUserChangeReceiver, UserHandle.ALL, filter, null,
                 mHandler);
-    }
-
-    @Override
-    public void onResume() {
-        super.onResume();
-        loadProfile();
         updateUserList();
     }