Merge "Logging to aid bug investigation." into rvc-dev am: bb9ea4e1fa

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11745078

Change-Id: I72ef1b7bf14215c76ff67aea1941ab43a27f0e02
This commit is contained in:
Jeff Sharkey
2020-06-04 23:51:12 +00:00
committed by Automerger Merge Worker

View File

@@ -1365,6 +1365,7 @@ public class StorageManager {
String[] packageNames = ActivityThread.getPackageManager().getPackagesForUid(
android.os.Process.myUid());
if (packageNames == null || packageNames.length <= 0) {
Log.w(TAG, "Missing package names; no storage volumes available");
return new StorageVolume[0];
}
packageName = packageNames[0];
@@ -1372,6 +1373,7 @@ public class StorageManager {
final int uid = ActivityThread.getPackageManager().getPackageUid(packageName,
PackageManager.MATCH_DEBUG_TRIAGED_MISSING, userId);
if (uid <= 0) {
Log.w(TAG, "Missing UID; no storage volumes available");
return new StorageVolume[0];
}
return storageManager.getVolumeList(uid, packageName, flags);