summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/res/res/layout/autofill_save.xml2
-rw-r--r--core/res/res/values/dimens.xml8
-rw-r--r--services/core/java/com/android/server/am/ActivityStack.java6
-rw-r--r--services/core/java/com/android/server/wallpaper/WallpaperManagerService.java19
4 files changed, 18 insertions, 17 deletions
diff --git a/core/res/res/layout/autofill_save.xml b/core/res/res/layout/autofill_save.xml
index 63675ab03916..92419c8c525b 100644
--- a/core/res/res/layout/autofill_save.xml
+++ b/core/res/res/layout/autofill_save.xml
@@ -47,7 +47,7 @@
<ImageView
android:id="@+id/autofill_save_icon"
android:layout_width="wrap_content"
- android:layout_height="wrap_content"/>
+ android:layout_height="24sp"/>
<TextView
android:id="@+id/autofill_save_title"
diff --git a/core/res/res/values/dimens.xml b/core/res/res/values/dimens.xml
index 5ee4f7824c97..2c64789f2121 100644
--- a/core/res/res/values/dimens.xml
+++ b/core/res/res/values/dimens.xml
@@ -609,7 +609,11 @@
<!-- Max height of the the autofill save custom subtitle as a fraction of the screen width/height -->
<dimen name="autofill_save_custom_subtitle_max_height">20%</dimen>
- <!-- Max (absolute) dimensions (both width and height) of autofill service icon on autofill save affordance -->
- <dimen name="autofill_save_icon_max_size">100dp</dimen>
+ <!-- Max (absolute) dimensions (both width and height) of autofill service icon on autofill save affordance.
+ NOTE: the actual displayed size might is actually smaller than this and is hardcoded in the
+ autofill_save.xml layout; this dimension is just used to avoid a crash in the UI (if the icon provided
+ by the autofill service metadata is bigger than these dimentionsit will not be displayed).
+ -->
+ <dimen name="autofill_save_icon_max_size">300dp</dimen>
</resources>
diff --git a/services/core/java/com/android/server/am/ActivityStack.java b/services/core/java/com/android/server/am/ActivityStack.java
index 8a44d0032f6a..791b2c066821 100644
--- a/services/core/java/com/android/server/am/ActivityStack.java
+++ b/services/core/java/com/android/server/am/ActivityStack.java
@@ -1190,7 +1190,6 @@ class ActivityStack<T extends StackWindowController> extends ConfigurationContai
* process of going to sleep (checkReadyForSleep will be called when that process finishes).
*/
boolean goToSleepIfPossible(boolean shuttingDown) {
- final ActivityRecord topActivity = topActivity();
boolean shouldSleep = true;
if (mResumedActivity != null) {
@@ -1215,11 +1214,6 @@ class ActivityStack<T extends StackWindowController> extends ConfigurationContai
// Still waiting for something to pause; can't sleep yet.
if (DEBUG_PAUSE) Slog.v(TAG_PAUSE, "Sleep still waiting to pause " + mPausingActivity);
shouldSleep = false;
- } else if (topActivity != null && topActivity.state == ActivityState.PAUSED) {
- // Our top activity is currently paused, we need to ensure we move it to the stopped
- // state.
- stopActivityLocked(topActivity);
- shouldSleep = false;
}
if (!shuttingDown) {
diff --git a/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java b/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java
index 0536ff155513..b888ec21e708 100644
--- a/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java
+++ b/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java
@@ -1301,15 +1301,13 @@ public class WallpaperManagerService extends IWallpaperManager.Stub {
}
void switchUser(int userId, IRemoteCallback reply) {
- WallpaperData systemWallpaper;
- WallpaperData lockWallpaper;
+ final WallpaperData systemWallpaper;
+ final WallpaperData lockWallpaper;
synchronized (mLock) {
mCurrentUserId = userId;
systemWallpaper = getWallpaperSafeLocked(userId, FLAG_SYSTEM);
- lockWallpaper = mLockWallpaperMap.get(userId);
- if (lockWallpaper == null) {
- lockWallpaper = systemWallpaper;
- }
+ final WallpaperData tmpLockWallpaper = mLockWallpaperMap.get(userId);
+ lockWallpaper = tmpLockWallpaper == null ? systemWallpaper : tmpLockWallpaper;
// Not started watching yet, in case wallpaper data was loaded for other reasons.
if (systemWallpaper.wallpaperObserver == null) {
systemWallpaper.wallpaperObserver = new WallpaperObserver(systemWallpaper);
@@ -1317,8 +1315,13 @@ public class WallpaperManagerService extends IWallpaperManager.Stub {
}
switchWallpaper(systemWallpaper, reply);
}
- notifyWallpaperColorsChanged(systemWallpaper, FLAG_SYSTEM);
- notifyWallpaperColorsChanged(lockWallpaper, FLAG_LOCK);
+
+ // Offload color extraction to another thread since switchUser will be called
+ // from the main thread.
+ FgThread.getHandler().post(() -> {
+ notifyWallpaperColorsChanged(systemWallpaper, FLAG_SYSTEM);
+ notifyWallpaperColorsChanged(lockWallpaper, FLAG_LOCK);
+ });
}
void switchWallpaper(WallpaperData wallpaper, IRemoteCallback reply) {