Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 582e1db5 authored by Mady Mellor's avatar Mady Mellor Committed by Automerger Merge Worker
Browse files

Merge "Add a reason to the broadcast to collapse system dialogs" into tm-dev am: 57eab459

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/16940036

Change-Id: I87133e7e5fca6d967fcc6eb44f0d02abd799b08b
parents 952d4def 57eab459
Loading
Loading
Loading
Loading
+12 −2
Original line number Diff line number Diff line
@@ -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