Merge "Catch error thrown by WindowManager if window has already been detached" into tm-qpr-dev am: a79ea05f59
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20799177 Change-Id: I93efcd1944f8c96a6825b35a9939112247d626fe Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user