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

Commit e0297133 authored by Hai Zhang's avatar Hai Zhang
Browse files

Resolve all browsers even if there is a default browser.

PackageManager.queryIntentActivities() handles browser intent
differently when there is a default browser, and only returns the
default browser. Previous code for querying all the browsers all
passed in the PackageManager.MATCH_ALL flag and filtered the result
manually, so we move that logic into RoleBehavior.

Bug: 110557011
Test: build
Change-Id: I928f13d27aca64d49f625dd1ffbd3262b42a06cd
parent b1882925
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1572,6 +1572,10 @@ package android.content.pm {
    field public int requestRes;
  }
  public class ResolveInfo implements android.os.Parcelable {
    field public boolean handleAllWebDataURI;
  }
  public class ShortcutManager {
    method public java.util.List<android.content.pm.ShortcutManager.ShareShortcutInfo> getShareTargets(android.content.IntentFilter);
  }
+6 −2
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package android.content.pm;

import android.annotation.SystemApi;
import android.annotation.UnsupportedAppUsage;
import android.content.ComponentName;
import android.content.IntentFilter;
@@ -175,9 +176,12 @@ public class ResolveInfo implements Parcelable {
    public boolean system;

    /**
     * @hide Does the associated IntentFilter comes from a Browser ?
     * Will be set to {@code true} if the {@link IntentFilter} responsible for intent
     * resolution is classified as a "browser".
     *
     * @hide
     */
    @UnsupportedAppUsage
    @SystemApi
    public boolean handleAllWebDataURI;

    /** {@hide} */