summaryrefslogtreecommitdiff
path: root/quickstep
diff options
context:
space:
mode:
authorMady Mellor <madym@google.com>2022-02-17 14:17:21 -0800
committerMady Mellor <madym@google.com>2022-02-22 14:14:34 -0800
commit411e862175b97c7048f69c8f6015cd751765b254 (patch)
treee9d4a46e746a3b6e487530b9d55b262689756fec /quickstep
parente424f57dcbf6d8a38df09fed8652c23f3dc23cb3 (diff)
downloadLauncher3-411e862175b97c7048f69c8f6015cd751765b254.tar.gz
Add a reason to the broadcast to collapse system dialogs
Test: manual - see other CL in topic Bug: 218517365 Change-Id: I9aa686bb95f11b4eeab0139833876abaf8b80cad
Diffstat (limited to 'quickstep')
-rw-r--r--quickstep/src/com/android/quickstep/inputconsumers/SysUiOverlayInputConsumer.java14
1 files changed, 12 insertions, 2 deletions
diff --git a/quickstep/src/com/android/quickstep/inputconsumers/SysUiOverlayInputConsumer.java b/quickstep/src/com/android/quickstep/inputconsumers/SysUiOverlayInputConsumer.java
index 3f833c0a6d..878f132531 100644
--- a/quickstep/src/com/android/quickstep/inputconsumers/SysUiOverlayInputConsumer.java
+++ b/quickstep/src/com/android/quickstep/inputconsumers/SysUiOverlayInputConsumer.java
@@ -15,9 +15,11 @@
*/
package com.android.quickstep.inputconsumers;
+import android.app.ActivityManager;
import android.content.Context;
-import android.content.Intent;
import android.graphics.PointF;
+import android.os.RemoteException;
+import android.util.Log;
import android.view.MotionEvent;
import com.android.launcher3.testing.TestLogging;
@@ -36,6 +38,10 @@ import com.android.systemui.shared.system.InputMonitorCompat;
*/
public class SysUiOverlayInputConsumer implements InputConsumer,
TriggerSwipeUpTouchTracker.OnSwipeUpListener {
+ private static final String TAG = "SysUiOverlayInputConsumer";
+
+ // Should match the values in PhoneWindowManager
+ private static final String SYSTEM_DIALOG_REASON_GESTURE_NAV = "gestureNav";
private final Context mContext;
private final InputMonitorCompat mInputMonitor;
@@ -76,7 +82,11 @@ public class SysUiOverlayInputConsumer implements InputConsumer,
@Override
public void onSwipeUp(boolean wasFling, PointF finalVelocity) {
// Close system dialogs when a swipe up is detected.
- mContext.sendBroadcast(new Intent(Intent.ACTION_CLOSE_SYSTEM_DIALOGS));
+ try {
+ ActivityManager.getService().closeSystemDialogs(SYSTEM_DIALOG_REASON_GESTURE_NAV);
+ } catch (RemoteException e) {
+ Log.e(TAG, "Exception calling closeSystemDialogs " + e.getMessage());
+ }
}
@Override