不同的屏幕由于分辨率的不一样,导致一些图标显示的大小有问题。本问题就是由于device的Display Size 过小,导致显示的图标很小。
修改的文件为:
packages/SystemUI/src/com/android/keyguard/LockIconViewController.java
关键Code:
private void updateLockIconLocation() {
final float scaleFactor = mAuthController.getScaleFactor();
final int scaledPadding = (int) (mDefaultPaddingPx * scaleFactor);
if (mUdfpsSupported) {
mView.setCenterLocation(mAuthController.getUdfpsLocation(),
mAuthController.getUdfpsRadius(), scaledPadding);
} else {
DisplayMetrics displayMetrics = Resources.getSystem().getDisplayMetrics();
if (displayMetrics.widthPixels <= 480) {
mView.setCenterLocation(
new PointF(mWidthPixels / 2,
mHeightPixels - ((mBottomPaddingPx + sLockIconRadiusPxSmallPanel) * scaleFactor)),
sLockIconRadiusPxSmallPanel * scaleFactor, scaledPadding);
} else {
mView.setCenterLocation(
new PointF(mWidthPixels / 2,
mHeightPixels - ((mBottomPaddingPx + sLockIconRadiusPx) * scaleFactor)),
sLockIconRadiusPx * scaleFactor, scaledPadding);
}
}
}
}