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

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

Merge changes I169a0ee1,I9b0b4576,I2bbf47db,If850be29,Iccdaa290, ...

* changes:
  Follow up addressing comments of pulsing refactor
  Fixed an issue where the icons would shift when pulsing
  Improved the pulsing experience when swiping away a notification
  Made sure the disappear animation for pulsing works correctly
  Made sure the shelf is properly clipped while pulsing
  Fixed a bug where notifications could be invisible while pulsing
  Changed the contentheight while pulsing
  Introducing new PulseExpansionHandler for dragging down while pulsing
  Refactored the background calculation to be more generic
  Added NotificationWakeUpCoordinator to coordinate wakeups better
parents 1e2455e1 34518f66
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -380,6 +380,20 @@ public class DataCollector implements SensorEventListener {
        addEvent(PhoneEvent.ON_NOTIFICATION_START_DRAGGING_DOWN);
    }

    public void onStartExpandingFromPulse() {
        if (DEBUG) {
            Log.d(TAG, "onStartExpandingFromPulse");
        }
        // TODO: maybe add event
    }

    public void onExpansionFromPulseStopped() {
        if (DEBUG) {
            Log.d(TAG, "onExpansionFromPulseStopped");
        }
        // TODO: maybe add event
    }

    public void onNotificatonStopDraggingDown() {
        if (DEBUG) {
            Log.d(TAG, "onNotificationStopDraggingDown");
+1 −0
Original line number Diff line number Diff line
@@ -32,6 +32,7 @@ public abstract class Classifier {
    public static final int RIGHT_AFFORDANCE = 6;
    public static final int GENERIC = 7;
    public static final int BOUNCER_UNLOCK = 8;
    public static final int PULSE_EXPAND = 9;

    /**
     * Contains all the information about touch events from which the classifier can query
+1 −0
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ public class DirectionEvaluator {
        boolean vertical = Math.abs(yDiff) >= Math.abs(xDiff);
        switch (type) {
            case Classifier.QUICK_SETTINGS:
            case Classifier.PULSE_EXPAND:
            case Classifier.NOTIFICATION_DRAG_DOWN:
                if (!vertical || yDiff <= 0.0) {
                    return falsingEvaluation;
+12 −0
Original line number Diff line number Diff line
@@ -408,10 +408,22 @@ public class FalsingManager implements SensorEventListener, StateListener {
        mDataCollector.onNotificatonStartDraggingDown();
    }

    public void onStartExpandingFromPulse() {
        if (FalsingLog.ENABLED) {
            FalsingLog.i("onStartExpandingFromPulse", "");
        }
        mHumanInteractionClassifier.setType(Classifier.PULSE_EXPAND);
        mDataCollector.onStartExpandingFromPulse();
    }

    public void onNotificatonStopDraggingDown() {
        mDataCollector.onNotificatonStopDraggingDown();
    }

    public void onExpansionFromPulseStopped() {
        mDataCollector.onExpansionFromPulseStopped();
    }

    public void onNotificationDismissed() {
        mDataCollector.onNotificationDismissed();
    }
+2 −1
Original line number Diff line number Diff line
@@ -128,7 +128,8 @@ public class HumanInteractionClassifier extends Classifier {
        // sent to the classifiers until the finger moves far enough. When the finger if lifted
        // up, the last MotionEvent which was far enough from the finger is set as the final
        // MotionEvent and sent to the Classifiers.
        if (mCurrentType == Classifier.NOTIFICATION_DRAG_DOWN) {
        if (mCurrentType == Classifier.NOTIFICATION_DRAG_DOWN
                || mCurrentType == Classifier.PULSE_EXPAND) {
            mBufferedEvents.add(MotionEvent.obtain(event));
            Point pointEnd = new Point(event.getX() / mDpi, event.getY() / mDpi);

Loading