Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationWakeUpCoordinator.kt +11 −0 Original line number Diff line number Diff line Loading @@ -147,6 +147,17 @@ class NotificationWakeUpCoordinator @Inject constructor( mHeadsUpManagerPhone.addListener(this) statusBarStateController.addCallback(this) mDozeParameters = DozeParameters.getInstance(mContext) addListener(object : WakeUpListener { override fun onFullyHiddenChanged(isFullyHidden: Boolean) { if (isFullyHidden && mNotificationsVisibleForExpansion) { // When the notification becomes fully invisible, let's make sure our expansion // flag also changes. This can happen if the bouncer shows when dragging down // and then the screen turning off, where we don't reset this state. setNotificationsVisibleForExpansion(visible = false, animate = false, increaseSpeed = false) } } }); } fun setStackScroller(stackScroller: NotificationStackScrollLayout) { Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ChannelEditorDialogController.kt +6 −1 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ import android.app.NotificationChannel.DEFAULT_CHANNEL_ID import android.app.NotificationChannelGroup import android.app.NotificationManager.IMPORTANCE_NONE import android.content.Context import android.content.DialogInterface import android.graphics.Color import android.graphics.PixelFormat import android.graphics.drawable.Drawable Loading Loading @@ -171,7 +172,6 @@ class ChannelEditorDialogController @Inject constructor( private fun done() { resetState() dialog.dismiss() onFinishListener?.onChannelEditorDialogFinished() } private fun resetState() { Loading Loading @@ -261,6 +261,11 @@ class ChannelEditorDialogController @Inject constructor( dialog.apply { setContentView(R.layout.notif_half_shelf) setCanceledOnTouchOutside(true) setOnDismissListener(object : DialogInterface.OnDismissListener { override fun onDismiss(dialog: DialogInterface?) { onFinishListener?.onChannelEditorDialogFinished() } }) findViewById<ChannelEditorListView>(R.id.half_shelf_container).apply { controller = this@ChannelEditorDialogController appIcon = this@ChannelEditorDialogController.appIcon Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackScrollAlgorithm.java +5 −2 Original line number Diff line number Diff line Loading @@ -161,6 +161,7 @@ public class StackScrollAlgorithm { : 0; float clipStart = 0; int childCount = algorithmState.visibleChildren.size(); boolean firstHeadsUp = true; for (int i = 0; i < childCount; i++) { ExpandableView child = algorithmState.visibleChildren.get(i); ExpandableViewState state = child.getViewState(); Loading @@ -173,7 +174,7 @@ public class StackScrollAlgorithm { boolean isHeadsUp = (child instanceof ExpandableNotificationRow) && ((ExpandableNotificationRow) child).isPinned(); if (mClipNotificationScrollToTop && (!state.inShelf || isHeadsUp) && (!state.inShelf || (isHeadsUp && !firstHeadsUp)) && newYTranslation < clipStart) { // The previous view is overlapping on top, clip! float overlapAmount = clipStart - newYTranslation; Loading @@ -181,7 +182,9 @@ public class StackScrollAlgorithm { } else { state.clipTopAmount = 0; } if (isHeadsUp) { firstHeadsUp = false; } if (!child.isTransparent()) { // Only update the previous values if we are not transparent, // otherwise we would clip to a transparent view. Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/ButtonDispatcher.java +3 −2 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.systemui.statusbar.phone; import static com.android.systemui.Interpolators.ALPHA_IN; import static com.android.systemui.Interpolators.ALPHA_OUT; import static com.android.systemui.Interpolators.LINEAR; import android.animation.Animator; import android.animation.AnimatorListenerAdapter; Loading @@ -33,7 +34,7 @@ import java.util.ArrayList; */ public class ButtonDispatcher { private final static int FADE_DURATION_IN = 150; private final static int FADE_DURATION_OUT = 100; private final static int FADE_DURATION_OUT = 1000; private final ArrayList<View> mViews = new ArrayList<>(); Loading Loading @@ -178,7 +179,7 @@ public class ButtonDispatcher { setVisibility(View.VISIBLE); mFadeAnimator = ValueAnimator.ofFloat(getAlpha(), alpha); mFadeAnimator.setDuration(duration); mFadeAnimator.setInterpolator(getAlpha() < alpha ? ALPHA_IN : ALPHA_OUT); mFadeAnimator.setInterpolator(LINEAR); mFadeAnimator.addListener(mFadeListener); mFadeAnimator.addUpdateListener(mAlphaListener); mFadeAnimator.start(); Loading services/core/java/com/android/server/wm/ActivityStarter.java +19 −0 Original line number Diff line number Diff line Loading @@ -187,6 +187,7 @@ class ActivityStarter { private boolean mNoAnimation; private boolean mKeepCurTransition; private boolean mAvoidMoveToFront; private boolean mFrozeTaskList; // We must track when we deliver the new intent since multiple code paths invoke // {@link #deliverNewIntent}. This is due to early returns in the code path. This flag is used Loading Loading @@ -483,6 +484,7 @@ class ActivityStarter { mNoAnimation = starter.mNoAnimation; mKeepCurTransition = starter.mKeepCurTransition; mAvoidMoveToFront = starter.mAvoidMoveToFront; mFrozeTaskList = starter.mFrozeTaskList; mVoiceSession = starter.mVoiceSession; mVoiceInteractor = starter.mVoiceInteractor; Loading Loading @@ -1093,6 +1095,14 @@ class ActivityStarter { void postStartActivityProcessing(ActivityRecord r, int result, ActivityStack startedActivityStack) { if (!ActivityManager.isStartResultSuccessful(result)) { if (mFrozeTaskList) { // If we specifically froze the task list as part of starting an activity, then // reset the frozen list state if it failed to start. This is normally otherwise // called when the freeze-timeout has elapsed. mSupervisor.mRecentTasks.resetFreezeTaskListReorderingOnTimeout(); } } if (ActivityManager.isStartResultFatalError(result)) { return; } Loading Loading @@ -1485,6 +1495,14 @@ class ActivityStarter { mLaunchParams.hasPreferredDisplay() ? mLaunchParams.mPreferredDisplayId : DEFAULT_DISPLAY; // If requested, freeze the task list if (mOptions != null && mOptions.freezeRecentTasksReordering() && mSupervisor.mRecentTasks.isCallerRecents(r.launchedFromUid) && !mSupervisor.mRecentTasks.isFreezeTaskListReorderingSet()) { mFrozeTaskList = true; mSupervisor.mRecentTasks.setFreezeTaskListReordering(); } // Do not start home activity if it cannot be launched on preferred display. We are not // doing this in ActivityStackSupervisor#canPlaceEntityOnDisplay because it might // fallback to launch on other displays. Loading Loading @@ -1775,6 +1793,7 @@ class ActivityStarter { mNoAnimation = false; mKeepCurTransition = false; mAvoidMoveToFront = false; mFrozeTaskList = false; mVoiceSession = null; mVoiceInteractor = null; Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationWakeUpCoordinator.kt +11 −0 Original line number Diff line number Diff line Loading @@ -147,6 +147,17 @@ class NotificationWakeUpCoordinator @Inject constructor( mHeadsUpManagerPhone.addListener(this) statusBarStateController.addCallback(this) mDozeParameters = DozeParameters.getInstance(mContext) addListener(object : WakeUpListener { override fun onFullyHiddenChanged(isFullyHidden: Boolean) { if (isFullyHidden && mNotificationsVisibleForExpansion) { // When the notification becomes fully invisible, let's make sure our expansion // flag also changes. This can happen if the bouncer shows when dragging down // and then the screen turning off, where we don't reset this state. setNotificationsVisibleForExpansion(visible = false, animate = false, increaseSpeed = false) } } }); } fun setStackScroller(stackScroller: NotificationStackScrollLayout) { Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ChannelEditorDialogController.kt +6 −1 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ import android.app.NotificationChannel.DEFAULT_CHANNEL_ID import android.app.NotificationChannelGroup import android.app.NotificationManager.IMPORTANCE_NONE import android.content.Context import android.content.DialogInterface import android.graphics.Color import android.graphics.PixelFormat import android.graphics.drawable.Drawable Loading Loading @@ -171,7 +172,6 @@ class ChannelEditorDialogController @Inject constructor( private fun done() { resetState() dialog.dismiss() onFinishListener?.onChannelEditorDialogFinished() } private fun resetState() { Loading Loading @@ -261,6 +261,11 @@ class ChannelEditorDialogController @Inject constructor( dialog.apply { setContentView(R.layout.notif_half_shelf) setCanceledOnTouchOutside(true) setOnDismissListener(object : DialogInterface.OnDismissListener { override fun onDismiss(dialog: DialogInterface?) { onFinishListener?.onChannelEditorDialogFinished() } }) findViewById<ChannelEditorListView>(R.id.half_shelf_container).apply { controller = this@ChannelEditorDialogController appIcon = this@ChannelEditorDialogController.appIcon Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackScrollAlgorithm.java +5 −2 Original line number Diff line number Diff line Loading @@ -161,6 +161,7 @@ public class StackScrollAlgorithm { : 0; float clipStart = 0; int childCount = algorithmState.visibleChildren.size(); boolean firstHeadsUp = true; for (int i = 0; i < childCount; i++) { ExpandableView child = algorithmState.visibleChildren.get(i); ExpandableViewState state = child.getViewState(); Loading @@ -173,7 +174,7 @@ public class StackScrollAlgorithm { boolean isHeadsUp = (child instanceof ExpandableNotificationRow) && ((ExpandableNotificationRow) child).isPinned(); if (mClipNotificationScrollToTop && (!state.inShelf || isHeadsUp) && (!state.inShelf || (isHeadsUp && !firstHeadsUp)) && newYTranslation < clipStart) { // The previous view is overlapping on top, clip! float overlapAmount = clipStart - newYTranslation; Loading @@ -181,7 +182,9 @@ public class StackScrollAlgorithm { } else { state.clipTopAmount = 0; } if (isHeadsUp) { firstHeadsUp = false; } if (!child.isTransparent()) { // Only update the previous values if we are not transparent, // otherwise we would clip to a transparent view. Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/ButtonDispatcher.java +3 −2 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.systemui.statusbar.phone; import static com.android.systemui.Interpolators.ALPHA_IN; import static com.android.systemui.Interpolators.ALPHA_OUT; import static com.android.systemui.Interpolators.LINEAR; import android.animation.Animator; import android.animation.AnimatorListenerAdapter; Loading @@ -33,7 +34,7 @@ import java.util.ArrayList; */ public class ButtonDispatcher { private final static int FADE_DURATION_IN = 150; private final static int FADE_DURATION_OUT = 100; private final static int FADE_DURATION_OUT = 1000; private final ArrayList<View> mViews = new ArrayList<>(); Loading Loading @@ -178,7 +179,7 @@ public class ButtonDispatcher { setVisibility(View.VISIBLE); mFadeAnimator = ValueAnimator.ofFloat(getAlpha(), alpha); mFadeAnimator.setDuration(duration); mFadeAnimator.setInterpolator(getAlpha() < alpha ? ALPHA_IN : ALPHA_OUT); mFadeAnimator.setInterpolator(LINEAR); mFadeAnimator.addListener(mFadeListener); mFadeAnimator.addUpdateListener(mAlphaListener); mFadeAnimator.start(); Loading
services/core/java/com/android/server/wm/ActivityStarter.java +19 −0 Original line number Diff line number Diff line Loading @@ -187,6 +187,7 @@ class ActivityStarter { private boolean mNoAnimation; private boolean mKeepCurTransition; private boolean mAvoidMoveToFront; private boolean mFrozeTaskList; // We must track when we deliver the new intent since multiple code paths invoke // {@link #deliverNewIntent}. This is due to early returns in the code path. This flag is used Loading Loading @@ -483,6 +484,7 @@ class ActivityStarter { mNoAnimation = starter.mNoAnimation; mKeepCurTransition = starter.mKeepCurTransition; mAvoidMoveToFront = starter.mAvoidMoveToFront; mFrozeTaskList = starter.mFrozeTaskList; mVoiceSession = starter.mVoiceSession; mVoiceInteractor = starter.mVoiceInteractor; Loading Loading @@ -1093,6 +1095,14 @@ class ActivityStarter { void postStartActivityProcessing(ActivityRecord r, int result, ActivityStack startedActivityStack) { if (!ActivityManager.isStartResultSuccessful(result)) { if (mFrozeTaskList) { // If we specifically froze the task list as part of starting an activity, then // reset the frozen list state if it failed to start. This is normally otherwise // called when the freeze-timeout has elapsed. mSupervisor.mRecentTasks.resetFreezeTaskListReorderingOnTimeout(); } } if (ActivityManager.isStartResultFatalError(result)) { return; } Loading Loading @@ -1485,6 +1495,14 @@ class ActivityStarter { mLaunchParams.hasPreferredDisplay() ? mLaunchParams.mPreferredDisplayId : DEFAULT_DISPLAY; // If requested, freeze the task list if (mOptions != null && mOptions.freezeRecentTasksReordering() && mSupervisor.mRecentTasks.isCallerRecents(r.launchedFromUid) && !mSupervisor.mRecentTasks.isFreezeTaskListReorderingSet()) { mFrozeTaskList = true; mSupervisor.mRecentTasks.setFreezeTaskListReordering(); } // Do not start home activity if it cannot be launched on preferred display. We are not // doing this in ActivityStackSupervisor#canPlaceEntityOnDisplay because it might // fallback to launch on other displays. Loading Loading @@ -1775,6 +1793,7 @@ class ActivityStarter { mNoAnimation = false; mKeepCurTransition = false; mAvoidMoveToFront = false; mFrozeTaskList = false; mVoiceSession = null; mVoiceInteractor = null; Loading