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

Unified Diff: ui/android/java/src/org/chromium/ui/base/SelectFileDialog.java

Issue 453963002: Adding missing Build Version check and @TargetApi annotation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/android/java/src/org/chromium/ui/base/SelectFileDialog.java
diff --git a/ui/android/java/src/org/chromium/ui/base/SelectFileDialog.java b/ui/android/java/src/org/chromium/ui/base/SelectFileDialog.java
index 81a0d2091056657c7e3251d4852ab637ec24076a..52ceac947789d5c10861daa5011adfd0ede7e40e 100644
--- a/ui/android/java/src/org/chromium/ui/base/SelectFileDialog.java
+++ b/ui/android/java/src/org/chromium/ui/base/SelectFileDialog.java
@@ -56,6 +56,7 @@ class SelectFileDialog implements WindowAndroid.IntentCallback{
* @param multiple Whether it should be possible to select multiple files.
* @param window The WindowAndroid that can show intents
*/
+ @TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR2)
@CalledByNative
private void selectFile(
String[] fileTypes, boolean capture, boolean multiple, WindowAndroid window) {
@@ -84,7 +85,7 @@ class SelectFileDialog implements WindowAndroid.IntentCallback{
Intent getContentIntent = new Intent(Intent.ACTION_GET_CONTENT);
getContentIntent.addCategory(Intent.CATEGORY_OPENABLE);
- if (multiple)
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2 && multiple)
getContentIntent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, true);
ArrayList<Intent> extraIntents = new ArrayList<Intent>();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698