@Override
  protected void onStart() {
    super.onStart();
    final String[] accountsHex = getIntent().getStringArrayExtra(EXTRA_STR_ARR_ACCOUNTS_HEX);
    final List<NacPublicKey> accPublicKeys =
        Stream.of(accountsHex).map(NacPublicKey::new).collect(Collectors.toList());

    final ArrayAdapter<NacPublicKey> adapter =
        new ArrayAdapter<>(this, R.layout.list_item_select_sender, accPublicKeys);
    final ListView accountsList = (ListView) findViewById(R.id.listview_accounts);
    accountsList.setAdapter(adapter);
    accountsList.setOnItemClickListener(this::onAccountClick);
  }
 @Override
 protected void onResume() {
   super.onResume();
   if (!ServerFinder.instance().peekBest().isPresent()) {
     ServerFinder.instance().getBestAsync();
   }
   final Bundle extras = getIntent().getExtras();
   final Optional<BinaryData> eKey = EKeyProvider.instance().getKey();
   if (eKey.isPresent()) {
     Timber.d("Key present, checking...");
     _dialogLayout.setVisibility(View.GONE);
     showProgressDialog(R.string.progress_dialog_message_password_checking);
     getHandler()
         .postDelayed(
             () -> {
               if (isNotDestroyed()) {
                 if (extras != null
                     && extras.containsKey(DashboardActivity.EXTRA_PARC_ACCOUNT_ADDRESS)) {
                   final Intent intent =
                       new Intent(this, DashboardActivity.class).putExtras(extras);
                   startActivity(intent);
                 } else if (lastUsedAddress != null) {
                   final Intent intent = new Intent(this, DashboardActivity.class);
                   if (extras != null && !extras.isEmpty()) {
                     intent.putExtras(extras);
                   }
                   startActivity(intent);
                 } else {
                   AccountListActivity.start(this);
                 }
                 finish();
               }
             },
             1000);
   } else {
     Timber.d("Key not present, waiting for password input");
   }
 }
  @Override
  protected void onCreate(final Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    if (getIntent().getExtras() != null) {
      _simplyFinish = getIntent().getExtras().getBoolean(EXTRA_BOOL_SIMPLY_FINISH, false);
    }

    _dialogLayout = (ViewGroup) findViewById(R.id.layout_dialog);
    final View btnLogin = findViewById(R.id.btn_login);
    btnLogin.setOnClickListener(this::onLoginClick);
    _passwordInput = (EditText) findViewById(R.id.input_password);
    _passwordInput.addTextChangedListener(_clearErrorWatcher);
    // todo: remove this stub
    if (BuildConfig.DEBUG) {
      _passwordInput.setText("123456");
      _passwordInput.setSelectAllOnFocus(true);
    }
    btnLogin.setOnFocusChangeListener(
        (v, hasFocus) -> {
          if (hasFocus) {
            AppHost.SoftKeyboard.forceHide(this);
          }
        });
  }
 @Override
 protected void onStop() {
   super.onStop();
 }