summaryrefslogtreecommitdiff
path: root/core/java/android/app/ActivityView.java
diff options
context:
space:
mode:
authorMady Mellor <madym@google.com>2019-04-05 15:09:01 -0700
committerMady Mellor <madym@google.com>2019-04-16 10:30:15 -0700
commit390bff474c04661a791bfdd01b77d20168ab7dc3 (patch)
tree58ece1410051ce4d23435d6eafe9cbbb90bc62d5 /core/java/android/app/ActivityView.java
parentbe0106abced580a34ea89d0484b2851d0b73065c (diff)
Fix back presses dismissing bubbles when IME is up
If bubbles is expanded & shade is not use the virtual display id of the expanded activity view (if it's valid, otherwise do whats normal). Test: manual 1) have expanded bubble with IME up 2) hit back button => note that the IME goes away but the bubble remains 1) have expanded bubble up 2) pull down shade 3) hit back button => shade goes away Do above with gesture nav turned on & do back gesture Test: atest KeyButtonViewTest Fixes: 122535136 Change-Id: Iabaace66cfb4d3d80b1a3a3c7b0773deb48fbcaa
Diffstat (limited to 'core/java/android/app/ActivityView.java')
-rw-r--r--core/java/android/app/ActivityView.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/core/java/android/app/ActivityView.java b/core/java/android/app/ActivityView.java
index 8ec5e3a43218..0ccaf62d45b2 100644
--- a/core/java/android/app/ActivityView.java
+++ b/core/java/android/app/ActivityView.java
@@ -19,6 +19,7 @@ package android.app;
import static android.hardware.display.DisplayManager.VIRTUAL_DISPLAY_FLAG_DESTROY_CONTENT_ON_REMOVAL;
import static android.hardware.display.DisplayManager.VIRTUAL_DISPLAY_FLAG_OWN_CONTENT_ONLY;
import static android.hardware.display.DisplayManager.VIRTUAL_DISPLAY_FLAG_PUBLIC;
+import static android.view.Display.INVALID_DISPLAY;
import android.annotation.NonNull;
import android.annotation.TestApi;
@@ -377,6 +378,16 @@ public class ActivityView extends ViewGroup {
}
/**
+ * @return the display id of the virtual display.
+ */
+ public int getVirtualDisplayId() {
+ if (mVirtualDisplay != null) {
+ return mVirtualDisplay.getDisplay().getDisplayId();
+ }
+ return INVALID_DISPLAY;
+ }
+
+ /**
* Injects a pair of down/up key events with keycode {@link KeyEvent#KEYCODE_BACK} to the
* virtual display.
*/