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

Commit dc66506f authored by Selim Cinek's avatar Selim Cinek Committed by Android (Google) Code Review
Browse files

Merge "Fixed an issue where the notification could stay userlocked" into oc-dev

parents b9eb205b f8c4add8
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@ import android.net.Uri;
import android.os.AsyncTask;
import android.os.Build;
import android.os.Handler;
import android.os.Looper;
import android.os.UserHandle;
import android.provider.Settings;
import android.util.Log;
@@ -56,7 +57,7 @@ public class DataCollector implements SensorEventListener {
    private static final long TIMEOUT_MILLIS = 11000; // 11 seconds.
    public static final boolean DEBUG = false;

    private final Handler mHandler = new Handler();
    private final Handler mHandler = new Handler(Looper.getMainLooper());
    private final Context mContext;

    // Err on the side of caution, so logging is not started after a crash even tough the screen
+2 −1
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@ import android.hardware.SensorEventListener;
import android.hardware.SensorManager;
import android.net.Uri;
import android.os.Handler;
import android.os.Looper;
import android.os.PowerManager;
import android.os.UserHandle;
import android.provider.Settings;
@@ -59,7 +60,7 @@ public class FalsingManager implements SensorEventListener {
            Sensor.TYPE_ROTATION_VECTOR,
    };

    private final Handler mHandler = new Handler();
    private final Handler mHandler = new Handler(Looper.getMainLooper());
    private final Context mContext;

    private final SensorManager mSensorManager;
+2 −1
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ import android.content.Context;
import android.database.ContentObserver;
import android.hardware.SensorEvent;
import android.os.Handler;
import android.os.Looper;
import android.os.UserHandle;
import android.provider.Settings;
import android.util.DisplayMetrics;
@@ -41,7 +42,7 @@ public class HumanInteractionClassifier extends Classifier {

    private static HumanInteractionClassifier sInstance = null;

    private final Handler mHandler = new Handler();
    private final Handler mHandler = new Handler(Looper.getMainLooper());
    private final Context mContext;

    private final StrokeClassifier[] mStrokeClassifiers;
+2 −1
Original line number Diff line number Diff line
@@ -4633,7 +4633,8 @@ public class StatusBar extends SystemUI implements DemoMode,
    /* Only ever called as a consequence of a lockscreen expansion gesture. */
    @Override
    public boolean onDraggedDown(View startingChild, int dragLengthY) {
        if (hasActiveNotifications() && (!isDozing() || isPulsing())) {
        if (mState == StatusBarState.KEYGUARD
                && hasActiveNotifications() && (!isDozing() || isPulsing())) {
            mLockscreenGestureLogger.write(
                    MetricsEvent.ACTION_LS_SHADE,
                    (int) (dragLengthY / mDisplayMetrics.density),
+9 −3
Original line number Diff line number Diff line
@@ -53,6 +53,7 @@ import android.view.WindowManager;
import android.view.WindowManagerGlobal;
import android.widget.FrameLayout;

import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.view.FloatingActionMode;
import com.android.internal.widget.FloatingToolbar;
import com.android.systemui.R;
@@ -182,7 +183,12 @@ public class StatusBarWindowView extends FrameLayout {

    public void setService(StatusBar service) {
        mService = service;
        mDragDownHelper = new DragDownHelper(getContext(), this, mStackScrollLayout, mService);
        setDragDownHelper(new DragDownHelper(getContext(), this, mStackScrollLayout, mService));
    }

    @VisibleForTesting
    void setDragDownHelper(DragDownHelper dragDownHelper) {
        mDragDownHelper = dragDownHelper;
    }

    @Override
@@ -309,8 +315,8 @@ public class StatusBarWindowView extends FrameLayout {
            mDoubleTapHelper.onTouchEvent(ev);
            handled = true;
        }
        if (mService.getBarState() == StatusBarState.KEYGUARD
                && (!handled || mDragDownHelper.isDraggingDown())) {
        if ((mService.getBarState() == StatusBarState.KEYGUARD && !handled)
                || mDragDownHelper.isDraggingDown()) {
            // we still want to finish our drag down gesture when locking the screen
            handled = mDragDownHelper.onTouchEvent(ev);
        }
Loading