Respond to API council feedback.

Move aggressive allocation to @SystemApi, which means we can hide
the "flags" API variants.

Remove UUID APIs, since we should use existing Serializable APIs.

Relax permission checks to allow apps to ask for their own stats.

Improve docs.

Test: cts-tradefed run commandAndExit cts-dev -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.StorageHostTest
Bug: 37534687, 37534941, 37718184, 37738770
Change-Id: I6a763fb3ab3169c8d3329765bb31e1ee08d9ced7
diff --git a/core/java/android/content/pm/ApplicationInfo.java b/core/java/android/content/pm/ApplicationInfo.java
index 6c5d26a..06f7916 100644
--- a/core/java/android/content/pm/ApplicationInfo.java
+++ b/core/java/android/content/pm/ApplicationInfo.java
@@ -1205,7 +1205,8 @@
         dest.writeInt(largestWidthLimitDp);
         if (storageUuid != null) {
             dest.writeInt(1);
-            dest.writeUuid(storageUuid);
+            dest.writeLong(storageUuid.getMostSignificantBits());
+            dest.writeLong(storageUuid.getLeastSignificantBits());
         } else {
             dest.writeInt(0);
         }
@@ -1271,7 +1272,7 @@
         compatibleWidthLimitDp = source.readInt();
         largestWidthLimitDp = source.readInt();
         if (source.readInt() != 0) {
-            storageUuid = source.readUuid();
+            storageUuid = new UUID(source.readLong(), source.readLong());
             volumeUuid = StorageManager.convert(storageUuid);
         }
         scanSourceDir = source.readString();