mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-23 00:06:27 +00:00
Check for browser
This commit is contained in:
parent
3dfaa44e89
commit
555ea550cd
1 changed files with 6 additions and 1 deletions
|
@ -295,7 +295,12 @@ public class FragmentOAuth extends FragmentBase {
|
|||
AuthorizationRequest authRequest = authRequestBuilder.build();
|
||||
|
||||
Log.i("OAuth request provider=" + provider.id + " uri=" + authRequest.toUri());
|
||||
Intent authIntent = authService.getAuthorizationRequestIntent(authRequest);
|
||||
Intent authIntent = null;
|
||||
try {
|
||||
authIntent = authService.getAuthorizationRequestIntent(authRequest);
|
||||
} catch (ActivityNotFoundException ex) {
|
||||
throw new ActivityNotFoundException("Browser not found");
|
||||
}
|
||||
PackageManager pm = getContext().getPackageManager();
|
||||
if (authIntent.resolveActivity(pm) == null) // action whitelisted
|
||||
throw new ActivityNotFoundException(authIntent.toString());
|
||||
|
|
Loading…
Reference in a new issue