|
|
@ -19,6 +19,7 @@ package eu.faircode.email;
|
|
|
|
Copyright 2018-2019 by Marcel Bokhorst (M66B)
|
|
|
|
Copyright 2018-2019 by Marcel Bokhorst (M66B)
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import android.content.ActivityNotFoundException;
|
|
|
|
import android.content.Context;
|
|
|
|
import android.content.Context;
|
|
|
|
import android.content.Intent;
|
|
|
|
import android.content.Intent;
|
|
|
|
import android.content.SharedPreferences;
|
|
|
|
import android.content.SharedPreferences;
|
|
|
@ -240,6 +241,9 @@ public class FragmentOAuth extends FragmentBase {
|
|
|
|
if (BuildConfig.DEBUG)
|
|
|
|
if (BuildConfig.DEBUG)
|
|
|
|
Log.i("OAuth uri=" + authRequest.toUri());
|
|
|
|
Log.i("OAuth uri=" + authRequest.toUri());
|
|
|
|
Intent authIntent = authService.getAuthorizationRequestIntent(authRequest);
|
|
|
|
Intent authIntent = authService.getAuthorizationRequestIntent(authRequest);
|
|
|
|
|
|
|
|
if (authIntent.resolveActivity(getContext().getPackageManager()) == null)
|
|
|
|
|
|
|
|
throw new ActivityNotFoundException(authIntent.toString());
|
|
|
|
|
|
|
|
else
|
|
|
|
startActivityForResult(authIntent, ActivitySetup.REQUEST_OAUTH);
|
|
|
|
startActivityForResult(authIntent, ActivitySetup.REQUEST_OAUTH);
|
|
|
|
} catch (Throwable ex) {
|
|
|
|
} catch (Throwable ex) {
|
|
|
|
showError(ex);
|
|
|
|
showError(ex);
|
|
|
|