Merge "Deprecated scoped directory access."
This commit is contained in:
committed by
Android (Google) Code Review
commit
157edce8a7
@@ -331,7 +331,12 @@ public final class StorageVolume implements Parcelable {
|
||||
* @return intent to request access, or {@code null} if the requested directory is invalid for
|
||||
* that volume.
|
||||
* @see DocumentsContract
|
||||
* @deprecated Callers should migrate to using {@link Intent#ACTION_OPEN_DOCUMENT_TREE} instead.
|
||||
* Launching this {@link Intent} on devices running
|
||||
* {@link android.os.Build.VERSION_CODES#Q} or higher, will immediately finish
|
||||
* with a result code of {@link android.app.Activity#RESULT_CANCELED}.
|
||||
*/
|
||||
@Deprecated
|
||||
public @Nullable Intent createAccessIntent(String directoryName) {
|
||||
if ((isPrimary() && directoryName == null) ||
|
||||
(directoryName != null && !Environment.isStandardDirectory(directoryName))) {
|
||||
@@ -425,32 +430,4 @@ 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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1600,8 +1600,11 @@ public final class Settings {
|
||||
* Applications typically use this action to ask the user to revert the "Do not ask again"
|
||||
* status of directory access requests made by
|
||||
* {@link android.os.storage.StorageVolume#createAccessIntent(String)}.
|
||||
* @deprecated use {@link #ACTION_APPLICATION_DETAILS_SETTINGS} to manage storage permissions
|
||||
* for a specific application
|
||||
*/
|
||||
@SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
|
||||
@Deprecated
|
||||
public static final String ACTION_STORAGE_VOLUME_ACCESS_SETTINGS =
|
||||
"android.settings.STORAGE_VOLUME_ACCESS_SETTINGS";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user