Fix density change bugs in SystemUI
- Reinflate KeyguardUserSwitcher on density changes.
- Update size of UserAvatar on Keyguard.
- Fix brightness slider width in quick settings.
- Refetch and rescale user icons on density changes.
Change-Id: I961c59b8b224d6ac22cbbb8e115b8a12547a04b9
Fixes: 28535987
Fixes: 28454340
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/UserSwitcherController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/UserSwitcherController.java
index 6800772..415b7a1 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/UserSwitcherController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/UserSwitcherController.java
@@ -23,7 +23,6 @@
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.BroadcastReceiver;
-import android.content.ComponentName;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
@@ -169,12 +168,13 @@
return;
}
+ boolean forceAllUsers = mForcePictureLoadForUserId.get(UserHandle.USER_ALL);
SparseArray<Bitmap> bitmaps = new SparseArray<>(mUsers.size());
final int N = mUsers.size();
for (int i = 0; i < N; i++) {
UserRecord r = mUsers.get(i);
- if (r == null || r.picture == null ||
- r.info == null || mForcePictureLoadForUserId.get(r.info.id)) {
+ if (r == null || r.picture == null || r.info == null || forceAllUsers
+ || mForcePictureLoadForUserId.get(r.info.id)) {
continue;
}
bitmaps.put(r.info.id, r.picture);
@@ -600,6 +600,10 @@
return item.info.name;
}
+ public void onDensityOrFontScaleChanged() {
+ refreshUsers(UserHandle.USER_ALL);
+ }
+
public static abstract class BaseUserAdapter extends BaseAdapter {
final UserSwitcherController mController;