From 8d5d065cdf4cbd141eb1d57cb9fc7216a807d5d1 Mon Sep 17 00:00:00 2001 From: Jeff Sharkey Date: Tue, 4 Apr 2017 14:38:39 -0600 Subject: [PATCH] Add legacy DownloadManager actions to SystemApi. They're still used by at least one bundled app. Test: builds, boots Bug: 35256608 Change-Id: I45966b3e0ed506ead4544bbbfc9d82b7f9d5205d --- api/system-current.txt | 1 + core/java/android/app/DownloadManager.java | 6 ++++++ core/java/android/provider/Downloads.java | 4 ++-- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/api/system-current.txt b/api/system-current.txt index 383b3321b1de..2292feb887ef 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -4622,6 +4622,7 @@ package android.app { method public android.database.Cursor query(android.app.DownloadManager.Query); method public int remove(long...); field public static final java.lang.String ACTION_DOWNLOAD_COMPLETE = "android.intent.action.DOWNLOAD_COMPLETE"; + field public static final java.lang.String ACTION_DOWNLOAD_COMPLETED = "android.intent.action.DOWNLOAD_COMPLETED"; field public static final java.lang.String ACTION_NOTIFICATION_CLICKED = "android.intent.action.DOWNLOAD_NOTIFICATION_CLICKED"; field public static final java.lang.String ACTION_VIEW_DOWNLOADS = "android.intent.action.VIEW_DOWNLOADS"; field public static final java.lang.String COLUMN_BYTES_DOWNLOADED_SO_FAR = "bytes_so_far"; diff --git a/core/java/android/app/DownloadManager.java b/core/java/android/app/DownloadManager.java index 462f66f38def..b89c16539b4c 100644 --- a/core/java/android/app/DownloadManager.java +++ b/core/java/android/app/DownloadManager.java @@ -18,6 +18,7 @@ package android.app; import android.annotation.Nullable; import android.annotation.SdkConstant; +import android.annotation.SystemApi; import android.annotation.SdkConstant.SdkConstantType; import android.content.ContentResolver; import android.content.ContentUris; @@ -321,6 +322,11 @@ public class DownloadManager { */ public static final String EXTRA_NOTIFICATION_CLICK_DOWNLOAD_IDS = "extra_click_download_ids"; + /** {@hide} */ + @SystemApi + public static final String ACTION_DOWNLOAD_COMPLETED = + "android.intent.action.DOWNLOAD_COMPLETED"; + /** * columns to request from DownloadProvider. * @hide diff --git a/core/java/android/provider/Downloads.java b/core/java/android/provider/Downloads.java index a280e594525e..9d83bd7e90a6 100644 --- a/core/java/android/provider/Downloads.java +++ b/core/java/android/provider/Downloads.java @@ -114,7 +114,7 @@ public final class Downloads { * download's content: uri is specified in the intent's data. */ public static final String ACTION_DOWNLOAD_COMPLETED = - "android.intent.action.DOWNLOAD_COMPLETED"; + DownloadManager.ACTION_DOWNLOAD_COMPLETED; /** * Broadcast Action: this is sent by the download manager to the app @@ -127,7 +127,7 @@ public final class Downloads { * successfully. */ public static final String ACTION_NOTIFICATION_CLICKED = - "android.intent.action.DOWNLOAD_NOTIFICATION_CLICKED"; + DownloadManager.ACTION_NOTIFICATION_CLICKED; /** * The name of the column containing the URI of the data being downloaded. -- 2.11.0