From 8c9cef79df1ddcd971a0a0775cef774c17a5081c Mon Sep 17 00:00:00 2001 From: Jeff Sharkey Date: Thu, 15 Aug 2013 16:23:09 -0700 Subject: Delegate to documents UI; improve contents. When Downloads app is launched, delegate to new documents management UI. Use DownloadManager public API to match the contents of the existing Downloads UI. Bug: 10329983 Change-Id: Iaa1a1dc013cfe3b17d31ecc764d4c4cc13f62258 --- ui/AndroidManifest.xml | 6 +++--- ui/src/com/android/providers/downloads/ui/DownloadList.java | 12 ++++++++++++ 2 files changed, 15 insertions(+), 3 deletions(-) (limited to 'ui') diff --git a/ui/AndroidManifest.xml b/ui/AndroidManifest.xml index f707dfbd..61669154 100644 --- a/ui/AndroidManifest.xml +++ b/ui/AndroidManifest.xml @@ -13,9 +13,9 @@ android:supportsRtl="true" android:requiredForAllUsers="true"> - + diff --git a/ui/src/com/android/providers/downloads/ui/DownloadList.java b/ui/src/com/android/providers/downloads/ui/DownloadList.java index 05b5d757..57530474 100644 --- a/ui/src/com/android/providers/downloads/ui/DownloadList.java +++ b/ui/src/com/android/providers/downloads/ui/DownloadList.java @@ -33,6 +33,7 @@ import android.os.Environment; import android.os.Handler; import android.os.Parcelable; import android.provider.BaseColumns; +import android.provider.DocumentsContract; import android.provider.Downloads; import android.util.Log; import android.util.SparseBooleanArray; @@ -148,6 +149,17 @@ public class DownloadList extends Activity { @Override public void onCreate(Bundle icicle) { super.onCreate(icicle); + + // Trampoline over to new management UI + final Intent intent = new Intent(Intent.ACTION_MANAGE_DOCUMENT); + intent.setData(DocumentsContract.buildRootUri( + Constants.STORAGE_AUTHORITY, Constants.STORAGE_ROOT)); + startActivity(intent); + finish(); + } + + public void onCreateLegacy(Bundle icicle) { + super.onCreate(icicle); setFinishOnTouchOutside(true); setupViews(); -- cgit v1.2.3