Beispiel #1
0
  public void onMasterPasswordOkButtonClick(View view) {
    final TextView mastPasswordInput = (TextView) findViewById(R.id.masterPasswordInput);
    final CharSequence masterPassword = mastPasswordInput.getText();

    if (masterPassword.length() > 0) {
      final char[] masterPasswordCharacters = new char[masterPassword.length()];
      for (int i = 0; i < masterPassword.length(); i++) {
        masterPasswordCharacters[i] = masterPassword.charAt(i);
      }

      try {
        securityController.startup(masterPasswordCharacters);
      } catch (final Exception e) {
        LOGGER.error("Error starting security controller.", e);
        showToast("Invalid master password: "******"Please enter master password!");
    }
  }