public class VersionedBrowserMatcher extends Object implements BrowserMatcher
Matches a browser based on its package name, set of signatures, version and whether it is being used as a custom tab. This can be used as part of a browser whitelist or blacklist.
| Modifier and Type | Field and Description |
|---|---|
static VersionedBrowserMatcher |
CHROME_BROWSER
Matches any version of Google Chrome for use as a standalone browser.
|
static VersionedBrowserMatcher |
CHROME_CUSTOM_TAB
Matches any version of Chrome for use as a custom tab.
|
static VersionedBrowserMatcher |
FIREFOX_BROWSER
Matches any version of Mozilla Firefox.
|
static VersionedBrowserMatcher |
SAMSUNG_BROWSER
Matches any version of SBrowser for use as a standalone browser.
|
static VersionedBrowserMatcher |
SAMSUNG_CUSTOM_TAB
Matches any version of SBrowser for use as a custom tab.
|
| Constructor and Description |
|---|
VersionedBrowserMatcher(String packageName,
Set<String> signatureHashes,
boolean usingCustomTab,
VersionRange versionRange)
Creates a browser matcher that requires an exact match on package name, set of signature
hashes, custom tab usage mode, and a version range.
|
VersionedBrowserMatcher(String packageName,
String signatureHash,
boolean usingCustomTab,
VersionRange versionRange)
Creates a browser matcher that requires an exact match on package name, single signature
hash, custom tab usage mode, and a version range.
|
public static final VersionedBrowserMatcher CHROME_CUSTOM_TAB
Matches any version of Chrome for use as a custom tab.
public static final VersionedBrowserMatcher CHROME_BROWSER
Matches any version of Google Chrome for use as a standalone browser.
public static final VersionedBrowserMatcher FIREFOX_BROWSER
Matches any version of Mozilla Firefox.
public static final VersionedBrowserMatcher SAMSUNG_BROWSER
Matches any version of SBrowser for use as a standalone browser.
public static final VersionedBrowserMatcher SAMSUNG_CUSTOM_TAB
Matches any version of SBrowser for use as a custom tab.
public VersionedBrowserMatcher(@NonNull
String packageName,
@NonNull
String signatureHash,
boolean usingCustomTab,
@NonNull
VersionRange versionRange)
Creates a browser matcher that requires an exact match on package name, single signature hash, custom tab usage mode, and a version range.
public VersionedBrowserMatcher(@NonNull
String packageName,
@NonNull
Set<String> signatureHashes,
boolean usingCustomTab,
@NonNull
VersionRange versionRange)
Creates a browser matcher that requires an exact match on package name, set of signature hashes, custom tab usage mode, and a version range.
public boolean matches(@NonNull
BrowserDescriptor descriptor)
matches in interface BrowserMatcher