Loading packages/SystemUI/res/values/dimens.xml +3 −0 Original line number Diff line number Diff line Loading @@ -681,6 +681,9 @@ <!-- The height of the divider between the individual notifications. --> <dimen name="notification_divider_height">2dp</dimen> <!-- The min distance the notifications should be from the lock icon on the lock screen. --> <dimen name="min_lock_icon_padding">48dp</dimen> <!-- The corner radius of the shadow behind the notification. --> <dimen name="notification_shadow_radius">0dp</dimen> Loading packages/SystemUI/src/com/android/keyguard/LockIconViewController.java +13 −3 Original line number Diff line number Diff line Loading @@ -98,7 +98,8 @@ public class LockIconViewController extends ViewController<LockIconView> impleme private float mHeightPixels; private float mWidthPixels; private float mDensity; private int mKgBottomAreaHeight; private int mAmbientIndicationHeight; // in pixels private int mKgIndicationHeight; // in pixels private boolean mShowUnlockIcon; private boolean mShowLockIcon; Loading Loading @@ -280,7 +281,7 @@ public class LockIconViewController extends ViewController<LockIconView> impleme mWidthPixels = metrics.widthPixels; mHeightPixels = metrics.heightPixels; mDensity = metrics.density; mKgBottomAreaHeight = mView.getContext().getResources().getDimensionPixelSize( mKgIndicationHeight = mView.getContext().getResources().getDimensionPixelSize( R.dimen.keyguard_indication_margin_bottom) + mView.getContext().getResources().getDimensionPixelSize( R.dimen.keyguard_indication_bottom_padding); Loading @@ -295,15 +296,24 @@ public class LockIconViewController extends ViewController<LockIconView> impleme } else { final float distAboveKgBottomArea = 12 * mDensity; final float radius = 36 * mDensity; final int kgBottomAreaHeight = Math.max(mKgIndicationHeight, mAmbientIndicationHeight); mView.setCenterLocation( new PointF(mWidthPixels / 2, mHeightPixels - mKgBottomAreaHeight - distAboveKgBottomArea mHeightPixels - kgBottomAreaHeight - distAboveKgBottomArea - radius / 2), (int) radius); } mView.getHitRect(mSensorTouchLocation); } /** * Set the location of ambient indication if showing (ie: now playing) */ public void setAmbientIndicationBottomPadding(int ambientIndicationBottomPadding) { mAmbientIndicationHeight = ambientIndicationBottomPadding; updateLockIconLocation(); } @Override public void dump(@NonNull FileDescriptor fd, @NonNull PrintWriter pw, @NonNull String[] args) { pw.println("mUdfpsEnrolled: " + mUdfpsEnrolled); Loading packages/SystemUI/src/com/android/systemui/biometrics/UdfpsKeyguardViewController.java +5 −3 Original line number Diff line number Diff line Loading @@ -41,6 +41,7 @@ import com.android.systemui.util.concurrency.DelayableExecutor; import java.io.FileDescriptor; import java.io.PrintWriter; /** * Class that coordinates non-HBM animations during keyguard authentication. * Loading Loading @@ -207,7 +208,7 @@ public class UdfpsKeyguardViewController extends UdfpsAnimationViewController<Ud return true; } if (mInputBouncerHiddenAmount < .4f || mIsBouncerVisible) { if (mInputBouncerHiddenAmount < .5f || mIsBouncerVisible) { return true; } Loading Loading @@ -279,8 +280,9 @@ public class UdfpsKeyguardViewController extends UdfpsAnimationViewController<Ud private void updateAlpha() { // fade icon on transition to showing bouncer int alpha = mShowingUdfpsBouncer ? 255 : Math.abs((int) MathUtils.constrainedMap(0f, 255f, .4f, .7f, mInputBouncerHiddenAmount)); : (int) MathUtils.constrain( MathUtils.map(.5f, .9f, 0f, 255f, mInputBouncerHiddenAmount), 0f, 255f); alpha *= (1.0f - mTransitionToFullShadeProgress); mView.setUnpausedAlpha(alpha); } Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java +4 −1 Original line number Diff line number Diff line Loading @@ -1350,7 +1350,8 @@ public class NotificationPanelViewController extends PanelViewController { float lockIconPadding = 0; if (mLockIconViewController.getTop() != 0) { lockIconPadding = mStatusBar.getDisplayHeight() - mLockIconViewController.getTop(); lockIconPadding = mStatusBar.getDisplayHeight() - mLockIconViewController.getTop() + mResources.getDimensionPixelSize(R.dimen.min_lock_icon_padding); } float bottomPadding = Math.max(mIndicationBottomPadding, mAmbientIndicationBottomPadding); Loading Loading @@ -3627,6 +3628,8 @@ public class NotificationPanelViewController extends PanelViewController { public void setAmbientIndicationBottomPadding(int ambientIndicationBottomPadding) { if (mAmbientIndicationBottomPadding != ambientIndicationBottomPadding) { mAmbientIndicationBottomPadding = ambientIndicationBottomPadding; mLockIconViewController.setAmbientIndicationBottomPadding( mAmbientIndicationBottomPadding); updateMaxDisplayedNotifications(true); } } Loading Loading
packages/SystemUI/res/values/dimens.xml +3 −0 Original line number Diff line number Diff line Loading @@ -681,6 +681,9 @@ <!-- The height of the divider between the individual notifications. --> <dimen name="notification_divider_height">2dp</dimen> <!-- The min distance the notifications should be from the lock icon on the lock screen. --> <dimen name="min_lock_icon_padding">48dp</dimen> <!-- The corner radius of the shadow behind the notification. --> <dimen name="notification_shadow_radius">0dp</dimen> Loading
packages/SystemUI/src/com/android/keyguard/LockIconViewController.java +13 −3 Original line number Diff line number Diff line Loading @@ -98,7 +98,8 @@ public class LockIconViewController extends ViewController<LockIconView> impleme private float mHeightPixels; private float mWidthPixels; private float mDensity; private int mKgBottomAreaHeight; private int mAmbientIndicationHeight; // in pixels private int mKgIndicationHeight; // in pixels private boolean mShowUnlockIcon; private boolean mShowLockIcon; Loading Loading @@ -280,7 +281,7 @@ public class LockIconViewController extends ViewController<LockIconView> impleme mWidthPixels = metrics.widthPixels; mHeightPixels = metrics.heightPixels; mDensity = metrics.density; mKgBottomAreaHeight = mView.getContext().getResources().getDimensionPixelSize( mKgIndicationHeight = mView.getContext().getResources().getDimensionPixelSize( R.dimen.keyguard_indication_margin_bottom) + mView.getContext().getResources().getDimensionPixelSize( R.dimen.keyguard_indication_bottom_padding); Loading @@ -295,15 +296,24 @@ public class LockIconViewController extends ViewController<LockIconView> impleme } else { final float distAboveKgBottomArea = 12 * mDensity; final float radius = 36 * mDensity; final int kgBottomAreaHeight = Math.max(mKgIndicationHeight, mAmbientIndicationHeight); mView.setCenterLocation( new PointF(mWidthPixels / 2, mHeightPixels - mKgBottomAreaHeight - distAboveKgBottomArea mHeightPixels - kgBottomAreaHeight - distAboveKgBottomArea - radius / 2), (int) radius); } mView.getHitRect(mSensorTouchLocation); } /** * Set the location of ambient indication if showing (ie: now playing) */ public void setAmbientIndicationBottomPadding(int ambientIndicationBottomPadding) { mAmbientIndicationHeight = ambientIndicationBottomPadding; updateLockIconLocation(); } @Override public void dump(@NonNull FileDescriptor fd, @NonNull PrintWriter pw, @NonNull String[] args) { pw.println("mUdfpsEnrolled: " + mUdfpsEnrolled); Loading
packages/SystemUI/src/com/android/systemui/biometrics/UdfpsKeyguardViewController.java +5 −3 Original line number Diff line number Diff line Loading @@ -41,6 +41,7 @@ import com.android.systemui.util.concurrency.DelayableExecutor; import java.io.FileDescriptor; import java.io.PrintWriter; /** * Class that coordinates non-HBM animations during keyguard authentication. * Loading Loading @@ -207,7 +208,7 @@ public class UdfpsKeyguardViewController extends UdfpsAnimationViewController<Ud return true; } if (mInputBouncerHiddenAmount < .4f || mIsBouncerVisible) { if (mInputBouncerHiddenAmount < .5f || mIsBouncerVisible) { return true; } Loading Loading @@ -279,8 +280,9 @@ public class UdfpsKeyguardViewController extends UdfpsAnimationViewController<Ud private void updateAlpha() { // fade icon on transition to showing bouncer int alpha = mShowingUdfpsBouncer ? 255 : Math.abs((int) MathUtils.constrainedMap(0f, 255f, .4f, .7f, mInputBouncerHiddenAmount)); : (int) MathUtils.constrain( MathUtils.map(.5f, .9f, 0f, 255f, mInputBouncerHiddenAmount), 0f, 255f); alpha *= (1.0f - mTransitionToFullShadeProgress); mView.setUnpausedAlpha(alpha); } Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java +4 −1 Original line number Diff line number Diff line Loading @@ -1350,7 +1350,8 @@ public class NotificationPanelViewController extends PanelViewController { float lockIconPadding = 0; if (mLockIconViewController.getTop() != 0) { lockIconPadding = mStatusBar.getDisplayHeight() - mLockIconViewController.getTop(); lockIconPadding = mStatusBar.getDisplayHeight() - mLockIconViewController.getTop() + mResources.getDimensionPixelSize(R.dimen.min_lock_icon_padding); } float bottomPadding = Math.max(mIndicationBottomPadding, mAmbientIndicationBottomPadding); Loading Loading @@ -3627,6 +3628,8 @@ public class NotificationPanelViewController extends PanelViewController { public void setAmbientIndicationBottomPadding(int ambientIndicationBottomPadding) { if (mAmbientIndicationBottomPadding != ambientIndicationBottomPadding) { mAmbientIndicationBottomPadding = ambientIndicationBottomPadding; mLockIconViewController.setAmbientIndicationBottomPadding( mAmbientIndicationBottomPadding); updateMaxDisplayedNotifications(true); } } Loading