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

Commit 5c8d1d97 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

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

Merge cherrypicks of ['googleplex-android-review.googlesource.com/22381002', 'googleplex-android-review.googlesource.com/23661867', 'googleplex-android-review.googlesource.com/24219663', 'googleplex-android-review.googlesource.com/24296993', 'googleplex-android-review.googlesource.com/24211905', 'googleplex-android-review.googlesource.com/23590276'] into sparse-10316531-L04200000962983271.
SPARSE_CHANGE: I7b3dcd06e7483fde745a1d56dfee7c4efc262ed7
SPARSE_CHANGE: Ifcdac241bfe33f44f5f03f1a6db682c57f0cd388
SPARSE_CHANGE: Idaa7280ed23076b3282c987a249259e0c38b6630
SPARSE_CHANGE: Ie914f97925d8defb8c57818e5e7ffe958936336c
SPARSE_CHANGE: Ic3d97e05d99148e71b9dd64f8f56c20fc68193c9
SPARSE_CHANGE: Iee55ce04e15eb86a12f6d80bb277e20e708876b7

Change-Id: I5fd9857bf65e10183449a2d406405610fb610114
parents 7c8d5d55 15b49fb5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -104,7 +104,7 @@ object Flags {
    // TODO(b/260335638): Tracking Bug
    @JvmField
    val NOTIFICATION_INLINE_REPLY_ANIMATION =
        releasedFlag(174148361, "notification_inline_reply_animation")
        unreleasedFlag(174148361, "notification_inline_reply_animation")

    val FILTER_UNSEEN_NOTIFS_ON_KEYGUARD =
        releasedFlag(254647461, "filter_unseen_notifs_on_keyguard", teamfood = true)
+8 −10
Original line number Diff line number Diff line
@@ -260,22 +260,20 @@ public class KeyguardService extends Service {
                );
            }

            public void mergeAnimation(IBinder transition, TransitionInfo info,
                    SurfaceControl.Transaction t, IBinder mergeTarget,
                    IRemoteTransitionFinishedCallback finishCallback) {
            public void mergeAnimation(IBinder candidateTransition, TransitionInfo candidateInfo,
                    SurfaceControl.Transaction candidateT, IBinder currentTransition,
                    IRemoteTransitionFinishedCallback candidateFinishCallback) {
                try {
                    final IRemoteTransitionFinishedCallback origFinishCB;
                    final IRemoteTransitionFinishedCallback currentFinishCB;
                    synchronized (mFinishCallbacks) {
                        origFinishCB = mFinishCallbacks.remove(transition);
                        currentFinishCB = mFinishCallbacks.remove(currentTransition);
                    }
                    info.releaseAllSurfaces();
                    t.close();
                    if (origFinishCB == null) {
                        // already finished (or not started yet), so do nothing.
                    if (currentFinishCB == null) {
                        Slog.e(TAG, "Called mergeAnimation, but finish callback is missing");
                        return;
                    }
                    runner.onAnimationCancelled(false /* isKeyguardOccluded */);
                    origFinishCB.onTransitionFinished(null /* wct */, null /* t */);
                    currentFinishCB.onTransitionFinished(null /* wct */, null /* t */);
                } catch (RemoteException e) {
                    // nothing, we'll just let it finish on its own I guess.
                }
+8 −16
Original line number Diff line number Diff line
@@ -958,14 +958,12 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable,

                @Override
                public void onAnimationCancelled(boolean isKeyguardOccluded) {
                    mContext.getMainExecutor().execute(() -> {
                        if (mOccludeByDreamAnimator != null) {
                            mOccludeByDreamAnimator.cancel();
                        }
                    setOccluded(isKeyguardOccluded /* isOccluded */, false /* animate */);
                    if (DEBUG) {
                        Log.d(TAG, "Occlude by Dream animation cancelled. Occluded state is now: "
                                + mOccluded);
                    }
                    });
                    Log.d(TAG, "Occlude by Dream animation cancelled.");
                }

                @Override
@@ -1071,10 +1069,7 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable,
                        }
                    });

                    setOccluded(isKeyguardOccluded /* isOccluded */, false /* animate */);
                    Log.d(TAG, "Unocclude animation cancelled. Occluded state is now: "
                            + mOccluded);

                    Log.d(TAG, "Unocclude animation cancelled.");
                    mInteractionJankMonitor.cancel(CUJ_LOCKSCREEN_OCCLUSION);
                }

@@ -3441,10 +3436,7 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable,
        public void onAnimationCancelled(boolean isKeyguardOccluded) throws RemoteException {
            super.onAnimationCancelled(isKeyguardOccluded);

            Log.d(TAG, "Occlude animation cancelled by WM. "
                    + "Setting occluded state to: " + isKeyguardOccluded);
            setOccluded(isKeyguardOccluded /* occluded */, false /* animate */);

            Log.d(TAG, "Occlude animation cancelled by WM.");
            mInteractionJankMonitor.cancel(CUJ_LOCKSCREEN_OCCLUSION);
        }
    }
+6 −0
Original line number Diff line number Diff line
@@ -54,6 +54,7 @@ public class NotificationsQuickSettingsContainer extends ConstraintLayout
    private Consumer<QS> mQSFragmentAttachedListener = qs -> {};
    private QS mQs;
    private View mQSContainer;
    private int mLastQSPaddingBottom;

    @Nullable
    private Consumer<Configuration> mConfigurationChangedListener;
@@ -75,6 +76,10 @@ public class NotificationsQuickSettingsContainer extends ConstraintLayout
        mQs = (QS) fragment;
        mQSFragmentAttachedListener.accept(mQs);
        mQSContainer = mQs.getView().findViewById(R.id.quick_settings_container);
        // We need to restore the bottom padding as the fragment may have been recreated due to
        // some special Configuration change, so we apply the last known padding (this will be
        // correct even if it has changed while the fragment was destroyed and re-created).
        setQSContainerPaddingBottom(mLastQSPaddingBottom);
    }

    @Override
@@ -101,6 +106,7 @@ public class NotificationsQuickSettingsContainer extends ConstraintLayout
    }

    public void setQSContainerPaddingBottom(int paddingBottom) {
        mLastQSPaddingBottom = paddingBottom;
        if (mQSContainer != null) {
            mQSContainer.setPadding(
                    mQSContainer.getPaddingLeft(),
+19 −5
Original line number Diff line number Diff line
@@ -414,6 +414,7 @@ public class VolumeDialogImpl implements VolumeDialog, Dumpable,

    @Override
    public void destroy() {
        Log.d(TAG, "destroy() called");
        mController.removeCallback(mControllerCallbackH);
        mHandler.removeCallbacksAndMessages(null);
        mConfigurationController.removeCallback(this);
@@ -488,6 +489,7 @@ public class VolumeDialogImpl implements VolumeDialog, Dumpable,
    }

    private void initDialog(int lockTaskModeState) {
        Log.d(TAG, "initDialog: called!");
        mDialog = new CustomDialog(mContext);

        initDimens();
@@ -1281,7 +1283,7 @@ public class VolumeDialogImpl implements VolumeDialog, Dumpable,
    }

    protected void tryToRemoveCaptionsTooltip() {
        if (mHasSeenODICaptionsTooltip && mODICaptionsTooltipView != null) {
        if (mHasSeenODICaptionsTooltip && mODICaptionsTooltipView != null && mDialog != null) {
            ViewGroup container = mDialog.findViewById(R.id.volume_dialog_container);
            container.removeView(mODICaptionsTooltipView);
            mODICaptionsTooltipView = null;
@@ -1471,8 +1473,16 @@ public class VolumeDialogImpl implements VolumeDialog, Dumpable,

        mHandler.removeMessages(H.DISMISS);
        mHandler.removeMessages(H.SHOW);
        if (mIsAnimatingDismiss) {
            Log.d(TAG, "dismissH: isAnimatingDismiss");

        boolean showingStateInconsistent = !mShowing && mDialog != null && mDialog.isShowing();
        // If incorrectly assuming dialog is not showing, continue and make the state consistent.
        if (showingStateInconsistent) {
            Log.d(TAG, "dismissH: volume dialog possible in inconsistent state:"
                    + "mShowing=" + mShowing + ", mDialog==null?" + (mDialog == null));
        }
        if (mIsAnimatingDismiss && !showingStateInconsistent) {
            Log.d(TAG, "dismissH: skipping dismiss because isAnimatingDismiss is true"
                    + " and showingStateInconsistent is false");
            Trace.endSection();
            return;
        }
@@ -1490,8 +1500,12 @@ public class VolumeDialogImpl implements VolumeDialog, Dumpable,
                .setDuration(mDialogHideAnimationDurationMs)
                .setInterpolator(new SystemUIInterpolators.LogAccelerateInterpolator())
                .withEndAction(() -> mHandler.postDelayed(() -> {
                    if (mController != null) {
                        mController.notifyVisible(false);
                    }
                    if (mDialog != null) {
                        mDialog.dismiss();
                    }
                    tryToRemoveCaptionsTooltip();
                    mIsAnimatingDismiss = false;

Loading