Loading packages/SystemUI/res/layout/keyguard_bottom_area.xml +11 −6 Original line number Diff line number Diff line Loading @@ -77,15 +77,20 @@ android:contentDescription="@string/accessibility_phone_button" android:tint="?attr/wallpaperTextColor" /> <FrameLayout android:id="@+id/lock_icon_container" android:layout_width="@dimen/keyguard_lock_width" android:layout_height="@dimen/keyguard_lock_height" android:layout_gravity="bottom|center_horizontal" android:layout_marginBottom="@dimen/keyguard_lock_padding"> <com.android.systemui.statusbar.phone.LockIcon android:id="@+id/lock_icon" android:layout_width="@dimen/keyguard_lock_width" android:layout_height="@dimen/keyguard_lock_height" android:layout_gravity="bottom|center_horizontal" android:layout_marginBottom="@dimen/keyguard_lock_padding" android:src="@*android:drawable/ic_lock" android:contentDescription="@string/accessibility_unlock_button" android:scaleType="center" /> </FrameLayout> <FrameLayout android:id="@+id/overlay_container" Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java +6 −0 Original line number Diff line number Diff line Loading @@ -122,6 +122,7 @@ public class KeyguardBottomAreaView extends FrameLayout implements View.OnClickL private KeyguardAffordanceView mRightAffordanceView; private KeyguardAffordanceView mLeftAffordanceView; private LockIcon mLockIcon; private ViewGroup mLockIconContainer; private ViewGroup mIndicationArea; private TextView mEnterpriseDisclosure; private TextView mIndicationText; Loading Loading @@ -244,6 +245,7 @@ public class KeyguardBottomAreaView extends FrameLayout implements View.OnClickL mRightAffordanceView = findViewById(R.id.camera_button); mLeftAffordanceView = findViewById(R.id.left_button); mLockIcon = findViewById(R.id.lock_icon); mLockIconContainer = findViewById(R.id.lock_icon_container); mIndicationArea = findViewById(R.id.keyguard_indication_area); mEnterpriseDisclosure = findViewById( R.id.keyguard_indication_enterprise_disclosure); Loading Loading @@ -657,6 +659,10 @@ public class KeyguardBottomAreaView extends FrameLayout implements View.OnClickL return mLockIcon; } public ViewGroup getLockIconContainer() { return mLockIconContainer; } public View getIndicationArea() { return mIndicationArea; } Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java +5 −3 Original line number Diff line number Diff line Loading @@ -123,6 +123,7 @@ public class KeyguardBouncer { return; } ensureView(); mIsScrimmed = isScrimmed; // On the keyguard, we want to show the bouncer when the user drags up, but it's // not correct to end the falsing session. We still need to verify if those touches Loading @@ -132,13 +133,13 @@ public class KeyguardBouncer { if (isScrimmed) { setExpansion(EXPANSION_VISIBLE); } mIsScrimmed = isScrimmed; if (resetSecuritySelection) { // showPrimarySecurityScreen() updates the current security method. This is needed in // case we are already showing and the current security method changed. showPrimarySecurityScreen(); } if (mRoot.getVisibility() == View.VISIBLE || mShowingSoon) { return; } Loading Loading @@ -168,8 +169,8 @@ public class KeyguardBouncer { mCallback.onBouncerVisiblityChanged(true /* shown */); } public boolean isShowingScrimmed() { return isShowing() && mIsScrimmed; public boolean isScrimmed() { return mIsScrimmed; } public ViewGroup getLockIconContainer() { Loading Loading @@ -281,6 +282,7 @@ public class KeyguardBouncer { StatsLog.KEYGUARD_BOUNCER_STATE_CHANGED__STATE__HIDDEN); mDismissCallbackRegistry.notifyDismissCancelled(); } mIsScrimmed = false; mFalsingManager.onBouncerHidden(); mCallback.onBouncerVisiblityChanged(false /* shown */); cancelShowRunnable(); Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java +15 −2 Original line number Diff line number Diff line Loading @@ -3040,6 +3040,7 @@ public class NotificationPanelView extends PanelView implements } ViewGroup bouncerContainer = mBouncer.getLockIconContainer(); ViewGroup bottomContainer = mKeyguardBottomArea.getLockIconContainer(); LockIcon lockIcon = mKeyguardBottomArea.getLockIcon(); if (mBouncer.isAnimatingAway()) { Loading @@ -3051,9 +3052,21 @@ public class NotificationPanelView extends PanelView implements return; } // Lock icon needs to be re-parented in case of a scrimmed bouncer, // otherwise it would be under the scrim. if (mBouncer.isScrimmed() && bouncerContainer != null && lockIcon.getParent() != bouncerContainer) { ((ViewGroup) lockIcon.getParent()).removeView(lockIcon); bouncerContainer.addView(lockIcon); } else if (!mBouncer.isScrimmed() && bottomContainer != null && lockIcon.getParent() != bottomContainer) { ((ViewGroup) lockIcon.getParent()).removeView(lockIcon); bottomContainer.addView(lockIcon); } float translation = 0; if (bouncerContainer != null) { float bottomAreaContainerY = getCommonTop(lockIcon); if (bouncerContainer != null && bottomContainer != null && !mBouncer.isScrimmed()) { float bottomAreaContainerY = getCommonTop(bottomContainer); float bouncerLockY = getCommonTop(bouncerContainer); if (bouncerLockY < bottomAreaContainerY) { translation = bouncerLockY - bottomAreaContainerY; Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java +4 −1 Original line number Diff line number Diff line Loading @@ -86,6 +86,7 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb public void onFullyShown() { updateStates(); mStatusBar.wakeUpIfDozing(SystemClock.uptimeMillis(), mContainer, "BOUNCER_VISIBLE"); mNotificationPanelView.updateLockIcon(); } @Override Loading @@ -96,6 +97,7 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb @Override public void onFullyHidden() { updateStates(); mNotificationPanelView.updateLockIcon(); } @Override Loading Loading @@ -759,7 +761,8 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb public boolean bouncerNeedsScrimming() { return mOccluded || mBouncer.willDismissWithAction() || mBouncer.needsFullscreenBouncer() || mStatusBar.isFullScreenUserSwitcherState() || mBouncer.isShowingScrimmed(); || mStatusBar.isFullScreenUserSwitcherState() || (mBouncer.isShowing() && mBouncer.isScrimmed()); } public void dump(PrintWriter pw) { Loading Loading
packages/SystemUI/res/layout/keyguard_bottom_area.xml +11 −6 Original line number Diff line number Diff line Loading @@ -77,15 +77,20 @@ android:contentDescription="@string/accessibility_phone_button" android:tint="?attr/wallpaperTextColor" /> <FrameLayout android:id="@+id/lock_icon_container" android:layout_width="@dimen/keyguard_lock_width" android:layout_height="@dimen/keyguard_lock_height" android:layout_gravity="bottom|center_horizontal" android:layout_marginBottom="@dimen/keyguard_lock_padding"> <com.android.systemui.statusbar.phone.LockIcon android:id="@+id/lock_icon" android:layout_width="@dimen/keyguard_lock_width" android:layout_height="@dimen/keyguard_lock_height" android:layout_gravity="bottom|center_horizontal" android:layout_marginBottom="@dimen/keyguard_lock_padding" android:src="@*android:drawable/ic_lock" android:contentDescription="@string/accessibility_unlock_button" android:scaleType="center" /> </FrameLayout> <FrameLayout android:id="@+id/overlay_container" Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java +6 −0 Original line number Diff line number Diff line Loading @@ -122,6 +122,7 @@ public class KeyguardBottomAreaView extends FrameLayout implements View.OnClickL private KeyguardAffordanceView mRightAffordanceView; private KeyguardAffordanceView mLeftAffordanceView; private LockIcon mLockIcon; private ViewGroup mLockIconContainer; private ViewGroup mIndicationArea; private TextView mEnterpriseDisclosure; private TextView mIndicationText; Loading Loading @@ -244,6 +245,7 @@ public class KeyguardBottomAreaView extends FrameLayout implements View.OnClickL mRightAffordanceView = findViewById(R.id.camera_button); mLeftAffordanceView = findViewById(R.id.left_button); mLockIcon = findViewById(R.id.lock_icon); mLockIconContainer = findViewById(R.id.lock_icon_container); mIndicationArea = findViewById(R.id.keyguard_indication_area); mEnterpriseDisclosure = findViewById( R.id.keyguard_indication_enterprise_disclosure); Loading Loading @@ -657,6 +659,10 @@ public class KeyguardBottomAreaView extends FrameLayout implements View.OnClickL return mLockIcon; } public ViewGroup getLockIconContainer() { return mLockIconContainer; } public View getIndicationArea() { return mIndicationArea; } Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java +5 −3 Original line number Diff line number Diff line Loading @@ -123,6 +123,7 @@ public class KeyguardBouncer { return; } ensureView(); mIsScrimmed = isScrimmed; // On the keyguard, we want to show the bouncer when the user drags up, but it's // not correct to end the falsing session. We still need to verify if those touches Loading @@ -132,13 +133,13 @@ public class KeyguardBouncer { if (isScrimmed) { setExpansion(EXPANSION_VISIBLE); } mIsScrimmed = isScrimmed; if (resetSecuritySelection) { // showPrimarySecurityScreen() updates the current security method. This is needed in // case we are already showing and the current security method changed. showPrimarySecurityScreen(); } if (mRoot.getVisibility() == View.VISIBLE || mShowingSoon) { return; } Loading Loading @@ -168,8 +169,8 @@ public class KeyguardBouncer { mCallback.onBouncerVisiblityChanged(true /* shown */); } public boolean isShowingScrimmed() { return isShowing() && mIsScrimmed; public boolean isScrimmed() { return mIsScrimmed; } public ViewGroup getLockIconContainer() { Loading Loading @@ -281,6 +282,7 @@ public class KeyguardBouncer { StatsLog.KEYGUARD_BOUNCER_STATE_CHANGED__STATE__HIDDEN); mDismissCallbackRegistry.notifyDismissCancelled(); } mIsScrimmed = false; mFalsingManager.onBouncerHidden(); mCallback.onBouncerVisiblityChanged(false /* shown */); cancelShowRunnable(); Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java +15 −2 Original line number Diff line number Diff line Loading @@ -3040,6 +3040,7 @@ public class NotificationPanelView extends PanelView implements } ViewGroup bouncerContainer = mBouncer.getLockIconContainer(); ViewGroup bottomContainer = mKeyguardBottomArea.getLockIconContainer(); LockIcon lockIcon = mKeyguardBottomArea.getLockIcon(); if (mBouncer.isAnimatingAway()) { Loading @@ -3051,9 +3052,21 @@ public class NotificationPanelView extends PanelView implements return; } // Lock icon needs to be re-parented in case of a scrimmed bouncer, // otherwise it would be under the scrim. if (mBouncer.isScrimmed() && bouncerContainer != null && lockIcon.getParent() != bouncerContainer) { ((ViewGroup) lockIcon.getParent()).removeView(lockIcon); bouncerContainer.addView(lockIcon); } else if (!mBouncer.isScrimmed() && bottomContainer != null && lockIcon.getParent() != bottomContainer) { ((ViewGroup) lockIcon.getParent()).removeView(lockIcon); bottomContainer.addView(lockIcon); } float translation = 0; if (bouncerContainer != null) { float bottomAreaContainerY = getCommonTop(lockIcon); if (bouncerContainer != null && bottomContainer != null && !mBouncer.isScrimmed()) { float bottomAreaContainerY = getCommonTop(bottomContainer); float bouncerLockY = getCommonTop(bouncerContainer); if (bouncerLockY < bottomAreaContainerY) { translation = bouncerLockY - bottomAreaContainerY; Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java +4 −1 Original line number Diff line number Diff line Loading @@ -86,6 +86,7 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb public void onFullyShown() { updateStates(); mStatusBar.wakeUpIfDozing(SystemClock.uptimeMillis(), mContainer, "BOUNCER_VISIBLE"); mNotificationPanelView.updateLockIcon(); } @Override Loading @@ -96,6 +97,7 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb @Override public void onFullyHidden() { updateStates(); mNotificationPanelView.updateLockIcon(); } @Override Loading Loading @@ -759,7 +761,8 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb public boolean bouncerNeedsScrimming() { return mOccluded || mBouncer.willDismissWithAction() || mBouncer.needsFullscreenBouncer() || mStatusBar.isFullScreenUserSwitcherState() || mBouncer.isShowingScrimmed(); || mStatusBar.isFullScreenUserSwitcherState() || (mBouncer.isShowing() && mBouncer.isScrimmed()); } public void dump(PrintWriter pw) { Loading