mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-28 11:55:20 +01:00
Disable custom tabs for OAuth
This commit is contained in:
@@ -301,19 +301,20 @@ public class FragmentOAuth extends FragmentBase {
|
||||
|
||||
AppAuthConfiguration appAuthConfig = new AppAuthConfiguration.Builder()
|
||||
.setBrowserMatcher(new BrowserMatcher() {
|
||||
final BrowserMatcher SBROWSER = new VersionedBrowserMatcher(
|
||||
Browsers.SBrowser.PACKAGE_NAME,
|
||||
Browsers.SBrowser.SIGNATURE_SET,
|
||||
true,
|
||||
VersionRange.atMost("5.3"));
|
||||
|
||||
@Override
|
||||
public boolean matches(@NonNull BrowserDescriptor descriptor) {
|
||||
BrowserMatcher sbrowser = new VersionedBrowserMatcher(
|
||||
Browsers.SBrowser.PACKAGE_NAME,
|
||||
Browsers.SBrowser.SIGNATURE_SET,
|
||||
true,
|
||||
VersionRange.atMost("5.3"));
|
||||
boolean accept = (!sbrowser.matches(descriptor) &&
|
||||
(!"gmail".equals(provider.id) || !descriptor.useCustomTab));
|
||||
boolean accept =
|
||||
(!SBROWSER.matches(descriptor) && !descriptor.useCustomTab);
|
||||
EntityLog.log(context,
|
||||
"Browser=" + descriptor.packageName +
|
||||
":" + descriptor.version +
|
||||
":" + descriptor.useCustomTab + "" +
|
||||
" tabs=" + descriptor.useCustomTab + "" +
|
||||
" accept=" + accept +
|
||||
" provider=" + provider.id);
|
||||
return accept;
|
||||
|
||||
Reference in New Issue
Block a user