Display App installed in other user in All Apps

Only for admin user.

Also clean up unused getInstallationStatus().

Fix: 277299765
Test: Manually with All Apps when multiple users is on
Test: Unit test
Change-Id: I4de681c101a605e3517dcd8765bf7a95d1b76417
This commit is contained in:
Chaohui Wang
2023-04-10 01:32:35 +08:00
parent bc1ee1264b
commit c688f93ed9
9 changed files with 58 additions and 46 deletions

View File

@@ -986,17 +986,6 @@ public final class Utils extends com.android.settingslib.Utils {
return false;
}
/**
* Return the resource id to represent the install status for an app
*/
@StringRes
public static int getInstallationStatus(ApplicationInfo info) {
if ((info.flags & ApplicationInfo.FLAG_INSTALLED) == 0) {
return R.string.not_installed;
}
return info.enabled ? R.string.installed : R.string.disabled;
}
private static boolean isVolumeValid(VolumeInfo volume) {
return (volume != null) && (volume.getType() == VolumeInfo.TYPE_PRIVATE)
&& volume.isMountedReadable();