Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2d897fbc authored by Fabrice Di Meglio's avatar Fabrice Di Meglio
Browse files

Add IntentFilter auto verification - part 6

- fix handleAllWebDataURI() for taking into account CATEGORY_APP_BROWSER

Change-Id: I91f7628b3e2e40aa44143470ad38576f7874c7ff
parent e48c137a
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -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);
    }

    /**