Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(38)

Unified Diff: base/android/java/src/org/chromium/base/ApiCompatibilityUtils.java

Issue 2820473003: Use file Uri to launch intent for download on M and below (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | base/android/java/src/org/chromium/base/FileUtils.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/android/java/src/org/chromium/base/ApiCompatibilityUtils.java
diff --git a/base/android/java/src/org/chromium/base/ApiCompatibilityUtils.java b/base/android/java/src/org/chromium/base/ApiCompatibilityUtils.java
index 64bbd511f4312cfd94b2f297196514b589f596d8..c950d2cd9f9a3415a70592d1701c5b25eb6d8102 100644
--- a/base/android/java/src/org/chromium/base/ApiCompatibilityUtils.java
+++ b/base/android/java/src/org/chromium/base/ApiCompatibilityUtils.java
@@ -632,6 +632,18 @@ public class ApiCompatibilityUtils {
}
/**
+ * Get the URI for a downloaded file.
+ *
+ * @param file A downloaded file.
+ * @return URI for |file|.
+ */
+ public static Uri getUriForDownloadedFile(File file) {
+ return Build.VERSION.SDK_INT > Build.VERSION_CODES.M
+ ? FileUtils.getUriForFile(file)
+ : Uri.fromFile(file);
+ }
+
+ /**
* @see android.view.Window#FEATURE_INDETERMINATE_PROGRESS
*/
public static void setWindowIndeterminateProgress(Window window) {
« no previous file with comments | « no previous file | base/android/java/src/org/chromium/base/FileUtils.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698