diff options
| author | 2024-12-13 01:28:14 -0800 | |
|---|---|---|
| committer | 2024-12-13 01:28:14 -0800 | |
| commit | 93df45a050622f0d42a2f475efdad7db19e59cbb (patch) | |
| tree | 5bc1ba217eedb4f67f9cfd9c821499e4a0bfbcdb | |
| parent | ffdfbbda663302ad1336bfbc67beb5714b7900a3 (diff) | |
| parent | d23995b6910894f92a36ceb1bbd6a18a615dd75c (diff) | |
Merge "Fixes PB won't close sub-window of an activity as close_dialog." into main
| -rw-r--r-- | services/core/java/com/android/server/wm/BackNavigationController.java | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/services/core/java/com/android/server/wm/BackNavigationController.java b/services/core/java/com/android/server/wm/BackNavigationController.java index e9e3c9ee389e..1a7c6b70f007 100644 --- a/services/core/java/com/android/server/wm/BackNavigationController.java +++ b/services/core/java/com/android/server/wm/BackNavigationController.java @@ -275,12 +275,8 @@ class BackNavigationController { final boolean isOccluded = isKeyguardOccluded(window); if (!canAnimate) { backType = BackNavigationInfo.TYPE_CALLBACK; - } else if ((window.getParent().getChildCount() > 1 - && window.getParent().getChildAt(0) != window)) { - // TODO Dialog window does not need to attach on activity, check - // window.mAttrs.type != TYPE_BASE_APPLICATION - // Are we the top window of our parent? If not, we are a window on top of the - // activity, we won't close the activity. + } else if (window.mAttrs.type != TYPE_BASE_APPLICATION) { + // The focus window belongs to an activity and it's not the base window. backType = BackNavigationInfo.TYPE_DIALOG_CLOSE; removedWindowContainer = window; } else if (hasTranslucentActivity(currentActivity, prevActivities)) { |