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

Commit 45afb122 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Merge cherrypicks of ['googleplex-android-review.googlesource.com/23692527',...

Merge cherrypicks of ['googleplex-android-review.googlesource.com/23692527', 'googleplex-android-review.googlesource.com/23831186', 'googleplex-android-review.googlesource.com/23765836', 'googleplex-android-review.googlesource.com/23769422', 'googleplex-android-review.googlesource.com/23771395', 'googleplex-android-review.googlesource.com/23785932'] into udc-release.

Change-Id: I29406b4bf9a7f9a6753445598ecf1e41f8d66fc2
parents ab648b81 1fb018a0
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -346,6 +346,10 @@ constructor(
                        ?.largeClock
                        ?.events
                        ?.onTargetRegionChanged(KeyguardClockSwitch.getLargeClockRegion(parentView))
                    clockController.clock
                        ?.smallClock
                        ?.events
                        ?.onTargetRegionChanged(KeyguardClockSwitch.getSmallClockRegion(parentView))
                }
            }
        parentView.addOnLayoutChangeListener(layoutChangeListener)
+9 −0
Original line number Diff line number Diff line
@@ -3560,6 +3560,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
    }

    private void endMotionEvent(MotionEvent event, float x, float y, boolean forceCancel) {
        mShadeLog.logEndMotionEvent("endMotionEvent called", forceCancel, false);
        mTrackingPointer = -1;
        mAmbientState.setSwipingUp(false);
        if ((mTracking && mTouchSlopExceeded) || Math.abs(x - mInitialExpandX) > mTouchSlop
@@ -3581,15 +3582,19 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
            } else if (event.getActionMasked() == MotionEvent.ACTION_CANCEL || forceCancel) {
                if (onKeyguard) {
                    expand = true;
                    mShadeLog.logEndMotionEvent("endMotionEvent: cancel while on keyguard",
                            forceCancel, expand);
                } else if (mCentralSurfaces.isBouncerShowingOverDream()) {
                    expand = false;
                } else {
                    // If we get a cancel, put the shade back to the state it was in when the
                    // gesture started
                    expand = !mPanelClosedOnDown;
                    mShadeLog.logEndMotionEvent("endMotionEvent: cancel", forceCancel, expand);
                }
            } else {
                expand = flingExpands(vel, vectorVel, x, y);
                mShadeLog.logEndMotionEvent("endMotionEvent: flingExpands", forceCancel, expand);
            }

            mDozeLog.traceFling(expand, mTouchAboveFalsingThreshold,
@@ -4685,6 +4690,8 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
                    mTouchSlopExceeded = mTouchSlopExceededBeforeDown;
                    mMotionAborted = false;
                    mPanelClosedOnDown = isFullyCollapsed();
                    mShadeLog.logPanelClosedOnDown("intercept down touch", mPanelClosedOnDown,
                            mExpandedFraction);
                    mCollapsedAndHeadsUpOnDown = false;
                    mHasLayoutedSinceDown = false;
                    mUpdateFlingOnLayout = false;
@@ -4898,6 +4905,8 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
                    startExpandMotion(x, y, false /* startTracking */, mExpandedHeight);
                    mMinExpandHeight = 0.0f;
                    mPanelClosedOnDown = isFullyCollapsed();
                    mShadeLog.logPanelClosedOnDown("handle down touch", mPanelClosedOnDown,
                            mExpandedFraction);
                    mHasLayoutedSinceDown = false;
                    mUpdateFlingOnLayout = false;
                    mMotionAborted = false;
+37 −1
Original line number Diff line number Diff line
@@ -90,7 +90,7 @@ class ShadeLogger @Inject constructor(@ShadeLog private val buffer: LogBuffer) {
                double1 = event.y.toDouble()
            },
            {
                "$str1\neventTime=$long1,downTime=$long2,y=$double1,action=$int1,class=$int2"
                "$str1: eventTime=$long1,downTime=$long2,y=$double1,action=$int1,class=$int2"
            }
        )
    }
@@ -280,6 +280,42 @@ class ShadeLogger @Inject constructor(@ShadeLog private val buffer: LogBuffer) {
        )
    }

    fun logEndMotionEvent(
        msg: String,
        forceCancel: Boolean,
        expand: Boolean,
    )
    {
        buffer.log(
            TAG,
            LogLevel.VERBOSE,
            {
                str1 = msg
                bool1 = forceCancel
                bool2 = expand
            },
            { "$str1; force=$bool1; expand=$bool2" }
        )
    }

    fun logPanelClosedOnDown(
        msg: String,
        panelClosedOnDown: Boolean,
        expandFraction: Float,
    )
    {
        buffer.log(
            TAG,
            LogLevel.VERBOSE,
            {
                str1 = msg
                bool1 = panelClosedOnDown
                double1 = expandFraction.toDouble()
            },
            { "$str1; mPanelClosedOnDown=$bool1; mExpandedFraction=$double1" }
        )
    }

    fun flingQs(flingType: Int, isClick: Boolean) {
        buffer.log(
            TAG,
+1 −22
Original line number Diff line number Diff line
@@ -534,19 +534,7 @@ public final class KeyboardShortcutListSearch {
                new ShortcutKeyGroupMultiMappingInfo(
                        context.getString(R.string.group_system_access_google_assistant),
                        Arrays.asList(
                                Pair.create(KeyEvent.KEYCODE_A, KeyEvent.META_META_ON))),
                /*  Lock screen: Meta + L */
                new ShortcutKeyGroupMultiMappingInfo(
                        context.getString(R.string.group_system_lock_screen),
                        Arrays.asList(
                                Pair.create(KeyEvent.KEYCODE_L, KeyEvent.META_META_ON))),
                /* Pull up Notes app for quick memo: Meta + Ctrl + N */
                new ShortcutKeyGroupMultiMappingInfo(
                        context.getString(R.string.group_system_quick_memo),
                        Arrays.asList(
                                Pair.create(
                                        KeyEvent.KEYCODE_N,
                                        KeyEvent.META_META_ON | KeyEvent.META_CTRL_ON)))
                                Pair.create(KeyEvent.KEYCODE_A, KeyEvent.META_META_ON)))
        );
        for (ShortcutKeyGroupMultiMappingInfo info : infoList) {
            systemGroup.addItem(info.getShortcutMultiMappingInfo());
@@ -588,21 +576,12 @@ public final class KeyboardShortcutListSearch {
                        new ArrayList<>());

        // System multitasking shortcuts:
        //    Enter Split screen with current app to RHS: Meta + Ctrl + Right arrow
        //    Enter Split screen with current app to LHS: Meta + Ctrl + Left arrow
        //    Switch from Split screen to full screen: Meta + Ctrl + Up arrow
        //    During Split screen: replace an app from one to another: Meta + Ctrl + Down arrow
        String[] shortcutLabels = {
                context.getString(R.string.system_multitasking_rhs),
                context.getString(R.string.system_multitasking_lhs),
                context.getString(R.string.system_multitasking_full_screen),
                context.getString(R.string.system_multitasking_replace)
        };
        int[] keyCodes = {
                KeyEvent.KEYCODE_DPAD_RIGHT,
                KeyEvent.KEYCODE_DPAD_LEFT,
                KeyEvent.KEYCODE_DPAD_UP,
                KeyEvent.KEYCODE_DPAD_DOWN
        };

        for (int i = 0; i < shortcutLabels.length; i++) {
+1 −0
Original line number Diff line number Diff line
@@ -840,6 +840,7 @@ public class NotifCollection implements Dumpable, PipelineDumpable {
                && !hasFlag(entry, Notification.FLAG_ONGOING_EVENT)
                && !hasFlag(entry, Notification.FLAG_BUBBLE)
                && !hasFlag(entry, Notification.FLAG_NO_CLEAR)
                && (entry.getChannel() == null || !entry.getChannel().isImportantConversation())
                && entry.getDismissState() != DISMISSED;
    }

Loading