prevent NPE if extras is null

Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
This commit is contained in:
tobiasKaminsky 2019-06-11 09:19:43 +02:00
parent 6f70ebd3a1
commit f192bf5813
No known key found for this signature in database
GPG key ID: 0E00D4D47D0C5AF7

View file

@ -292,7 +292,13 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
/// get input values
mAction = getIntent().getByteExtra(EXTRA_ACTION, ACTION_CREATE);
mAccount = getIntent().getExtras().getParcelable(EXTRA_ACCOUNT);
Bundle extras = getIntent().getExtras();
if (extras != null) {
mAccount = extras.getParcelable(EXTRA_ACCOUNT);
}
if (savedInstanceState != null) {
mWaitingForOpId = savedInstanceState.getLong(KEY_WAITING_FOR_OP_ID);
mIsFirstAuthAttempt = savedInstanceState.getBoolean(KEY_AUTH_IS_FIRST_ATTEMPT_TAG);