@Override
  public void onResume() {
    super.onResume();

    Intent intent = null;
    if (FxAccountAgeLockoutHelper.isLockedOut(SystemClock.elapsedRealtime())) {
      intent = new Intent(this, FxAccountCreateAccountNotAllowedActivity.class);
    } else if (FirefoxAccounts.firefoxAccountsExist(this)) {
      intent = new Intent(this, FxAccountStatusActivity.class);
    }

    if (intent != null) {
      this.setAccountAuthenticatorResult(null);
      setResult(RESULT_CANCELED);
      // Per http://stackoverflow.com/a/8992365, this triggers a known bug with
      // the soft keyboard not being shown for the started activity. Why, Android, why?
      intent.setFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
      this.startActivity(intent);
      this.finish();
    }

    // If we've been launched with extras (namely custom server URLs), continue
    // past go and collect 200 dollars. If we ever get back here (for example,
    // if the user hits the back button), forget that we had extras entirely, so
    // that we don't enter a loop.
    Bundle extras = null;
    if (getIntent() != null) {
      extras = getIntent().getExtras();
    }
    if (extras != null && extras.containsKey(FxAccountAbstractSetupActivity.EXTRA_EXTRAS)) {
      getIntent().replaceExtras(Bundle.EMPTY);
      startFlow((Bundle) extras.clone());
      return;
    }
  }
  @Override
  public void handleonClickofCreatAcct(
      String email,
      String password,
      Map<String, Boolean> engines,
      String yearedit,
      String[] yearItems,
      FxAccountAbstractSetupActivity mactivity,
      int errorArray[],
      TextView rmTxt) {
    // if (!( mactivity).updateButtonState()) {
    // return;
    // }
    if (FxAccountAgeLockoutHelper.passesAgeCheck(yearedit, yearItems)) {
      createAccount(email, password, engines, mactivity, errorArray, rmTxt);
    } else {
      FxAccountAgeLockoutHelper.lockOut(SystemClock.elapsedRealtime());
      (mactivity).setResult(0);

      Intent intent = new Intent(mactivity, FxAccountCreateAccountNotAllowedActivity.class);
      intent.setFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
      (mactivity).startActivity(intent);
    }
  }
  @Override
  public void onResume() {
    super.onResume();

    Intent intent = null;
    if (FxAccountAgeLockoutHelper.isLockedOut(SystemClock.elapsedRealtime())) {
      intent = new Intent(this, FxAccountCreateAccountNotAllowedActivity.class);
    } else if (FirefoxAccounts.firefoxAccountsExist(this)) {
      intent = new Intent(this, FxAccountStatusActivity.class);
    }
    if (intent != null) {
      this.setAccountAuthenticatorResult(null);
      setResult(RESULT_CANCELED);
      // Per http://stackoverflow.com/a/8992365, this triggers a known bug with
      // the soft keyboard not being shown for the started activity. Why, Android, why?
      intent.setFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
      startActivity(intent);
      finish();
      return;
    }
  }