summaryrefslogtreecommitdiff
path: root/app/src
diff options
context:
space:
mode:
authorcyBerta <cyberta@riseup.net>2020-03-02 02:27:52 +0100
committercyBerta <cyberta@riseup.net>2020-03-02 02:28:14 +0100
commitf9e1a1449ee7b8f1aa796416be5fe6de106b8f86 (patch)
tree1668a95d45886f2183a400f4c9f0eac16d30cf64 /app/src
parent92922ef221f510b9def11397079dd06cf7535c46 (diff)
open android tethering settings activity on click on TetheringDialog's link
Diffstat (limited to 'app/src')
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/fragments/TetheringDialog.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/fragments/TetheringDialog.java b/app/src/main/java/se/leap/bitmaskclient/fragments/TetheringDialog.java
index c53d2a6c..d1e43a38 100644
--- a/app/src/main/java/se/leap/bitmaskclient/fragments/TetheringDialog.java
+++ b/app/src/main/java/se/leap/bitmaskclient/fragments/TetheringDialog.java
@@ -1,6 +1,7 @@
package se.leap.bitmaskclient.fragments;
import android.app.Dialog;
+import android.content.ComponentName;
import android.content.Intent;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
@@ -199,7 +200,11 @@ public class TetheringDialog extends AppCompatDialogFragment implements Observer
spannable.setSpan(new ClickableSpan() {
@Override
public void onClick(@NonNull View widget) {
- Intent intent = new Intent(Settings.ACTION_WIRELESS_SETTINGS);
+ final Intent intent = new Intent(Intent.ACTION_MAIN, null);
+ intent.addCategory(Intent.CATEGORY_LAUNCHER);
+ final ComponentName cn = new ComponentName("com.android.settings", "com.android.settings.TetherSettings");
+ intent.setComponent(cn);
+ intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
}
}, startIndex, endIndex, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);