Merge "Interpolate corner to 0 when recording screen" into sc-dev am: e98202ed30

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15276891

Change-Id: I074e70070eeccb10b804265765a6c50515507402
This commit is contained in:
Lucas Dupin
2021-07-14 15:40:07 +00:00
committed by Automerger Merge Worker
2 changed files with 10 additions and 1 deletions

View File

@@ -113,6 +113,7 @@ import com.android.systemui.plugins.qs.QS;
import com.android.systemui.plugins.statusbar.StatusBarStateController; import com.android.systemui.plugins.statusbar.StatusBarStateController;
import com.android.systemui.plugins.statusbar.StatusBarStateController.StateListener; import com.android.systemui.plugins.statusbar.StatusBarStateController.StateListener;
import com.android.systemui.qs.QSDetailDisplayer; import com.android.systemui.qs.QSDetailDisplayer;
import com.android.systemui.screenrecord.RecordingController;
import com.android.systemui.shared.system.QuickStepContract; import com.android.systemui.shared.system.QuickStepContract;
import com.android.systemui.statusbar.CommandQueue; import com.android.systemui.statusbar.CommandQueue;
import com.android.systemui.statusbar.FeatureFlags; import com.android.systemui.statusbar.FeatureFlags;
@@ -327,6 +328,7 @@ public class NotificationPanelViewController extends PanelViewController {
private final int mMaxKeyguardNotifications; private final int mMaxKeyguardNotifications;
private final LockscreenShadeTransitionController mLockscreenShadeTransitionController; private final LockscreenShadeTransitionController mLockscreenShadeTransitionController;
private final TapAgainViewController mTapAgainViewController; private final TapAgainViewController mTapAgainViewController;
private final RecordingController mRecordingController;
private boolean mShouldUseSplitNotificationShade; private boolean mShouldUseSplitNotificationShade;
// Current max allowed keyguard notifications determined by measuring the panel // Current max allowed keyguard notifications determined by measuring the panel
private int mMaxAllowedKeyguardNotifications; private int mMaxAllowedKeyguardNotifications;
@@ -711,6 +713,7 @@ public class NotificationPanelViewController extends PanelViewController {
FragmentService fragmentService, FragmentService fragmentService,
ContentResolver contentResolver, ContentResolver contentResolver,
QuickAccessWalletController quickAccessWalletController, QuickAccessWalletController quickAccessWalletController,
RecordingController recordingController,
@Main Executor uiExecutor, @Main Executor uiExecutor,
SecureSettings secureSettings, SecureSettings secureSettings,
UnlockedScreenOffAnimationController unlockedScreenOffAnimationController, UnlockedScreenOffAnimationController unlockedScreenOffAnimationController,
@@ -755,6 +758,7 @@ public class NotificationPanelViewController extends PanelViewController {
mView.setAccessibilityPaneTitle(determineAccessibilityPaneTitle()); mView.setAccessibilityPaneTitle(determineAccessibilityPaneTitle());
setPanelAlpha(255, false /* animate */); setPanelAlpha(255, false /* animate */);
mCommandQueue = commandQueue; mCommandQueue = commandQueue;
mRecordingController = recordingController;
mDisplayId = displayId; mDisplayId = displayId;
mPulseExpansionHandler = pulseExpansionHandler; mPulseExpansionHandler = pulseExpansionHandler;
mDozeParameters = dozeParameters; mDozeParameters = dozeParameters;
@@ -2359,7 +2363,8 @@ public class NotificationPanelViewController extends PanelViewController {
// The padding on this area is large enough that we can use a cheaper clipping strategy // The padding on this area is large enough that we can use a cheaper clipping strategy
mKeyguardStatusAreaClipBounds.set(left, top, right, bottom); mKeyguardStatusAreaClipBounds.set(left, top, right, bottom);
clipStatusView = qsVisible; clipStatusView = qsVisible;
radius = (int) MathUtils.lerp(mScreenCornerRadius, mScrimCornerRadius, float screenCornerRadius = mRecordingController.isRecording() ? 0 : mScreenCornerRadius;
radius = (int) MathUtils.lerp(screenCornerRadius, mScrimCornerRadius,
Math.min(top / (float) mScrimCornerRadius, 1f)); Math.min(top / (float) mScrimCornerRadius, 1f));
statusBarClipTop = top - mKeyguardStatusBar.getTop(); statusBarClipTop = top - mKeyguardStatusBar.getTop();
} }

View File

@@ -94,6 +94,7 @@ import com.android.systemui.media.MediaHierarchyManager;
import com.android.systemui.navigationbar.NavigationModeController; import com.android.systemui.navigationbar.NavigationModeController;
import com.android.systemui.plugins.FalsingManager; import com.android.systemui.plugins.FalsingManager;
import com.android.systemui.qs.QSDetailDisplayer; import com.android.systemui.qs.QSDetailDisplayer;
import com.android.systemui.screenrecord.RecordingController;
import com.android.systemui.statusbar.CommandQueue; import com.android.systemui.statusbar.CommandQueue;
import com.android.systemui.statusbar.FeatureFlags; import com.android.systemui.statusbar.FeatureFlags;
import com.android.systemui.statusbar.KeyguardAffordanceView; import com.android.systemui.statusbar.KeyguardAffordanceView;
@@ -295,6 +296,8 @@ public class NotificationPanelViewTest extends SysuiTestCase {
private NotificationRemoteInputManager mNotificationRemoteInputManager; private NotificationRemoteInputManager mNotificationRemoteInputManager;
@Mock @Mock
private RemoteInputController mRemoteInputController; private RemoteInputController mRemoteInputController;
@Mock
private RecordingController mRecordingController;
private SysuiStatusBarStateController mStatusBarStateController; private SysuiStatusBarStateController mStatusBarStateController;
private NotificationPanelViewController mNotificationPanelViewController; private NotificationPanelViewController mNotificationPanelViewController;
@@ -433,6 +436,7 @@ public class NotificationPanelViewTest extends SysuiTestCase {
mFragmentService, mFragmentService,
mContentResolver, mContentResolver,
mQuickAccessWalletController, mQuickAccessWalletController,
mRecordingController,
new FakeExecutor(new FakeSystemClock()), new FakeExecutor(new FakeSystemClock()),
mSecureSettings, mSecureSettings,
mUnlockedScreenOffAnimationController, mUnlockedScreenOffAnimationController,