Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0d8440f4 authored by Daniel Nishi's avatar Daniel Nishi
Browse files

Query app info as user for cache.

This handles cases where a secondary user/profile has an app
installed, but not the current user.

Change-Id: I876b149d824767d8fd49a2ae3da7dfa188b17fc7
Fixes: 36296087
Test: Manually verified dumpsys installd before and after.
parent b30ee8d0
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -186,7 +186,8 @@ public class CacheQuotaStrategy implements RemoteCallback.OnResultListener {
                try {
                try {
                    // We need the app info to determine the uid and the uuid of the volume
                    // We need the app info to determine the uid and the uuid of the volume
                    // where the app is installed.
                    // where the app is installed.
                    ApplicationInfo appInfo = packageManager.getApplicationInfo(packageName, 0);
                    ApplicationInfo appInfo = packageManager.getApplicationInfoAsUser(
                            packageName, 0, info.id);
                    requests.add(
                    requests.add(
                            new CacheQuotaHint.Builder()
                            new CacheQuotaHint.Builder()
                                    .setVolumeUuid(appInfo.volumeUuid)
                                    .setVolumeUuid(appInfo.volumeUuid)