Merge "Set iconsSizePx of Taskbar's DeviceProfile directly" into tm-qpr-dev am: 98d33cdff9 am: a1608fb21a

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/20747426

Change-Id: I1608c3061545fcffaafd398bdb0195e0637d4db8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Alex Chau
2022-12-16 17:58:51 +00:00
committed by Automerger Merge Worker
2 changed files with 12 additions and 14 deletions

View File

@@ -271,14 +271,13 @@ public class TaskbarActivityContext extends BaseTaskbarContext {
}
private void updateIconSize(Resources resources) {
float taskbarIconSize = resources.getDimension(DisplayController.isTransientTaskbar(this)
? mDeviceProfile.isTwoPanels
? R.dimen.transient_taskbar_two_panels_icon_size
: R.dimen.transient_taskbar_icon_size
: R.dimen.taskbar_icon_size);
mDeviceProfile.updateIconSize(1, resources);
float iconScale = taskbarIconSize / mDeviceProfile.iconSizePx;
mDeviceProfile.updateIconSize(iconScale, resources);
mDeviceProfile.iconSizePx = resources.getDimensionPixelSize(
DisplayController.isTransientTaskbar(this)
? mDeviceProfile.isTwoPanels
? R.dimen.transient_taskbar_two_panels_icon_size
: R.dimen.transient_taskbar_icon_size
: R.dimen.taskbar_icon_size);
mDeviceProfile.updateIconSize(1f, resources);
}
/**