Merge "Code cleanup pass on all of NPVC" into tm-qpr-dev
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -663,7 +663,7 @@ class LockscreenShadeTransitionController @Inject constructor(
|
|||||||
} else {
|
} else {
|
||||||
pulseHeight = height
|
pulseHeight = height
|
||||||
val overflow = nsslController.setPulseHeight(height)
|
val overflow = nsslController.setPulseHeight(height)
|
||||||
notificationPanelController.setOverStrechAmount(overflow)
|
notificationPanelController.setOverStretchAmount(overflow)
|
||||||
val transitionHeight = if (keyguardBypassController.bypassEnabled) height else 0.0f
|
val transitionHeight = if (keyguardBypassController.bypassEnabled) height else 0.0f
|
||||||
transitionToShadeAmountCommon(transitionHeight)
|
transitionToShadeAmountCommon(transitionHeight)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3487,10 +3487,7 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces {
|
|||||||
mNavigationBarController.showPinningEscapeToast(mDisplayId);
|
mNavigationBarController.showPinningEscapeToast(mDisplayId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
//TODO(b/254875405): this should be removed.
|
||||||
* TODO: Remove this method. Views should not be passed forward. Will cause theme issues.
|
|
||||||
* @return bottom area view
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public KeyguardBottomAreaView getKeyguardBottomAreaView() {
|
public KeyguardBottomAreaView getKeyguardBottomAreaView() {
|
||||||
return mNotificationPanelViewController.getKeyguardBottomAreaView();
|
return mNotificationPanelViewController.getKeyguardBottomAreaView();
|
||||||
@@ -4203,7 +4200,7 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void onBouncerPreHideAnimation() {
|
public void onBouncerPreHideAnimation() {
|
||||||
mNotificationPanelViewController.onBouncerPreHideAnimation();
|
mNotificationPanelViewController.startBouncerPreHideAnimation();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -129,7 +129,6 @@ import com.android.systemui.statusbar.QsFrameTranslateController;
|
|||||||
import com.android.systemui.statusbar.StatusBarStateControllerImpl;
|
import com.android.systemui.statusbar.StatusBarStateControllerImpl;
|
||||||
import com.android.systemui.statusbar.SysuiStatusBarStateController;
|
import com.android.systemui.statusbar.SysuiStatusBarStateController;
|
||||||
import com.android.systemui.statusbar.VibratorHelper;
|
import com.android.systemui.statusbar.VibratorHelper;
|
||||||
import com.android.systemui.statusbar.events.PrivacyDotViewController;
|
|
||||||
import com.android.systemui.statusbar.notification.ConversationNotificationManager;
|
import com.android.systemui.statusbar.notification.ConversationNotificationManager;
|
||||||
import com.android.systemui.statusbar.notification.DynamicPrivacyController;
|
import com.android.systemui.statusbar.notification.DynamicPrivacyController;
|
||||||
import com.android.systemui.statusbar.notification.NotificationWakeUpCoordinator;
|
import com.android.systemui.statusbar.notification.NotificationWakeUpCoordinator;
|
||||||
@@ -153,7 +152,6 @@ import com.android.systemui.statusbar.phone.KeyguardBypassController;
|
|||||||
import com.android.systemui.statusbar.phone.KeyguardStatusBarView;
|
import com.android.systemui.statusbar.phone.KeyguardStatusBarView;
|
||||||
import com.android.systemui.statusbar.phone.KeyguardStatusBarViewController;
|
import com.android.systemui.statusbar.phone.KeyguardStatusBarViewController;
|
||||||
import com.android.systemui.statusbar.phone.LockscreenGestureLogger;
|
import com.android.systemui.statusbar.phone.LockscreenGestureLogger;
|
||||||
import com.android.systemui.statusbar.phone.NotificationIconAreaController;
|
|
||||||
import com.android.systemui.statusbar.phone.ScreenOffAnimationController;
|
import com.android.systemui.statusbar.phone.ScreenOffAnimationController;
|
||||||
import com.android.systemui.statusbar.phone.ScrimController;
|
import com.android.systemui.statusbar.phone.ScrimController;
|
||||||
import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager;
|
import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager;
|
||||||
@@ -199,7 +197,6 @@ public class NotificationPanelViewControllerTest extends SysuiTestCase {
|
|||||||
@Mock private KeyguardBottomAreaView mKeyguardBottomArea;
|
@Mock private KeyguardBottomAreaView mKeyguardBottomArea;
|
||||||
@Mock private KeyguardBottomAreaViewController mKeyguardBottomAreaViewController;
|
@Mock private KeyguardBottomAreaViewController mKeyguardBottomAreaViewController;
|
||||||
@Mock private KeyguardBottomAreaView mQsFrame;
|
@Mock private KeyguardBottomAreaView mQsFrame;
|
||||||
@Mock private NotificationIconAreaController mNotificationAreaController;
|
|
||||||
@Mock private HeadsUpManagerPhone mHeadsUpManager;
|
@Mock private HeadsUpManagerPhone mHeadsUpManager;
|
||||||
@Mock private NotificationShelfController mNotificationShelfController;
|
@Mock private NotificationShelfController mNotificationShelfController;
|
||||||
@Mock private KeyguardStatusBarView mKeyguardStatusBar;
|
@Mock private KeyguardStatusBarView mKeyguardStatusBar;
|
||||||
@@ -227,7 +224,7 @@ public class NotificationPanelViewControllerTest extends SysuiTestCase {
|
|||||||
@Mock private Resources mResources;
|
@Mock private Resources mResources;
|
||||||
@Mock private Configuration mConfiguration;
|
@Mock private Configuration mConfiguration;
|
||||||
@Mock private KeyguardClockSwitch mKeyguardClockSwitch;
|
@Mock private KeyguardClockSwitch mKeyguardClockSwitch;
|
||||||
@Mock private MediaHierarchyManager mMediaHiearchyManager;
|
@Mock private MediaHierarchyManager mMediaHierarchyManager;
|
||||||
@Mock private ConversationNotificationManager mConversationNotificationManager;
|
@Mock private ConversationNotificationManager mConversationNotificationManager;
|
||||||
@Mock private StatusBarKeyguardViewManager mStatusBarKeyguardViewManager;
|
@Mock private StatusBarKeyguardViewManager mStatusBarKeyguardViewManager;
|
||||||
@Mock private KeyguardStatusViewComponent.Factory mKeyguardStatusViewComponentFactory;
|
@Mock private KeyguardStatusViewComponent.Factory mKeyguardStatusViewComponentFactory;
|
||||||
@@ -254,7 +251,6 @@ public class NotificationPanelViewControllerTest extends SysuiTestCase {
|
|||||||
@Mock private UiEventLogger mUiEventLogger;
|
@Mock private UiEventLogger mUiEventLogger;
|
||||||
@Mock private LockIconViewController mLockIconViewController;
|
@Mock private LockIconViewController mLockIconViewController;
|
||||||
@Mock private KeyguardMediaController mKeyguardMediaController;
|
@Mock private KeyguardMediaController mKeyguardMediaController;
|
||||||
@Mock private PrivacyDotViewController mPrivacyDotViewController;
|
|
||||||
@Mock private NavigationModeController mNavigationModeController;
|
@Mock private NavigationModeController mNavigationModeController;
|
||||||
@Mock private NavigationBarController mNavigationBarController;
|
@Mock private NavigationBarController mNavigationBarController;
|
||||||
@Mock private LargeScreenShadeHeaderController mLargeScreenShadeHeaderController;
|
@Mock private LargeScreenShadeHeaderController mLargeScreenShadeHeaderController;
|
||||||
@@ -294,7 +290,7 @@ public class NotificationPanelViewControllerTest extends SysuiTestCase {
|
|||||||
private ConfigurationController mConfigurationController;
|
private ConfigurationController mConfigurationController;
|
||||||
private SysuiStatusBarStateController mStatusBarStateController;
|
private SysuiStatusBarStateController mStatusBarStateController;
|
||||||
private NotificationPanelViewController mNotificationPanelViewController;
|
private NotificationPanelViewController mNotificationPanelViewController;
|
||||||
private View.AccessibilityDelegate mAccessibiltyDelegate;
|
private View.AccessibilityDelegate mAccessibilityDelegate;
|
||||||
private NotificationsQuickSettingsContainer mNotificationContainerParent;
|
private NotificationsQuickSettingsContainer mNotificationContainerParent;
|
||||||
private List<View.OnAttachStateChangeListener> mOnAttachStateChangeListeners;
|
private List<View.OnAttachStateChangeListener> mOnAttachStateChangeListeners;
|
||||||
private Handler mMainHandler;
|
private Handler mMainHandler;
|
||||||
@@ -456,7 +452,7 @@ public class NotificationPanelViewControllerTest extends SysuiTestCase {
|
|||||||
mShadeLog,
|
mShadeLog,
|
||||||
mConfigurationController,
|
mConfigurationController,
|
||||||
() -> flingAnimationUtilsBuilder, mStatusBarTouchableRegionManager,
|
() -> flingAnimationUtilsBuilder, mStatusBarTouchableRegionManager,
|
||||||
mConversationNotificationManager, mMediaHiearchyManager,
|
mConversationNotificationManager, mMediaHierarchyManager,
|
||||||
mStatusBarKeyguardViewManager,
|
mStatusBarKeyguardViewManager,
|
||||||
mNotificationsQSContainerController,
|
mNotificationsQSContainerController,
|
||||||
mNotificationStackScrollLayoutController,
|
mNotificationStackScrollLayoutController,
|
||||||
@@ -465,7 +461,6 @@ public class NotificationPanelViewControllerTest extends SysuiTestCase {
|
|||||||
mKeyguardUserSwitcherComponentFactory,
|
mKeyguardUserSwitcherComponentFactory,
|
||||||
mKeyguardStatusBarViewComponentFactory,
|
mKeyguardStatusBarViewComponentFactory,
|
||||||
mLockscreenShadeTransitionController,
|
mLockscreenShadeTransitionController,
|
||||||
mNotificationAreaController,
|
|
||||||
mAuthController,
|
mAuthController,
|
||||||
mScrimController,
|
mScrimController,
|
||||||
mUserManager,
|
mUserManager,
|
||||||
@@ -474,7 +469,6 @@ public class NotificationPanelViewControllerTest extends SysuiTestCase {
|
|||||||
mAmbientState,
|
mAmbientState,
|
||||||
mLockIconViewController,
|
mLockIconViewController,
|
||||||
mKeyguardMediaController,
|
mKeyguardMediaController,
|
||||||
mPrivacyDotViewController,
|
|
||||||
mTapAgainViewController,
|
mTapAgainViewController,
|
||||||
mNavigationModeController,
|
mNavigationModeController,
|
||||||
mNavigationBarController,
|
mNavigationBarController,
|
||||||
@@ -516,9 +510,9 @@ public class NotificationPanelViewControllerTest extends SysuiTestCase {
|
|||||||
ArgumentCaptor<View.AccessibilityDelegate> accessibilityDelegateArgumentCaptor =
|
ArgumentCaptor<View.AccessibilityDelegate> accessibilityDelegateArgumentCaptor =
|
||||||
ArgumentCaptor.forClass(View.AccessibilityDelegate.class);
|
ArgumentCaptor.forClass(View.AccessibilityDelegate.class);
|
||||||
verify(mView).setAccessibilityDelegate(accessibilityDelegateArgumentCaptor.capture());
|
verify(mView).setAccessibilityDelegate(accessibilityDelegateArgumentCaptor.capture());
|
||||||
mAccessibiltyDelegate = accessibilityDelegateArgumentCaptor.getValue();
|
mAccessibilityDelegate = accessibilityDelegateArgumentCaptor.getValue();
|
||||||
mNotificationPanelViewController.getStatusBarStateController()
|
mNotificationPanelViewController.getStatusBarStateController()
|
||||||
.addCallback(mNotificationPanelViewController.mStatusBarStateListener);
|
.addCallback(mNotificationPanelViewController.getStatusBarStateListener());
|
||||||
mNotificationPanelViewController
|
mNotificationPanelViewController
|
||||||
.setHeadsUpAppearanceController(mock(HeadsUpAppearanceController.class));
|
.setHeadsUpAppearanceController(mock(HeadsUpAppearanceController.class));
|
||||||
verify(mNotificationStackScrollLayoutController)
|
verify(mNotificationStackScrollLayoutController)
|
||||||
@@ -773,8 +767,8 @@ public class NotificationPanelViewControllerTest extends SysuiTestCase {
|
|||||||
0L /* eventTime */, MotionEvent.ACTION_UP, 0f /* x */, 300f /* y */,
|
0L /* eventTime */, MotionEvent.ACTION_UP, 0f /* x */, 300f /* y */,
|
||||||
0 /* metaState */));
|
0 /* metaState */));
|
||||||
|
|
||||||
assertThat(mNotificationPanelViewController.getClosing()).isTrue();
|
assertThat(mNotificationPanelViewController.isClosing()).isTrue();
|
||||||
assertThat(mNotificationPanelViewController.getIsFlinging()).isTrue();
|
assertThat(mNotificationPanelViewController.isFlinging()).isTrue();
|
||||||
|
|
||||||
// simulate touch that does not exceed touch slop
|
// simulate touch that does not exceed touch slop
|
||||||
onTouchEvent(MotionEvent.obtain(2L /* downTime */,
|
onTouchEvent(MotionEvent.obtain(2L /* downTime */,
|
||||||
@@ -788,8 +782,8 @@ public class NotificationPanelViewControllerTest extends SysuiTestCase {
|
|||||||
0 /* metaState */));
|
0 /* metaState */));
|
||||||
|
|
||||||
// fling should still be called after a touch that does not exceed touch slop
|
// fling should still be called after a touch that does not exceed touch slop
|
||||||
assertThat(mNotificationPanelViewController.getClosing()).isTrue();
|
assertThat(mNotificationPanelViewController.isClosing()).isTrue();
|
||||||
assertThat(mNotificationPanelViewController.getIsFlinging()).isTrue();
|
assertThat(mNotificationPanelViewController.isFlinging()).isTrue();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -844,7 +838,7 @@ public class NotificationPanelViewControllerTest extends SysuiTestCase {
|
|||||||
@Test
|
@Test
|
||||||
public void testA11y_initializeNode() {
|
public void testA11y_initializeNode() {
|
||||||
AccessibilityNodeInfo nodeInfo = new AccessibilityNodeInfo();
|
AccessibilityNodeInfo nodeInfo = new AccessibilityNodeInfo();
|
||||||
mAccessibiltyDelegate.onInitializeAccessibilityNodeInfo(mView, nodeInfo);
|
mAccessibilityDelegate.onInitializeAccessibilityNodeInfo(mView, nodeInfo);
|
||||||
|
|
||||||
List<AccessibilityNodeInfo.AccessibilityAction> actionList = nodeInfo.getActionList();
|
List<AccessibilityNodeInfo.AccessibilityAction> actionList = nodeInfo.getActionList();
|
||||||
assertThat(actionList).containsAtLeastElementsIn(
|
assertThat(actionList).containsAtLeastElementsIn(
|
||||||
@@ -856,7 +850,7 @@ public class NotificationPanelViewControllerTest extends SysuiTestCase {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testA11y_scrollForward() {
|
public void testA11y_scrollForward() {
|
||||||
mAccessibiltyDelegate.performAccessibilityAction(
|
mAccessibilityDelegate.performAccessibilityAction(
|
||||||
mView,
|
mView,
|
||||||
AccessibilityNodeInfo.AccessibilityAction.ACTION_SCROLL_FORWARD.getId(),
|
AccessibilityNodeInfo.AccessibilityAction.ACTION_SCROLL_FORWARD.getId(),
|
||||||
null);
|
null);
|
||||||
@@ -866,7 +860,7 @@ public class NotificationPanelViewControllerTest extends SysuiTestCase {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testA11y_scrollUp() {
|
public void testA11y_scrollUp() {
|
||||||
mAccessibiltyDelegate.performAccessibilityAction(
|
mAccessibilityDelegate.performAccessibilityAction(
|
||||||
mView,
|
mView,
|
||||||
AccessibilityNodeInfo.AccessibilityAction.ACTION_SCROLL_UP.getId(),
|
AccessibilityNodeInfo.AccessibilityAction.ACTION_SCROLL_UP.getId(),
|
||||||
null);
|
null);
|
||||||
@@ -1329,11 +1323,11 @@ public class NotificationPanelViewControllerTest extends SysuiTestCase {
|
|||||||
public void testQsToBeImmediatelyExpandedWhenOpeningPanelInSplitShade() {
|
public void testQsToBeImmediatelyExpandedWhenOpeningPanelInSplitShade() {
|
||||||
enableSplitShade(/* enabled= */ true);
|
enableSplitShade(/* enabled= */ true);
|
||||||
mShadeExpansionStateManager.updateState(STATE_CLOSED);
|
mShadeExpansionStateManager.updateState(STATE_CLOSED);
|
||||||
assertThat(mNotificationPanelViewController.mQsExpandImmediate).isFalse();
|
assertThat(mNotificationPanelViewController.isQsExpandImmediate()).isFalse();
|
||||||
|
|
||||||
mShadeExpansionStateManager.updateState(STATE_OPENING);
|
mShadeExpansionStateManager.updateState(STATE_OPENING);
|
||||||
|
|
||||||
assertThat(mNotificationPanelViewController.mQsExpandImmediate).isTrue();
|
assertThat(mNotificationPanelViewController.isQsExpandImmediate()).isTrue();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -1345,18 +1339,18 @@ public class NotificationPanelViewControllerTest extends SysuiTestCase {
|
|||||||
// going to lockscreen would trigger STATE_OPENING
|
// going to lockscreen would trigger STATE_OPENING
|
||||||
mShadeExpansionStateManager.updateState(STATE_OPENING);
|
mShadeExpansionStateManager.updateState(STATE_OPENING);
|
||||||
|
|
||||||
assertThat(mNotificationPanelViewController.mQsExpandImmediate).isFalse();
|
assertThat(mNotificationPanelViewController.isQsExpandImmediate()).isFalse();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testQsImmediateResetsWhenPanelOpensOrCloses() {
|
public void testQsImmediateResetsWhenPanelOpensOrCloses() {
|
||||||
mNotificationPanelViewController.mQsExpandImmediate = true;
|
mNotificationPanelViewController.setQsExpandImmediate(true);
|
||||||
mShadeExpansionStateManager.updateState(STATE_OPEN);
|
mShadeExpansionStateManager.updateState(STATE_OPEN);
|
||||||
assertThat(mNotificationPanelViewController.mQsExpandImmediate).isFalse();
|
assertThat(mNotificationPanelViewController.isQsExpandImmediate()).isFalse();
|
||||||
|
|
||||||
mNotificationPanelViewController.mQsExpandImmediate = true;
|
mNotificationPanelViewController.setQsExpandImmediate(true);
|
||||||
mShadeExpansionStateManager.updateState(STATE_CLOSED);
|
mShadeExpansionStateManager.updateState(STATE_CLOSED);
|
||||||
assertThat(mNotificationPanelViewController.mQsExpandImmediate).isFalse();
|
assertThat(mNotificationPanelViewController.isQsExpandImmediate()).isFalse();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -1399,7 +1393,7 @@ public class NotificationPanelViewControllerTest extends SysuiTestCase {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void interceptTouchEvent_withinQs_shadeExpanded_startsQsTracking() {
|
public void interceptTouchEvent_withinQs_shadeExpanded_startsQsTracking() {
|
||||||
mNotificationPanelViewController.mQs = mQs;
|
mNotificationPanelViewController.setQs(mQs);
|
||||||
when(mQsFrame.getX()).thenReturn(0f);
|
when(mQsFrame.getX()).thenReturn(0f);
|
||||||
when(mQsFrame.getWidth()).thenReturn(1000);
|
when(mQsFrame.getWidth()).thenReturn(1000);
|
||||||
when(mQsHeader.getTop()).thenReturn(0);
|
when(mQsHeader.getTop()).thenReturn(0);
|
||||||
@@ -1419,7 +1413,7 @@ public class NotificationPanelViewControllerTest extends SysuiTestCase {
|
|||||||
@Test
|
@Test
|
||||||
public void interceptTouchEvent_withinQs_shadeExpanded_inSplitShade_doesNotStartQsTracking() {
|
public void interceptTouchEvent_withinQs_shadeExpanded_inSplitShade_doesNotStartQsTracking() {
|
||||||
enableSplitShade(true);
|
enableSplitShade(true);
|
||||||
mNotificationPanelViewController.mQs = mQs;
|
mNotificationPanelViewController.setQs(mQs);
|
||||||
when(mQsFrame.getX()).thenReturn(0f);
|
when(mQsFrame.getX()).thenReturn(0f);
|
||||||
when(mQsFrame.getWidth()).thenReturn(1000);
|
when(mQsFrame.getWidth()).thenReturn(1000);
|
||||||
when(mQsHeader.getTop()).thenReturn(0);
|
when(mQsHeader.getTop()).thenReturn(0);
|
||||||
@@ -1495,7 +1489,7 @@ public class NotificationPanelViewControllerTest extends SysuiTestCase {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void onLayoutChange_fullWidth_updatesQSWithFullWithTrue() {
|
public void onLayoutChange_fullWidth_updatesQSWithFullWithTrue() {
|
||||||
mNotificationPanelViewController.mQs = mQs;
|
mNotificationPanelViewController.setQs(mQs);
|
||||||
|
|
||||||
setIsFullWidth(true);
|
setIsFullWidth(true);
|
||||||
|
|
||||||
@@ -1504,7 +1498,7 @@ public class NotificationPanelViewControllerTest extends SysuiTestCase {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void onLayoutChange_notFullWidth_updatesQSWithFullWithFalse() {
|
public void onLayoutChange_notFullWidth_updatesQSWithFullWithFalse() {
|
||||||
mNotificationPanelViewController.mQs = mQs;
|
mNotificationPanelViewController.setQs(mQs);
|
||||||
|
|
||||||
setIsFullWidth(false);
|
setIsFullWidth(false);
|
||||||
|
|
||||||
@@ -1513,7 +1507,7 @@ public class NotificationPanelViewControllerTest extends SysuiTestCase {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void onLayoutChange_qsNotSet_doesNotCrash() {
|
public void onLayoutChange_qsNotSet_doesNotCrash() {
|
||||||
mNotificationPanelViewController.mQs = null;
|
mNotificationPanelViewController.setQs(null);
|
||||||
|
|
||||||
triggerLayoutChange();
|
triggerLayoutChange();
|
||||||
}
|
}
|
||||||
@@ -1539,7 +1533,7 @@ public class NotificationPanelViewControllerTest extends SysuiTestCase {
|
|||||||
@Test
|
@Test
|
||||||
public void setQsExpansion_lockscreenShadeTransitionInProgress_usesLockscreenSquishiness() {
|
public void setQsExpansion_lockscreenShadeTransitionInProgress_usesLockscreenSquishiness() {
|
||||||
float squishinessFraction = 0.456f;
|
float squishinessFraction = 0.456f;
|
||||||
mNotificationPanelViewController.mQs = mQs;
|
mNotificationPanelViewController.setQs(mQs);
|
||||||
when(mLockscreenShadeTransitionController.getQsSquishTransitionFraction())
|
when(mLockscreenShadeTransitionController.getQsSquishTransitionFraction())
|
||||||
.thenReturn(squishinessFraction);
|
.thenReturn(squishinessFraction);
|
||||||
when(mNotificationStackScrollLayoutController.getNotificationSquishinessFraction())
|
when(mNotificationStackScrollLayoutController.getNotificationSquishinessFraction())
|
||||||
@@ -1567,7 +1561,7 @@ public class NotificationPanelViewControllerTest extends SysuiTestCase {
|
|||||||
public void setQsExpansion_lockscreenShadeTransitionNotInProgress_usesStandardSquishiness() {
|
public void setQsExpansion_lockscreenShadeTransitionNotInProgress_usesStandardSquishiness() {
|
||||||
float lsSquishinessFraction = 0.456f;
|
float lsSquishinessFraction = 0.456f;
|
||||||
float nsslSquishinessFraction = 0.987f;
|
float nsslSquishinessFraction = 0.987f;
|
||||||
mNotificationPanelViewController.mQs = mQs;
|
mNotificationPanelViewController.setQs(mQs);
|
||||||
when(mLockscreenShadeTransitionController.getQsSquishTransitionFraction())
|
when(mLockscreenShadeTransitionController.getQsSquishTransitionFraction())
|
||||||
.thenReturn(lsSquishinessFraction);
|
.thenReturn(lsSquishinessFraction);
|
||||||
when(mNotificationStackScrollLayoutController.getNotificationSquishinessFraction())
|
when(mNotificationStackScrollLayoutController.getNotificationSquishinessFraction())
|
||||||
@@ -1586,7 +1580,7 @@ public class NotificationPanelViewControllerTest extends SysuiTestCase {
|
|||||||
@Test
|
@Test
|
||||||
public void onEmptySpaceClicked_notDozingAndOnKeyguard_requestsFaceAuth() {
|
public void onEmptySpaceClicked_notDozingAndOnKeyguard_requestsFaceAuth() {
|
||||||
StatusBarStateController.StateListener statusBarStateListener =
|
StatusBarStateController.StateListener statusBarStateListener =
|
||||||
mNotificationPanelViewController.mStatusBarStateListener;
|
mNotificationPanelViewController.getStatusBarStateListener();
|
||||||
statusBarStateListener.onStateChanged(KEYGUARD);
|
statusBarStateListener.onStateChanged(KEYGUARD);
|
||||||
mNotificationPanelViewController.setDozing(false, false);
|
mNotificationPanelViewController.setDozing(false, false);
|
||||||
|
|
||||||
@@ -1601,7 +1595,7 @@ public class NotificationPanelViewControllerTest extends SysuiTestCase {
|
|||||||
@Test
|
@Test
|
||||||
public void onEmptySpaceClicked_notDozingAndFaceDetectionIsNotRunning_startsUnlockAnimation() {
|
public void onEmptySpaceClicked_notDozingAndFaceDetectionIsNotRunning_startsUnlockAnimation() {
|
||||||
StatusBarStateController.StateListener statusBarStateListener =
|
StatusBarStateController.StateListener statusBarStateListener =
|
||||||
mNotificationPanelViewController.mStatusBarStateListener;
|
mNotificationPanelViewController.getStatusBarStateListener();
|
||||||
statusBarStateListener.onStateChanged(KEYGUARD);
|
statusBarStateListener.onStateChanged(KEYGUARD);
|
||||||
mNotificationPanelViewController.setDozing(false, false);
|
mNotificationPanelViewController.setDozing(false, false);
|
||||||
when(mUpdateMonitor.requestFaceAuth(NOTIFICATION_PANEL_CLICKED)).thenReturn(false);
|
when(mUpdateMonitor.requestFaceAuth(NOTIFICATION_PANEL_CLICKED)).thenReturn(false);
|
||||||
@@ -1616,7 +1610,7 @@ public class NotificationPanelViewControllerTest extends SysuiTestCase {
|
|||||||
@Test
|
@Test
|
||||||
public void onEmptySpaceClicked_notDozingAndFaceDetectionIsRunning_doesNotStartUnlockHint() {
|
public void onEmptySpaceClicked_notDozingAndFaceDetectionIsRunning_doesNotStartUnlockHint() {
|
||||||
StatusBarStateController.StateListener statusBarStateListener =
|
StatusBarStateController.StateListener statusBarStateListener =
|
||||||
mNotificationPanelViewController.mStatusBarStateListener;
|
mNotificationPanelViewController.getStatusBarStateListener();
|
||||||
statusBarStateListener.onStateChanged(KEYGUARD);
|
statusBarStateListener.onStateChanged(KEYGUARD);
|
||||||
mNotificationPanelViewController.setDozing(false, false);
|
mNotificationPanelViewController.setDozing(false, false);
|
||||||
when(mUpdateMonitor.requestFaceAuth(NOTIFICATION_PANEL_CLICKED)).thenReturn(true);
|
when(mUpdateMonitor.requestFaceAuth(NOTIFICATION_PANEL_CLICKED)).thenReturn(true);
|
||||||
@@ -1631,7 +1625,7 @@ public class NotificationPanelViewControllerTest extends SysuiTestCase {
|
|||||||
@Test
|
@Test
|
||||||
public void onEmptySpaceClicked_whenDozingAndOnKeyguard_doesNotRequestFaceAuth() {
|
public void onEmptySpaceClicked_whenDozingAndOnKeyguard_doesNotRequestFaceAuth() {
|
||||||
StatusBarStateController.StateListener statusBarStateListener =
|
StatusBarStateController.StateListener statusBarStateListener =
|
||||||
mNotificationPanelViewController.mStatusBarStateListener;
|
mNotificationPanelViewController.getStatusBarStateListener();
|
||||||
statusBarStateListener.onStateChanged(KEYGUARD);
|
statusBarStateListener.onStateChanged(KEYGUARD);
|
||||||
mNotificationPanelViewController.setDozing(true, false);
|
mNotificationPanelViewController.setDozing(true, false);
|
||||||
|
|
||||||
@@ -1645,7 +1639,7 @@ public class NotificationPanelViewControllerTest extends SysuiTestCase {
|
|||||||
@Test
|
@Test
|
||||||
public void onEmptySpaceClicked_whenStatusBarShadeLocked_doesNotRequestFaceAuth() {
|
public void onEmptySpaceClicked_whenStatusBarShadeLocked_doesNotRequestFaceAuth() {
|
||||||
StatusBarStateController.StateListener statusBarStateListener =
|
StatusBarStateController.StateListener statusBarStateListener =
|
||||||
mNotificationPanelViewController.mStatusBarStateListener;
|
mNotificationPanelViewController.getStatusBarStateListener();
|
||||||
statusBarStateListener.onStateChanged(SHADE_LOCKED);
|
statusBarStateListener.onStateChanged(SHADE_LOCKED);
|
||||||
|
|
||||||
mEmptySpaceClickListenerCaptor.getValue().onEmptySpaceClicked(0, 0);
|
mEmptySpaceClickListenerCaptor.getValue().onEmptySpaceClicked(0, 0);
|
||||||
@@ -1664,11 +1658,11 @@ public class NotificationPanelViewControllerTest extends SysuiTestCase {
|
|||||||
public void onShadeFlingClosingEnd_mAmbientStateSetClose_thenOnExpansionStopped() {
|
public void onShadeFlingClosingEnd_mAmbientStateSetClose_thenOnExpansionStopped() {
|
||||||
// Given: Shade is expanded
|
// Given: Shade is expanded
|
||||||
mNotificationPanelViewController.notifyExpandingFinished();
|
mNotificationPanelViewController.notifyExpandingFinished();
|
||||||
mNotificationPanelViewController.setIsClosing(false);
|
mNotificationPanelViewController.setClosing(false);
|
||||||
|
|
||||||
// When: Shade flings to close not canceled
|
// When: Shade flings to close not canceled
|
||||||
mNotificationPanelViewController.notifyExpandingStarted();
|
mNotificationPanelViewController.notifyExpandingStarted();
|
||||||
mNotificationPanelViewController.setIsClosing(true);
|
mNotificationPanelViewController.setClosing(true);
|
||||||
mNotificationPanelViewController.onFlingEnd(false);
|
mNotificationPanelViewController.onFlingEnd(false);
|
||||||
|
|
||||||
// Then: AmbientState's mIsClosing should be set to false
|
// Then: AmbientState's mIsClosing should be set to false
|
||||||
|
|||||||
Reference in New Issue
Block a user