summaryrefslogtreecommitdiffstats
path: root/core/java/android/content
diff options
context:
space:
mode:
authorFabrice Di Meglio <fdimeglio@google.com>2015-04-09 20:03:23 -0700
committerFabrice Di Meglio <fdimeglio@google.com>2015-04-10 14:00:17 -0700
commit2d897fbc447fd315b246a752e14825cbd7214e74 (patch)
tree4006c69731184ca54112dea422fad4d01304c218 /core/java/android/content
parente48c137acdddd477d671417eb93ec120a1931cbb (diff)
downloadframeworks_base-2d897fbc447fd315b246a752e14825cbd7214e74.zip
frameworks_base-2d897fbc447fd315b246a752e14825cbd7214e74.tar.gz
frameworks_base-2d897fbc447fd315b246a752e14825cbd7214e74.tar.bz2
Add IntentFilter auto verification - part 6
- fix handleAllWebDataURI() for taking into account CATEGORY_APP_BROWSER Change-Id: I91f7628b3e2e40aa44143470ad38576f7874c7ff
Diffstat (limited to 'core/java/android/content')
-rw-r--r--core/java/android/content/IntentFilter.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/core/java/android/content/IntentFilter.java b/core/java/android/content/IntentFilter.java
index 044e3e3..33c0b87 100644
--- a/core/java/android/content/IntentFilter.java
+++ b/core/java/android/content/IntentFilter.java
@@ -521,14 +521,18 @@ public class IntentFilter implements Parcelable {
*
* @return True if the filter handle all HTTP or HTTPS data URI. False otherwise.
*
- * This will check if if the Intent action is {@link android.content.Intent#ACTION_VIEW} and
+ * This will check if:
+ *
+ * - either the Intent category is {@link android.content.Intent#CATEGORY_APP_BROWSER}
+ * - either the Intent action is {@link android.content.Intent#ACTION_VIEW} and
* the Intent category is {@link android.content.Intent#CATEGORY_BROWSABLE} and the Intent
* data scheme is "http" or "https" and that there is no specific host defined.
*
* @hide
*/
public final boolean handleAllWebDataURI() {
- return hasWebDataURI() && (countDataAuthorities() == 0);
+ return hasCategory(Intent.CATEGORY_APP_BROWSER) ||
+ (hasWebDataURI() && countDataAuthorities() == 0);
}
/**