diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index beb27e832..e96561949 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -127,7 +127,12 @@
-
+
+
+
{
+ if (!postedResult) {
+ appendPasswordError(ERROR_TIMEOUT);
+ setAuthResult(AUTH_RESULT_FAILURE);
+ postPasswordResult(PasswordActivity.this, getIntent(), passwordResult);
+ finish();
+ }
+ }, PROMPT_TIMEOUT);
+ }
+ }
+
+ /**
+ * Clear out previous password authentication result.
+ */
+ protected static void resetPasswordResult() {
+ passwordResult = new PasswordResult();
+ postedResult = false;
+ }
+
+ /**
+ * Add an error to our password result.
+ */
+ protected static void appendPasswordError(String error) {
+ passwordResult.errors.add(error);
+ }
+
+ /**
+ * Set the final result of our authentication.
+ */
+ protected static void setAuthResult(String authResult) {
+ passwordResult.authResult = authResult;
+ }
+
+ /**
+ * Simple class to encapsulate information about the result of a password authentication attempt.
+ */
+ static class PasswordResult {
+ public String authResult = AUTH_RESULT_UNKNOWN;
+ public List errors = new ArrayList<>();
+ }
+}