Merge "Remove DocumentsContract.ACTION_BROWSE."

This commit is contained in:
Garfield Tan
2017-03-02 00:35:54 +00:00
committed by Android (Google) Code Review
3 changed files with 3 additions and 6 deletions

View File

@@ -435,7 +435,7 @@ public class VolumeInfo implements Parcelable {
return null;
}
final Intent intent = new Intent(DocumentsContract.ACTION_BROWSE);
final Intent intent = new Intent(Intent.ACTION_VIEW);
intent.addCategory(Intent.CATEGORY_DEFAULT);
intent.setDataAndType(uri, DocumentsContract.Root.MIME_TYPE_ITEM);

View File

@@ -161,9 +161,6 @@ public final class DocumentsContract {
/** {@hide} */
public static final String ACTION_MANAGE_DOCUMENT = "android.provider.action.MANAGE_DOCUMENT";
/** {@hide} */
public static final String ACTION_BROWSE = "android.provider.action.BROWSE";
/** {@hide} */
public static final String
ACTION_DOCUMENT_ROOT_SETTINGS = "android.provider.action.DOCUMENT_ROOT_SETTINGS";

View File

@@ -46,8 +46,8 @@ public class ReceiverActivity extends Activity {
final Uri uri = DocumentsContract.buildRootUri(
MtpDocumentsProvider.AUTHORITY, deviceRootId);
final Intent intent = new Intent(DocumentsContract.ACTION_BROWSE);
intent.setData(uri);
final Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(uri, DocumentsContract.Root.MIME_TYPE_ITEM);
intent.addCategory(Intent.CATEGORY_DEFAULT);
this.startActivity(intent);
} catch (IOException exception) {