Merge "Removing unused big_clock_container" into sc-v2-dev am: dbb3ce62b0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15949242 Change-Id: Ib10bd468c0e585bd9bc1d055fa89970347655f98
This commit is contained in:
@@ -25,12 +25,6 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@android:color/transparent">
|
android:background="@android:color/transparent">
|
||||||
<FrameLayout
|
|
||||||
android:id="@+id/big_clock_container"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:visibility="gone" />
|
|
||||||
|
|
||||||
<ViewStub
|
<ViewStub
|
||||||
android:id="@+id/keyguard_qs_user_switch_stub"
|
android:id="@+id/keyguard_qs_user_switch_stub"
|
||||||
android:layout="@layout/keyguard_qs_user_switch"
|
android:layout="@layout/keyguard_qs_user_switch"
|
||||||
|
|||||||
@@ -305,7 +305,6 @@ public class NotificationPanelViewController extends PanelViewController {
|
|||||||
private KeyguardUserSwitcherController mKeyguardUserSwitcherController;
|
private KeyguardUserSwitcherController mKeyguardUserSwitcherController;
|
||||||
private KeyguardStatusBarView mKeyguardStatusBar;
|
private KeyguardStatusBarView mKeyguardStatusBar;
|
||||||
private KeyguardStatusBarViewController mKeyguardStatusBarViewController;
|
private KeyguardStatusBarViewController mKeyguardStatusBarViewController;
|
||||||
private ViewGroup mBigClockContainer;
|
|
||||||
@VisibleForTesting QS mQs;
|
@VisibleForTesting QS mQs;
|
||||||
private FrameLayout mQsFrame;
|
private FrameLayout mQsFrame;
|
||||||
private KeyguardStatusViewController mKeyguardStatusViewController;
|
private KeyguardStatusViewController mKeyguardStatusViewController;
|
||||||
@@ -799,7 +798,6 @@ public class NotificationPanelViewController extends PanelViewController {
|
|||||||
private void onFinishInflate() {
|
private void onFinishInflate() {
|
||||||
loadDimens();
|
loadDimens();
|
||||||
mKeyguardStatusBar = mView.findViewById(R.id.keyguard_header);
|
mKeyguardStatusBar = mView.findViewById(R.id.keyguard_header);
|
||||||
mBigClockContainer = mView.findViewById(R.id.big_clock_container);
|
|
||||||
|
|
||||||
FrameLayout userAvatarContainer = null;
|
FrameLayout userAvatarContainer = null;
|
||||||
KeyguardUserSwitcherView keyguardUserSwitcherView = null;
|
KeyguardUserSwitcherView keyguardUserSwitcherView = null;
|
||||||
@@ -1082,7 +1080,6 @@ public class NotificationPanelViewController extends PanelViewController {
|
|||||||
R.layout.keyguard_user_switcher /* layoutId */,
|
R.layout.keyguard_user_switcher /* layoutId */,
|
||||||
showKeyguardUserSwitcher /* enabled */);
|
showKeyguardUserSwitcher /* enabled */);
|
||||||
|
|
||||||
mBigClockContainer.removeAllViews();
|
|
||||||
updateViewControllers(mView.findViewById(R.id.keyguard_status_view), userAvatarView,
|
updateViewControllers(mView.findViewById(R.id.keyguard_status_view), userAvatarView,
|
||||||
keyguardUserSwitcherView);
|
keyguardUserSwitcherView);
|
||||||
|
|
||||||
@@ -2181,7 +2178,6 @@ public class NotificationPanelViewController extends PanelViewController {
|
|||||||
if (mBarState == StatusBarState.SHADE_LOCKED || mBarState == KEYGUARD) {
|
if (mBarState == StatusBarState.SHADE_LOCKED || mBarState == KEYGUARD) {
|
||||||
updateKeyguardBottomAreaAlpha();
|
updateKeyguardBottomAreaAlpha();
|
||||||
positionClockAndNotifications();
|
positionClockAndNotifications();
|
||||||
updateBigClockAlpha();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mAccessibilityManager.isEnabled()) {
|
if (mAccessibilityManager.isEnabled()) {
|
||||||
@@ -2951,20 +2947,6 @@ public class NotificationPanelViewController extends PanelViewController {
|
|||||||
mLockIconViewController.setAlpha(alpha);
|
mLockIconViewController.setAlpha(alpha);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Custom clock fades away when user drags up to unlock or pulls down quick settings.
|
|
||||||
*
|
|
||||||
* Updates alpha of custom clock to match the alpha of the KeyguardBottomArea. See
|
|
||||||
* {@link #updateKeyguardBottomAreaAlpha}.
|
|
||||||
*/
|
|
||||||
private void updateBigClockAlpha() {
|
|
||||||
float expansionAlpha = MathUtils.map(
|
|
||||||
isUnlockHintRunning() ? 0 : KeyguardBouncer.ALPHA_EXPANSION_THRESHOLD, 1f, 0f, 1f,
|
|
||||||
getExpandedFraction());
|
|
||||||
float alpha = Math.min(expansionAlpha, 1 - computeQsExpansionFraction());
|
|
||||||
mBigClockContainer.setAlpha(alpha);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onExpandingStarted() {
|
protected void onExpandingStarted() {
|
||||||
super.onExpandingStarted();
|
super.onExpandingStarted();
|
||||||
@@ -3322,7 +3304,6 @@ public class NotificationPanelViewController extends PanelViewController {
|
|||||||
}
|
}
|
||||||
mNotificationStackScrollLayoutController.setExpandedHeight(expandedHeight);
|
mNotificationStackScrollLayoutController.setExpandedHeight(expandedHeight);
|
||||||
updateKeyguardBottomAreaAlpha();
|
updateKeyguardBottomAreaAlpha();
|
||||||
updateBigClockAlpha();
|
|
||||||
updateStatusBarIcons();
|
updateStatusBarIcons();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -156,8 +156,6 @@ public class NotificationPanelViewControllerTest extends SysuiTestCase {
|
|||||||
private KeyguardBottomAreaView mQsFrame;
|
private KeyguardBottomAreaView mQsFrame;
|
||||||
private KeyguardStatusView mKeyguardStatusView;
|
private KeyguardStatusView mKeyguardStatusView;
|
||||||
@Mock
|
@Mock
|
||||||
private ViewGroup mBigClockContainer;
|
|
||||||
@Mock
|
|
||||||
private NotificationIconAreaController mNotificationAreaController;
|
private NotificationIconAreaController mNotificationAreaController;
|
||||||
@Mock
|
@Mock
|
||||||
private HeadsUpManagerPhone mHeadsUpManager;
|
private HeadsUpManagerPhone mHeadsUpManager;
|
||||||
@@ -347,7 +345,6 @@ public class NotificationPanelViewControllerTest extends SysuiTestCase {
|
|||||||
when(mKeyguardBottomArea.getLeftView()).thenReturn(mock(KeyguardAffordanceView.class));
|
when(mKeyguardBottomArea.getLeftView()).thenReturn(mock(KeyguardAffordanceView.class));
|
||||||
when(mKeyguardBottomArea.getRightView()).thenReturn(mock(KeyguardAffordanceView.class));
|
when(mKeyguardBottomArea.getRightView()).thenReturn(mock(KeyguardAffordanceView.class));
|
||||||
when(mKeyguardBottomArea.animate()).thenReturn(mock(ViewPropertyAnimator.class));
|
when(mKeyguardBottomArea.animate()).thenReturn(mock(ViewPropertyAnimator.class));
|
||||||
when(mView.findViewById(R.id.big_clock_container)).thenReturn(mBigClockContainer);
|
|
||||||
when(mView.findViewById(R.id.qs_frame)).thenReturn(mQsFrame);
|
when(mView.findViewById(R.id.qs_frame)).thenReturn(mQsFrame);
|
||||||
when(mView.findViewById(R.id.keyguard_status_view))
|
when(mView.findViewById(R.id.keyguard_status_view))
|
||||||
.thenReturn(mock(KeyguardStatusView.class));
|
.thenReturn(mock(KeyguardStatusView.class));
|
||||||
|
|||||||
Reference in New Issue
Block a user