commit | 19f65255461d1ae186f257f859af0bbe0aeeae02 | [log] [tgz] |
---|---|---|
author | Holly Sun <jiuyu@google.com> | Wed Aug 02 16:01:49 2023 -0700 |
committer | Holly Sun <jiuyu@google.com> | Thu Aug 03 09:39:18 2023 -0700 |
tree | e9d0b27ff50da320bf7b727d214bb3093146f2b4 | |
parent | 068df4c1ca6a3f62ffa7fbd32aa9037b19b02240 [diff] |
Refresh `mNumAppsPerRowAllApps` when device profile changes. The return value of SrollableLayoutManager#getItemsHeight is wrong, which is caused by the return value of `incrementTotalHeight` (https://source.corp.google.com/h/googleplex-android/platform/superproject/main/+/main:packages/apps/Launcher3/src/com/android/launcher3/util/ScrollableLayoutManager.java;l=151-163). In AllAppsGridAdapter#incrementTotalHeight (https://source.corp.google.com/h/googleplex-android/platform/superproject/main/+/main:packages/apps/Launcher3/src/com/android/launcher3/allapps/AllAppsGridAdapter.java;l=172), `item.rowAppIndex` is still the staled value after app grid change / device fold & unfold. This value is calculated in AlphabeticalAppsList (https://source.corp.google.com/h/googleplex-android/platform/superproject/main/+/main:packages/apps/Launcher3/src/com/android/launcher3/allapps/AlphabeticalAppsList.java;l=276-280). The mod `mNumAppsPerRowAllApps` is staled. So add an setter in `AlphabeticalAppsList` to update `mNumAppsPerRowAllApps`. Bug: 262003765 Bug: 284940820 Test: manual Flag: N/A Change-Id: I74a99a3dc58ee45f066bcefb3e9c56be02b62f82