Loading packages/SystemUI/src/com/android/systemui/screenshot/ScreenshotController.java +10 −4 Original line number Diff line number Diff line Loading @@ -222,7 +222,8 @@ public class ScreenshotController { private Bitmap mScreenBitmap; private SaveImageInBackgroundTask mSaveInBgTask; private boolean mScreenshotTakenInPortrait; private boolean mBlockAttach; private boolean mAttachRequested; private boolean mDetachRequested; private Animator mScreenshotAnimation; private RequestCallback mCurrentRequestCallback; private ScreenshotActionsProvider mActionsProvider; Loading Loading @@ -675,7 +676,7 @@ public class ScreenshotController { new ViewTreeObserver.OnWindowAttachListener() { @Override public void onWindowAttached() { mBlockAttach = false; mAttachRequested = false; decorView.getViewTreeObserver().removeOnWindowAttachListener(this); action.run(); } Loading @@ -691,13 +692,13 @@ public class ScreenshotController { @MainThread private void attachWindow() { View decorView = mWindow.getDecorView(); if (decorView.isAttachedToWindow() || mBlockAttach) { if (decorView.isAttachedToWindow() || mAttachRequested) { return; } if (DEBUG_WINDOW) { Log.d(TAG, "attachWindow"); } mBlockAttach = true; mAttachRequested = true; mWindowManager.addView(decorView, mWindowLayoutParams); decorView.requestApplyInsets(); Loading @@ -715,6 +716,11 @@ public class ScreenshotController { Log.d(TAG, "Removing screenshot window"); } mWindowManager.removeViewImmediate(decorView); mDetachRequested = false; } if (mAttachRequested && !mDetachRequested) { mDetachRequested = true; withWindowAttached(this::removeWindow); } mViewProxy.stopInputListening(); Loading Loading
packages/SystemUI/src/com/android/systemui/screenshot/ScreenshotController.java +10 −4 Original line number Diff line number Diff line Loading @@ -222,7 +222,8 @@ public class ScreenshotController { private Bitmap mScreenBitmap; private SaveImageInBackgroundTask mSaveInBgTask; private boolean mScreenshotTakenInPortrait; private boolean mBlockAttach; private boolean mAttachRequested; private boolean mDetachRequested; private Animator mScreenshotAnimation; private RequestCallback mCurrentRequestCallback; private ScreenshotActionsProvider mActionsProvider; Loading Loading @@ -675,7 +676,7 @@ public class ScreenshotController { new ViewTreeObserver.OnWindowAttachListener() { @Override public void onWindowAttached() { mBlockAttach = false; mAttachRequested = false; decorView.getViewTreeObserver().removeOnWindowAttachListener(this); action.run(); } Loading @@ -691,13 +692,13 @@ public class ScreenshotController { @MainThread private void attachWindow() { View decorView = mWindow.getDecorView(); if (decorView.isAttachedToWindow() || mBlockAttach) { if (decorView.isAttachedToWindow() || mAttachRequested) { return; } if (DEBUG_WINDOW) { Log.d(TAG, "attachWindow"); } mBlockAttach = true; mAttachRequested = true; mWindowManager.addView(decorView, mWindowLayoutParams); decorView.requestApplyInsets(); Loading @@ -715,6 +716,11 @@ public class ScreenshotController { Log.d(TAG, "Removing screenshot window"); } mWindowManager.removeViewImmediate(decorView); mDetachRequested = false; } if (mAttachRequested && !mDetachRequested) { mDetachRequested = true; withWindowAttached(this::removeWindow); } mViewProxy.stopInputListening(); Loading