Merge "Treat non-existing types as controllable types for compatibility" into udc-dev am: 27a68f3857
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23388858 Change-Id: Ie61a753eedb4e487c70446af9971781a2d933dfd Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -658,6 +658,9 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation
|
|||||||
/** Set of inset types which cannot be controlled by the user animation */
|
/** Set of inset types which cannot be controlled by the user animation */
|
||||||
private @InsetsType int mDisabledUserAnimationInsetsTypes;
|
private @InsetsType int mDisabledUserAnimationInsetsTypes;
|
||||||
|
|
||||||
|
/** Set of inset types which are existing */
|
||||||
|
private @InsetsType int mExistingTypes = 0;
|
||||||
|
|
||||||
/** Set of inset types which are visible */
|
/** Set of inset types which are visible */
|
||||||
private @InsetsType int mVisibleTypes = WindowInsets.Type.defaultVisible();
|
private @InsetsType int mVisibleTypes = WindowInsets.Type.defaultVisible();
|
||||||
|
|
||||||
@@ -906,6 +909,12 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation
|
|||||||
}
|
}
|
||||||
mVisibleTypes = visibleTypes;
|
mVisibleTypes = visibleTypes;
|
||||||
}
|
}
|
||||||
|
if (mExistingTypes != existingTypes) {
|
||||||
|
if (WindowInsets.Type.hasCompatSystemBars(mExistingTypes ^ existingTypes)) {
|
||||||
|
mCompatSysUiVisibilityStaled = true;
|
||||||
|
}
|
||||||
|
mExistingTypes = existingTypes;
|
||||||
|
}
|
||||||
InsetsState.traverse(mState, newState, mRemoveGoneSources);
|
InsetsState.traverse(mState, newState, mRemoveGoneSources);
|
||||||
|
|
||||||
updateDisabledUserAnimationTypes(disabledUserAnimationTypes);
|
updateDisabledUserAnimationTypes(disabledUserAnimationTypes);
|
||||||
@@ -1662,7 +1671,8 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation
|
|||||||
if (mCompatSysUiVisibilityStaled) {
|
if (mCompatSysUiVisibilityStaled) {
|
||||||
mCompatSysUiVisibilityStaled = false;
|
mCompatSysUiVisibilityStaled = false;
|
||||||
mHost.updateCompatSysUiVisibility(
|
mHost.updateCompatSysUiVisibility(
|
||||||
mVisibleTypes, mRequestedVisibleTypes, mControllableTypes);
|
// Treat non-existing types as controllable types for compatibility.
|
||||||
|
mVisibleTypes, mRequestedVisibleTypes, mControllableTypes | ~mExistingTypes);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user