mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 19:29:06 +01:00
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:
@@ -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'
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user