Logging to aid bug investigation.

We're trying to figure out where volumes are disappearing.

Bug: 158059178
Test: none
Change-Id: I68959f0a163e2fece13fcb08a6c9f55ec1beb0f6
This commit is contained in:
Jeff Sharkey
2020-06-04 17:35:36 -06:00
parent 9f15ba2e1a
commit 0a8e32c124

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);