summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/SystemUI/src/com/android/systemui/dreams/DreamOverlayService.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/dreams/DreamOverlayService.java b/packages/SystemUI/src/com/android/systemui/dreams/DreamOverlayService.java
index eedef65a8e4d..a9a9caed314b 100644
--- a/packages/SystemUI/src/com/android/systemui/dreams/DreamOverlayService.java
+++ b/packages/SystemUI/src/com/android/systemui/dreams/DreamOverlayService.java
@@ -230,6 +230,7 @@ public class DreamOverlayService extends android.service.dreams.DreamOverlayServ
* Inserts {@link Window} to host the dream overlay into the dream's parent window. Must be
* called from the main executing thread. The window attributes closely mirror those that are
* set by the {@link android.service.dreams.DreamService} on the dream Window.
+ *
* @param layoutParams The {@link android.view.WindowManager.LayoutParams} which allow inserting
* into the dream window.
*/
@@ -276,7 +277,11 @@ public class DreamOverlayService extends android.service.dreams.DreamOverlayServ
private void resetCurrentDreamOverlayLocked() {
if (mStarted && mWindow != null) {
- mWindowManager.removeView(mWindow.getDecorView());
+ try {
+ mWindowManager.removeView(mWindow.getDecorView());
+ } catch (IllegalArgumentException e) {
+ Log.e(TAG, "Error removing decor view when resetting overlay", e);
+ }
}
mStateController.setOverlayActive(false);