Skip to content
Snippets Groups Projects
Commit bbf1770d authored by akwizgran's avatar akwizgran
Browse files

Show home screen if user backs out of password activity.

parent 435efc3b
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,7 @@ package org.briarproject.android;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.text.Editable;
import android.view.KeyEvent;
......@@ -24,6 +25,8 @@ import java.util.concurrent.Executor;
import javax.inject.Inject;
import static android.content.Intent.ACTION_MAIN;
import static android.content.Intent.CATEGORY_HOME;
import static android.view.View.INVISIBLE;
import static android.view.View.VISIBLE;
import static android.view.inputmethod.EditorInfo.IME_ACTION_DONE;
......@@ -69,6 +72,14 @@ public class PasswordActivity extends BaseActivity {
});
}
@Override
public void onBackPressed() {
// Show the home screen rather than another password prompt
Intent intent = new Intent(ACTION_MAIN);
intent.addCategory(CATEGORY_HOME);
startActivity(intent);
}
@Override
protected void clearDbPrefs() {
super.clearDbPrefs();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment