Fix animation crash.

Shoutout to @bomba1990 for fixing this around the same time as me :)

Fixes #8182
This commit is contained in:
Greyson Parrelli 2018-09-07 17:12:04 -07:00
parent 70eecb754e
commit 82c0ea792a

View File

@ -498,8 +498,6 @@ public class RegistrationActivity extends BaseActionBarActivity implements Verif
return new Pair<>(password, gcmToken); return new Pair<>(password, gcmToken);
} catch (IOException e) { } catch (IOException e) {
Log.w(TAG, "Error during account registration", e); Log.w(TAG, "Error during account registration", e);
createButton.setIndeterminateProgressMode(false);
createButton.setProgress(0);
return null; return null;
} }
} }
@ -507,6 +505,8 @@ public class RegistrationActivity extends BaseActionBarActivity implements Verif
protected void onPostExecute(@Nullable Pair<String, Optional<String>> result) { protected void onPostExecute(@Nullable Pair<String, Optional<String>> result) {
if (result == null) { if (result == null) {
Toast.makeText(RegistrationActivity.this, R.string.RegistrationActivity_unable_to_connect_to_service, Toast.LENGTH_LONG).show(); Toast.makeText(RegistrationActivity.this, R.string.RegistrationActivity_unable_to_connect_to_service, Toast.LENGTH_LONG).show();
createButton.setIndeterminateProgressMode(false);
createButton.setProgress(0);
return; return;
} }