Add category 'CATEGORY_OPENABLE' to upload handler intent.
Missing category from intent was allowing file handler to show
'Contacts' in the open from list. UploadHandler is meant to only
handler URIs that can be opened with 'openFileDescriptor'.
This patch fixes issue by adding category 'CATEGORY_OPENABLE' to
file chooser intent which hides 'Contacts' and only shows categories
supported by upload handler.
CR-Fixed: 772926
Change-Id: Ie28aa54090ab5d7a0c9bf3725368b67cdf1eb407
diff --git a/src/com/android/browser/UploadHandler.java b/src/com/android/browser/UploadHandler.java
index c06d24e..fb74763 100644
--- a/src/com/android/browser/UploadHandler.java
+++ b/src/com/android/browser/UploadHandler.java
@@ -531,6 +531,7 @@
Intent i = new Intent(Intent.ACTION_GET_CONTENT);
i.setType(openableMimeType);
i.setComponent(name);
+ i.addCategory(Intent.CATEGORY_OPENABLE);
intentList.add(i);
// Step 3: Pass all the apps and their corresponding intents to uploaddialog