Don't route intents for MANAGE_NETWORK_USAGE settings

This is because we require a special permission to launch this intent
and we prefer requiring this permission to having the NavDrawerActivity
added to the back stack.

This commit also re-adds the deprecated USE_FINGERPRINT permission as
Android Studio would show an error otherwise.
This commit is contained in:
Torsten Grote
2019-06-07 10:38:56 -03:00
parent fb10ba5855
commit 1c4d277771
3 changed files with 8 additions and 12 deletions

View File

@@ -66,6 +66,8 @@ public abstract class BriarActivity extends BaseActivity {
@Nullable Intent data) {
super.onActivityResult(request, result, data);
if (request == REQUEST_PASSWORD) {
// We get RESULT_CANCELED when the account gets deleted or
// StartupActivity finishes before entering the password.
if (result == RESULT_OK) briarController.startAndBindService();
} else if (request == REQUEST_UNLOCK && result != RESULT_OK) {
// We arrive here, if the user presses 'back'

View File

@@ -5,9 +5,7 @@ import android.content.Intent;
import org.briarproject.briar.android.activity.BriarActivity;
import org.briarproject.briar.android.contact.add.remote.AddContactActivity;
import org.briarproject.briar.android.settings.SettingsActivity;
import static android.content.Intent.ACTION_MANAGE_NETWORK_USAGE;
import static android.content.Intent.ACTION_SEND;
import static android.content.Intent.ACTION_VIEW;
import static android.content.Intent.EXTRA_TEXT;
@@ -29,10 +27,6 @@ class IntentRouter {
LINK_REGEX.matcher(i.getStringExtra(EXTRA_TEXT)).find()) {
redirect(ctx, i, AddContactActivity.class);
}
// network settings as launched from system settings app
else if (ACTION_MANAGE_NETWORK_USAGE.equals(action)) {
redirect(ctx, i, SettingsActivity.class);
}
}
private static void redirect(Context ctx, Intent i,