Merge "Fix InsetsConsumer leak" into rvc-dev
This commit is contained in:
@@ -21,7 +21,6 @@ import static android.view.Display.INVALID_DISPLAY;
|
|||||||
import static android.view.InputDevice.SOURCE_CLASS_NONE;
|
import static android.view.InputDevice.SOURCE_CLASS_NONE;
|
||||||
import static android.view.InsetsState.ITYPE_NAVIGATION_BAR;
|
import static android.view.InsetsState.ITYPE_NAVIGATION_BAR;
|
||||||
import static android.view.InsetsState.ITYPE_STATUS_BAR;
|
import static android.view.InsetsState.ITYPE_STATUS_BAR;
|
||||||
import static android.view.InsetsState.LAST_TYPE;
|
|
||||||
import static android.view.InsetsState.SIZE;
|
import static android.view.InsetsState.SIZE;
|
||||||
import static android.view.View.PFLAG_DRAW_ANIMATION;
|
import static android.view.View.PFLAG_DRAW_ANIMATION;
|
||||||
import static android.view.View.SYSTEM_UI_FLAG_FULLSCREEN;
|
import static android.view.View.SYSTEM_UI_FLAG_FULLSCREEN;
|
||||||
@@ -4617,6 +4616,9 @@ public final class ViewRootImpl implements ViewParent,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void dispatchDetachedFromWindow() {
|
void dispatchDetachedFromWindow() {
|
||||||
|
// Make sure we free-up insets resources if view never received onWindowFocusLost()
|
||||||
|
// because of a die-signal
|
||||||
|
mInsetsController.onWindowFocusLost();
|
||||||
mFirstInputStage.onDetachedFromWindow();
|
mFirstInputStage.onDetachedFromWindow();
|
||||||
if (mView != null && mView.mAttachInfo != null) {
|
if (mView != null && mView.mAttachInfo != null) {
|
||||||
mAttachInfo.mTreeObserver.dispatchOnWindowAttachedChange(false);
|
mAttachInfo.mTreeObserver.dispatchOnWindowAttachedChange(false);
|
||||||
|
|||||||
Reference in New Issue
Block a user