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

Commit 1a954a7a authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 8605372 from d59f2ed6 to tm-qpr1-release

Change-Id: Ibf7acd325d4392d637ee130f63848e5d7b5740ea
parents 6ae860dd d59f2ed6
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -1772,7 +1772,7 @@ public final class ViewRootImpl implements ViewParent,
            }
        }

        mForceNextWindowRelayout = forceNextWindowRelayout;
        mForceNextWindowRelayout |= forceNextWindowRelayout;
        mPendingAlwaysConsumeSystemBars = args.argi2 != 0;
        mSyncSeqId = args.argi4 > mSyncSeqId ? args.argi4 : mSyncSeqId;

@@ -5233,6 +5233,9 @@ public final class ViewRootImpl implements ViewParent,
            // the buffers may still have content in previous rotation. And the next draw may
            // not update all regions, that causes some afterimages to flicker.
            mUpdateSurfaceNeeded = true;
            if (!mIsInTraversal) {
                mForceNextWindowRelayout = true;
            }
        }

        Configuration globalConfig = mergedConfiguration.getGlobalConfiguration();
+6 −6
Original line number Diff line number Diff line
@@ -769,6 +769,12 @@
      "group": "WM_ERROR",
      "at": "com\/android\/server\/wm\/WindowManagerService.java"
    },
    "-1383884640": {
      "message": " allReady query: used=%b override=%b defer=%d states=[%s]",
      "level": "VERBOSE",
      "group": "WM_DEBUG_WINDOW_TRANSITIONS",
      "at": "com\/android\/server\/wm\/Transition.java"
    },
    "-1376035390": {
      "message": "No task found",
      "level": "DEBUG",
@@ -2551,12 +2557,6 @@
      "group": "WM_DEBUG_ADD_REMOVE",
      "at": "com\/android\/server\/wm\/ActivityRecord.java"
    },
    "352982444": {
      "message": " allReady query: used=%b override=%b states=[%s]",
      "level": "VERBOSE",
      "group": "WM_DEBUG_WINDOW_TRANSITIONS",
      "at": "com\/android\/server\/wm\/Transition.java"
    },
    "355720268": {
      "message": "stopFreezingDisplayLocked: Unfreezing now",
      "level": "DEBUG",
+32 −0
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@ import static android.view.View.VISIBLE;
import static android.view.WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS;

import static com.android.wm.shell.bubbles.BubbleDebugConfig.DEBUG_BUBBLE_CONTROLLER;
import static com.android.wm.shell.bubbles.BubbleDebugConfig.DEBUG_BUBBLE_GESTURE;
import static com.android.wm.shell.bubbles.BubbleDebugConfig.TAG_BUBBLES;
import static com.android.wm.shell.bubbles.BubbleDebugConfig.TAG_WITH_CLASS_NAME;
import static com.android.wm.shell.bubbles.BubblePositioner.TASKBAR_POSITION_BOTTOM;
@@ -859,6 +860,19 @@ public class BubbleController {
        }
    }

    private void onNotificationPanelExpandedChanged(boolean expanded) {
        if (DEBUG_BUBBLE_GESTURE) {
            Log.d(TAG, "onNotificationPanelExpandedChanged: expanded=" + expanded);
        }
        if (mStackView != null && mStackView.isExpanded()) {
            if (expanded) {
                mStackView.stopMonitoringSwipeUpGesture();
            } else {
                mStackView.startMonitoringSwipeUpGesture();
            }
        }
    }

    private void setSysuiProxy(Bubbles.SysuiProxy proxy) {
        mSysuiProxy = proxy;
    }
@@ -1441,6 +1455,18 @@ public class BubbleController {
        return mStackView;
    }

    /**
     * Check if notification panel is in an expanded state.
     * Makes a call to System UI process and delivers the result via {@code callback} on the
     * WM Shell main thread.
     *
     * @param callback callback that has the result of notification panel expanded state
     */
    public void isNotificationPanelExpanded(Consumer<Boolean> callback) {
        mSysuiProxy.isNotificationPanelExpand(expanded ->
                mMainExecutor.execute(() -> callback.accept(expanded)));
    }

    /**
     * Description of current bubble state.
     */
@@ -1809,6 +1835,12 @@ public class BubbleController {
            });
        }

        @Override
        public void onNotificationPanelExpandedChanged(boolean expanded) {
            mMainExecutor.execute(
                    () -> BubbleController.this.onNotificationPanelExpandedChanged(expanded));
        }

        @Override
        public void dump(PrintWriter pw, String[] args) {
            try {
+28 −5
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ import static android.view.ViewGroup.LayoutParams.WRAP_CONTENT;

import static com.android.wm.shell.animation.Interpolators.ALPHA_IN;
import static com.android.wm.shell.animation.Interpolators.ALPHA_OUT;
import static com.android.wm.shell.bubbles.BubbleDebugConfig.DEBUG_BUBBLE_GESTURE;
import static com.android.wm.shell.bubbles.BubbleDebugConfig.DEBUG_BUBBLE_STACK_VIEW;
import static com.android.wm.shell.bubbles.BubbleDebugConfig.TAG_BUBBLES;
import static com.android.wm.shell.bubbles.BubbleDebugConfig.TAG_WITH_CLASS_NAME;
@@ -1930,11 +1931,13 @@ public class BubbleStackView extends FrameLayout
            return;
        }

        boolean wasExpanded = mIsExpanded;

        hideCurrentInputMethod();

        mBubbleController.getSysuiProxy().onStackExpandChanged(shouldExpand);

        if (mIsExpanded) {
        if (wasExpanded) {
            stopMonitoringSwipeUpGesture();
            if (HOME_GESTURE_ENABLED) {
                animateCollapse();
@@ -1949,14 +1952,24 @@ public class BubbleStackView extends FrameLayout
            logBubbleEvent(mExpandedBubble,
                    FrameworkStatsLog.BUBBLE_UICHANGED__ACTION__STACK_EXPANDED);
            if (HOME_GESTURE_ENABLED) {
                mBubbleController.isNotificationPanelExpanded(notifPanelExpanded -> {
                    if (!notifPanelExpanded && mIsExpanded) {
                        startMonitoringSwipeUpGesture();
                    }
                });
            }
        }
        notifyExpansionChanged(mExpandedBubble, mIsExpanded);
    }

    private void startMonitoringSwipeUpGesture() {
        stopMonitoringSwipeUpGesture();
    /**
     * Monitor for swipe up gesture that is used to collapse expanded view
     */
    void startMonitoringSwipeUpGesture() {
        if (DEBUG_BUBBLE_GESTURE) {
            Log.d(TAG, "startMonitoringSwipeUpGesture");
        }
        stopMonitoringSwipeUpGestureInternal();

        if (isGestureNavEnabled()) {
            mBubblesNavBarGestureTracker = new BubblesNavBarGestureTracker(mContext, mPositioner);
@@ -1971,7 +1984,17 @@ public class BubbleStackView extends FrameLayout
                == WindowManagerPolicyConstants.NAV_BAR_MODE_GESTURAL;
    }

    private void stopMonitoringSwipeUpGesture() {
    /**
     * Stop monitoring for swipe up gesture
     */
    void stopMonitoringSwipeUpGesture() {
        if (DEBUG_BUBBLE_GESTURE) {
            Log.d(TAG, "stopMonitoringSwipeUpGesture");
        }
        stopMonitoringSwipeUpGestureInternal();
    }

    private void stopMonitoringSwipeUpGestureInternal() {
        if (mBubblesNavBarGestureTracker != null) {
            mBubblesNavBarGestureTracker.stop();
            mBubblesNavBarGestureTracker = null;
+6 −1
Original line number Diff line number Diff line
@@ -212,6 +212,11 @@ public interface Bubbles {
            NotificationChannel channel,
            int modificationType);

    /**
     * Called when notification panel is expanded or collapsed
     */
    void onNotificationPanelExpandedChanged(boolean expanded);

    /**
     * Called when the status bar has become visible or invisible (either permanently or
     * temporarily).
@@ -277,7 +282,7 @@ public interface Bubbles {

    /** Callback to tell SysUi components execute some methods. */
    interface SysuiProxy {
        void isNotificationShadeExpand(Consumer<Boolean> callback);
        void isNotificationPanelExpand(Consumer<Boolean> callback);

        void getPendingOrActiveEntry(String key, Consumer<BubbleEntry> callback);

Loading