From 12e15cc6ed0ebe29c1822945172c30864feb6c58 Mon Sep 17 00:00:00 2001 From: Felipe Leme Date: Fri, 12 Jan 2018 09:14:16 -0800 Subject: [PATCH] Created hidden constants and metrics for ScopedAccessProvider. Test: echo 'Not yet!' Bug: 63720392 Change-Id: I811cde225fdcf5271fda9b357da742e408de0627 --- .../android/os/storage/StorageVolume.java | 28 +++++++++++++++++++ proto/src/metrics_constants.proto | 9 ++++++ 2 files changed, 37 insertions(+) diff --git a/core/java/android/os/storage/StorageVolume.java b/core/java/android/os/storage/StorageVolume.java index 070b8c1b0008e..839a8bf42b109 100644 --- a/core/java/android/os/storage/StorageVolume.java +++ b/core/java/android/os/storage/StorageVolume.java @@ -394,4 +394,32 @@ public final class StorageVolume implements Parcelable { parcel.writeString(mFsUuid); parcel.writeString(mState); } + + /** {@hide} */ + public static final class ScopedAccessProviderContract { + + private ScopedAccessProviderContract() { + throw new UnsupportedOperationException("contains constants only"); + } + + public static final String AUTHORITY = "com.android.documentsui.scopedAccess"; + + public static final String TABLE_PACKAGES = "packages"; + public static final String TABLE_PERMISSIONS = "permissions"; + + public static final String COL_PACKAGE = "package_name"; + public static final String COL_VOLUME_UUID = "volume_uuid"; + public static final String COL_DIRECTORY = "directory"; + public static final String COL_GRANTED = "granted"; + + public static final String[] TABLE_PACKAGES_COLUMNS = new String[] { COL_PACKAGE }; + public static final String[] TABLE_PERMISSIONS_COLUMNS = + new String[] { COL_PACKAGE, COL_VOLUME_UUID, COL_DIRECTORY, COL_GRANTED }; + + public static final int TABLE_PACKAGES_COL_PACKAGE = 0; + public static final int TABLE_PERMISSIONS_COL_PACKAGE = 0; + public static final int TABLE_PERMISSIONS_COL_VOLUME_UUID = 1; + public static final int TABLE_PERMISSIONS_COL_DIRECTORY = 2; + public static final int TABLE_PERMISSIONS_COL_GRANTED = 3; + } } diff --git a/proto/src/metrics_constants.proto b/proto/src/metrics_constants.proto index 10a809aaae08c..04cee676075d9 100644 --- a/proto/src/metrics_constants.proto +++ b/proto/src/metrics_constants.proto @@ -5134,6 +5134,15 @@ message MetricsEvent { // OS: P ACTION_SCREENSHOT_POWER_MENU = 1282; + // OPEN: Settings > Apps & Notifications -> Special app access -> Storage Access + // CATEGORY: SETTINGS + // OS: P + STORAGE_ACCESS = 1283; + + // OPEN: Settings > Apps & Notifications -> Special app access -> Storage Access -> Package + // CATEGORY: SETTINGS + // OS: P + APPLICATIONS_STORAGE_DETAIL = 1284; // ---- End P Constants, all P constants go above this line ---- // Add new aosp constants above this line.