Loading packages/SystemUI/res/layout/status_bar_expanded.xml +0 −1 Original line number Diff line number Diff line Loading @@ -62,7 +62,6 @@ android:id="@+id/lock_icon" android:layout_width="match_parent" android:layout_height="match_parent" android:padding="@dimen/lock_icon_padding" android:layout_gravity="center" android:scaleType="centerCrop"/> Loading packages/SystemUI/res/layout/udfps_keyguard_view_internal.xml +0 −2 Original line number Diff line number Diff line Loading @@ -35,7 +35,6 @@ android:id="@+id/udfps_aod_fp" android:layout_width="match_parent" android:layout_height="match_parent" android:padding="@dimen/lock_icon_padding" android:layout_gravity="center" android:scaleType="centerCrop" app:lottie_autoPlay="false" Loading @@ -47,7 +46,6 @@ android:id="@+id/udfps_lockscreen_fp" android:layout_width="match_parent" android:layout_height="match_parent" android:padding="@dimen/lock_icon_padding" android:layout_gravity="center" android:scaleType="centerCrop" app:lottie_autoPlay="false" Loading packages/SystemUI/src/com/android/keyguard/LockIconView.java +7 −1 Original line number Diff line number Diff line Loading @@ -56,6 +56,7 @@ public class LockIconView extends FrameLayout implements Dumpable { @NonNull private final RectF mSensorRect; @NonNull private PointF mLockIconCenter = new PointF(0f, 0f); private int mRadius; private int mLockIconPadding; private ImageView mLockIcon; private ImageView mBgView; Loading Loading @@ -125,9 +126,13 @@ public class LockIconView extends FrameLayout implements Dumpable { * Set the location of the lock icon. */ @VisibleForTesting public void setCenterLocation(@NonNull PointF center, int radius) { public void setCenterLocation(@NonNull PointF center, int radius, int drawablePadding) { mLockIconCenter = center; mRadius = radius; mLockIconPadding = drawablePadding; mLockIcon.setPadding(mLockIconPadding, mLockIconPadding, mLockIconPadding, mLockIconPadding); // mSensorProps coordinates assume portrait mode which is OK b/c the keyguard is always in // portrait. Loading Loading @@ -221,6 +226,7 @@ public class LockIconView extends FrameLayout implements Dumpable { pw.println(" Center in px (x, y)= (" + mLockIconCenter.x + ", " + mLockIconCenter.y + ")"); pw.println(" Radius in pixels: " + mRadius); pw.println(" Drawable padding: " + mLockIconPadding); pw.println(" mIconType=" + typeToString(mIconType)); pw.println(" mAod=" + mAod); pw.println("Lock Icon View actual measurements:"); Loading packages/SystemUI/src/com/android/keyguard/LockIconViewController.java +8 −7 Original line number Diff line number Diff line Loading @@ -31,8 +31,6 @@ import android.graphics.PointF; import android.graphics.Rect; import android.graphics.drawable.AnimatedStateListDrawable; import android.hardware.biometrics.BiometricSourceType; import android.hardware.biometrics.SensorLocationInternal; import android.hardware.fingerprint.FingerprintSensorPropertiesInternal; import android.os.Process; import android.os.VibrationAttributes; import android.util.DisplayMetrics; Loading Loading @@ -125,6 +123,7 @@ public class LockIconViewController extends ViewController<LockIconView> impleme private float mHeightPixels; private float mWidthPixels; private int mBottomPaddingPx; private int mScaledPaddingPx; private boolean mShowUnlockIcon; private boolean mShowLockIcon; Loading Loading @@ -341,6 +340,10 @@ public class LockIconViewController extends ViewController<LockIconView> impleme mHeightPixels = bounds.bottom; mBottomPaddingPx = getResources().getDimensionPixelSize(R.dimen.lock_icon_margin_bottom); final int defaultPaddingPx = getResources().getDimensionPixelSize(R.dimen.lock_icon_padding); mScaledPaddingPx = (int) (defaultPaddingPx * mAuthController.getScaleFactor()); mUnlockedLabel = mView.getContext().getResources().getString( R.string.accessibility_unlock_button); mLockedLabel = mView.getContext() Loading @@ -351,15 +354,13 @@ public class LockIconViewController extends ViewController<LockIconView> impleme private void updateLockIconLocation() { if (mUdfpsSupported) { FingerprintSensorPropertiesInternal props = mAuthController.getUdfpsProps().get(0); final SensorLocationInternal location = props.getLocation(); mView.setCenterLocation(new PointF(location.sensorLocationX, location.sensorLocationY), location.sensorRadius); mView.setCenterLocation(mAuthController.getUdfpsLocation(), mAuthController.getUdfpsRadius(), mScaledPaddingPx); } else { mView.setCenterLocation( new PointF(mWidthPixels / 2, mHeightPixels - mBottomPaddingPx - sLockIconRadiusPx), sLockIconRadiusPx); sLockIconRadiusPx, mScaledPaddingPx); } mView.getHitRect(mSensorTouchLocation); Loading packages/SystemUI/src/com/android/systemui/biometrics/AuthController.java +21 −0 Original line number Diff line number Diff line Loading @@ -443,6 +443,27 @@ public class AuthController extends CoreStartable implements CommandQueue.Callba return new PointF(mUdfpsBounds.centerX(), mUdfpsBounds.centerY()); } /** * @return the radius of UDFPS on the screen in pixels */ public int getUdfpsRadius() { if (mUdfpsController == null || mUdfpsBounds == null) { return -1; } return mUdfpsBounds.height() / 2; } /** * @return the scale factor representing the user's current resolution / the stable * (default) resolution */ public float getScaleFactor() { if (mUdfpsController == null || mUdfpsController.mOverlayParams == null) { return 1f; } return mUdfpsController.mOverlayParams.getScaleFactor(); } /** * @return where the fingerprint sensor exists in pixels in portrait mode. devices without an * overridden value will use the default value even if they don't have a fingerprint sensor Loading Loading
packages/SystemUI/res/layout/status_bar_expanded.xml +0 −1 Original line number Diff line number Diff line Loading @@ -62,7 +62,6 @@ android:id="@+id/lock_icon" android:layout_width="match_parent" android:layout_height="match_parent" android:padding="@dimen/lock_icon_padding" android:layout_gravity="center" android:scaleType="centerCrop"/> Loading
packages/SystemUI/res/layout/udfps_keyguard_view_internal.xml +0 −2 Original line number Diff line number Diff line Loading @@ -35,7 +35,6 @@ android:id="@+id/udfps_aod_fp" android:layout_width="match_parent" android:layout_height="match_parent" android:padding="@dimen/lock_icon_padding" android:layout_gravity="center" android:scaleType="centerCrop" app:lottie_autoPlay="false" Loading @@ -47,7 +46,6 @@ android:id="@+id/udfps_lockscreen_fp" android:layout_width="match_parent" android:layout_height="match_parent" android:padding="@dimen/lock_icon_padding" android:layout_gravity="center" android:scaleType="centerCrop" app:lottie_autoPlay="false" Loading
packages/SystemUI/src/com/android/keyguard/LockIconView.java +7 −1 Original line number Diff line number Diff line Loading @@ -56,6 +56,7 @@ public class LockIconView extends FrameLayout implements Dumpable { @NonNull private final RectF mSensorRect; @NonNull private PointF mLockIconCenter = new PointF(0f, 0f); private int mRadius; private int mLockIconPadding; private ImageView mLockIcon; private ImageView mBgView; Loading Loading @@ -125,9 +126,13 @@ public class LockIconView extends FrameLayout implements Dumpable { * Set the location of the lock icon. */ @VisibleForTesting public void setCenterLocation(@NonNull PointF center, int radius) { public void setCenterLocation(@NonNull PointF center, int radius, int drawablePadding) { mLockIconCenter = center; mRadius = radius; mLockIconPadding = drawablePadding; mLockIcon.setPadding(mLockIconPadding, mLockIconPadding, mLockIconPadding, mLockIconPadding); // mSensorProps coordinates assume portrait mode which is OK b/c the keyguard is always in // portrait. Loading Loading @@ -221,6 +226,7 @@ public class LockIconView extends FrameLayout implements Dumpable { pw.println(" Center in px (x, y)= (" + mLockIconCenter.x + ", " + mLockIconCenter.y + ")"); pw.println(" Radius in pixels: " + mRadius); pw.println(" Drawable padding: " + mLockIconPadding); pw.println(" mIconType=" + typeToString(mIconType)); pw.println(" mAod=" + mAod); pw.println("Lock Icon View actual measurements:"); Loading
packages/SystemUI/src/com/android/keyguard/LockIconViewController.java +8 −7 Original line number Diff line number Diff line Loading @@ -31,8 +31,6 @@ import android.graphics.PointF; import android.graphics.Rect; import android.graphics.drawable.AnimatedStateListDrawable; import android.hardware.biometrics.BiometricSourceType; import android.hardware.biometrics.SensorLocationInternal; import android.hardware.fingerprint.FingerprintSensorPropertiesInternal; import android.os.Process; import android.os.VibrationAttributes; import android.util.DisplayMetrics; Loading Loading @@ -125,6 +123,7 @@ public class LockIconViewController extends ViewController<LockIconView> impleme private float mHeightPixels; private float mWidthPixels; private int mBottomPaddingPx; private int mScaledPaddingPx; private boolean mShowUnlockIcon; private boolean mShowLockIcon; Loading Loading @@ -341,6 +340,10 @@ public class LockIconViewController extends ViewController<LockIconView> impleme mHeightPixels = bounds.bottom; mBottomPaddingPx = getResources().getDimensionPixelSize(R.dimen.lock_icon_margin_bottom); final int defaultPaddingPx = getResources().getDimensionPixelSize(R.dimen.lock_icon_padding); mScaledPaddingPx = (int) (defaultPaddingPx * mAuthController.getScaleFactor()); mUnlockedLabel = mView.getContext().getResources().getString( R.string.accessibility_unlock_button); mLockedLabel = mView.getContext() Loading @@ -351,15 +354,13 @@ public class LockIconViewController extends ViewController<LockIconView> impleme private void updateLockIconLocation() { if (mUdfpsSupported) { FingerprintSensorPropertiesInternal props = mAuthController.getUdfpsProps().get(0); final SensorLocationInternal location = props.getLocation(); mView.setCenterLocation(new PointF(location.sensorLocationX, location.sensorLocationY), location.sensorRadius); mView.setCenterLocation(mAuthController.getUdfpsLocation(), mAuthController.getUdfpsRadius(), mScaledPaddingPx); } else { mView.setCenterLocation( new PointF(mWidthPixels / 2, mHeightPixels - mBottomPaddingPx - sLockIconRadiusPx), sLockIconRadiusPx); sLockIconRadiusPx, mScaledPaddingPx); } mView.getHitRect(mSensorTouchLocation); Loading
packages/SystemUI/src/com/android/systemui/biometrics/AuthController.java +21 −0 Original line number Diff line number Diff line Loading @@ -443,6 +443,27 @@ public class AuthController extends CoreStartable implements CommandQueue.Callba return new PointF(mUdfpsBounds.centerX(), mUdfpsBounds.centerY()); } /** * @return the radius of UDFPS on the screen in pixels */ public int getUdfpsRadius() { if (mUdfpsController == null || mUdfpsBounds == null) { return -1; } return mUdfpsBounds.height() / 2; } /** * @return the scale factor representing the user's current resolution / the stable * (default) resolution */ public float getScaleFactor() { if (mUdfpsController == null || mUdfpsController.mOverlayParams == null) { return 1f; } return mUdfpsController.mOverlayParams.getScaleFactor(); } /** * @return where the fingerprint sensor exists in pixels in portrait mode. devices without an * overridden value will use the default value even if they don't have a fingerprint sensor Loading