Add UID in AppInfo.

Create a reverse hashmap of PackageUserKey to Uid in AllAppsStore for
faster lookup of uid based on packageName and userHandle.

Log Uid in Impression Logging.

Bug: 282849559
Test: Manual. See various usecases documented in http://shortn/_UcvAYOmLIP
Flag: NA

Change-Id: I416426214f6b6efc45f7d4c0433bbbfca9056adf
This commit is contained in:
Anushree Ganjam
2023-05-18 22:03:16 +00:00
parent 57eaf86f8d
commit 97434eea53
12 changed files with 129 additions and 31 deletions

View File

@@ -37,6 +37,7 @@ import com.android.launcher3.util.IntArray;
import com.android.launcher3.util.IntSet;
import com.android.launcher3.util.LauncherLayoutBuilder;
import com.android.launcher3.util.LauncherModelHelper;
import com.android.launcher3.util.PackageUserKey;
import com.android.launcher3.util.RunnableList;
import com.android.launcher3.util.TestUtil;
@@ -48,6 +49,7 @@ import org.junit.runner.RunWith;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.stream.Collectors;
@@ -192,7 +194,8 @@ public class ModelMultiCallbacksTest {
}
@Override
public void bindAllApplications(AppInfo[] apps, int flags) {
public void bindAllApplications(AppInfo[] apps, int flags,
Map<PackageUserKey, Integer> packageUserKeytoUidMap) {
mAppInfos = apps;
}