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

Don't launch more than one instance of PasswordActivity.

parent 9e8bf5b1
No related branches found
No related tags found
No related merge requests found
package org.briarproject.android; package org.briarproject.android;
import static android.content.Intent.FLAG_ACTIVITY_NO_ANIMATION; import static android.content.Intent.FLAG_ACTIVITY_NO_ANIMATION;
import static android.content.Intent.FLAG_ACTIVITY_SINGLE_TOP;
import static java.util.logging.Level.INFO; import static java.util.logging.Level.INFO;
import java.util.logging.Logger; import java.util.logging.Logger;
...@@ -35,7 +36,7 @@ public class BriarActivity extends RoboFragmentActivity { ...@@ -35,7 +36,7 @@ public class BriarActivity extends RoboFragmentActivity {
if(databaseConfig.getEncryptionKey() == null) { if(databaseConfig.getEncryptionKey() == null) {
if(LOG.isLoggable(INFO)) LOG.info("No password"); if(LOG.isLoggable(INFO)) LOG.info("No password");
Intent i = new Intent(this, PasswordActivity.class); Intent i = new Intent(this, PasswordActivity.class);
i.setFlags(FLAG_ACTIVITY_NO_ANIMATION); i.setFlags(FLAG_ACTIVITY_NO_ANIMATION | FLAG_ACTIVITY_SINGLE_TOP);
startActivityForResult(i, REQUEST_PASSWORD); startActivityForResult(i, REQUEST_PASSWORD);
} else { } else {
startAndBindService(); startAndBindService();
......
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