Merge "Let navigation bar has control if it is focused" into udc-dev am: 1dd100693a

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/21736590

Change-Id: I3910f583f94967cee2bde44a795d7518478ce440
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Tiger Huang
2023-03-06 08:39:16 +00:00
committed by Automerger Merge Worker

View File

@@ -580,6 +580,13 @@ class InsetsPolicy {
// Notification shade has control anyways, no reason to force anything.
return focusedWin;
}
if (focusedWin != null) {
final InsetsSourceProvider provider = focusedWin.getControllableInsetProvider();
if (provider != null && provider.getSource().getType() == Type.navigationBars()) {
// Navigation bar has control if it is focused.
return focusedWin;
}
}
if (mPolicy.isForceShowNavigationBarEnabled() && focusedWin != null
&& focusedWin.getActivityType() == ACTIVITY_TYPE_STANDARD) {
// When "force show navigation bar" is enabled, it means both force visible is true, and