diff options
author | Leon Scroggins <scroggo@google.com> | 2010-01-28 17:52:41 -0500 |
---|---|---|
committer | Leon Scroggins <scroggo@google.com> | 2010-02-05 11:18:34 -0500 |
commit | 744d90245378e53862ba02869864b36cea832648 (patch) | |
tree | b8d7e7f0c12f95f30288e7572603376168bf60f9 /core | |
parent | 1009e82ef2985a55f0afcbfa7f31bddb73039982 (diff) | |
download | frameworks_base-744d90245378e53862ba02869864b36cea832648.zip frameworks_base-744d90245378e53862ba02869864b36cea832648.tar.gz frameworks_base-744d90245378e53862ba02869864b36cea832648.tar.bz2 |
Add a new permission and remove createTitleFromFilename.
Part of http://b/issue?id=2384554
Requires a change to packages/providers/DownloadProvider
Diffstat (limited to 'core')
-rw-r--r-- | core/java/android/provider/Downloads.java | 31 |
1 files changed, 8 insertions, 23 deletions
diff --git a/core/java/android/provider/Downloads.java b/core/java/android/provider/Downloads.java index 08ab166..348e9e8 100644 --- a/core/java/android/provider/Downloads.java +++ b/core/java/android/provider/Downloads.java @@ -629,6 +629,14 @@ public final class Downloads { "android.permission.SEND_DOWNLOAD_COMPLETED_INTENTS"; /** + * The permission to access downloads to {@link DESTINATION_EXTERNAL} + * which were downloaded by other applications. + * @hide + */ + public static final String PERMISSION_SEE_ALL_EXTERNAL = + "android.permission.SEE_ALL_EXTERNAL"; + + /** * The content:// URI for the data table in the provider */ public static final Uri CONTENT_URI = @@ -1101,28 +1109,5 @@ public final class Downloads { * This download doesn't show in the UI or in the notifications. */ public static final int VISIBILITY_HIDDEN = 2; - - /** - * Using a file name, create a title for a download. Then store it in - * the database and return it. - * - * @param context Context for reaching the {@link ContentResolver} so - * the database can be updated with the new title. - * @param filename Full path to the file. Used to generate a title. - * @param id Id of the download, so the new title can be stored in the - * database - * @return String Newly created title. - * @hide - */ - public static String createTitleFromFilename(Context context, - String filename, long id) { - if (filename == null) return null; - String title = new File(filename).getName(); - ContentValues values = new ContentValues(); - values.put(COLUMN_TITLE, title); - context.getContentResolver().update(ContentUris.withAppendedId( - CONTENT_URI, id), values, null, null); - return title; - } } } |