From 4341cbf28e6caeaf7a86af3422b027fb584e3bdc Mon Sep 17 00:00:00 2001 From: Lucas Dupin Date: Fri, 18 May 2018 15:35:36 -0700 Subject: [PATCH] Reset wallpaper state during startup Test: adb shell am crash com.android.systemui Change-Id: Ia8a75bfe9384f088efc23f12336404ece05eb885 Fixes: 79343585 --- .../com/android/systemui/statusbar/phone/StatusBar.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java index 2a1db4e506975..cdd1414b46335 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java @@ -45,6 +45,7 @@ import android.annotation.Nullable; import android.app.ActivityManager; import android.app.ActivityOptions; import android.app.AlarmManager; +import android.app.IWallpaperManager; import android.app.KeyguardManager; import android.app.Notification; import android.app.NotificationManager; @@ -747,6 +748,14 @@ public class StatusBar extends SystemUI implements DemoMode, Slog.e(TAG, "Failed to register VR mode state listener: " + e); } + IWallpaperManager wallpaperManager = IWallpaperManager.Stub.asInterface( + ServiceManager.getService(Context.WALLPAPER_SERVICE)); + try { + wallpaperManager.setInAmbientMode(false /* ambientMode */, false /* animated */); + } catch (RemoteException e) { + // Just pass, nothing critical. + } + // end old BaseStatusBar.start(). // Lastly, call to the icon policy to install/update all the icons.