diff options
author | Scott Jackson <daneren2005@gmail.com> | 2020-10-02 20:35:36 -0700 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2020-10-02 20:35:36 -0700 |
commit | 09215909fa1cdecf6de7123c3f51bca08b039658 (patch) | |
tree | 3eea8885ac0a6ac0cd249a1e7cceff5267833f7e /app/src/main | |
parent | bf5f8ef21ae6415ae5b7a4ed2525fec1a1dc5420 (diff) | |
download | dsub-09215909fa1cdecf6de7123c3f51bca08b039658.tar.gz dsub-09215909fa1cdecf6de7123c3f51bca08b039658.tar.bz2 dsub-09215909fa1cdecf6de7123c3f51bca08b039658.zip |
Request location access when opening SSID to make sure it works
Diffstat (limited to 'app/src/main')
-rw-r--r-- | app/src/main/java/github/daneren2005/dsub/fragments/SettingsFragment.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/src/main/java/github/daneren2005/dsub/fragments/SettingsFragment.java b/app/src/main/java/github/daneren2005/dsub/fragments/SettingsFragment.java index 1789ad15..31559305 100644 --- a/app/src/main/java/github/daneren2005/dsub/fragments/SettingsFragment.java +++ b/app/src/main/java/github/daneren2005/dsub/fragments/SettingsFragment.java @@ -528,6 +528,10 @@ public class SettingsFragment extends PreferenceCompatFragment implements Shared super.onAddEditTextToDialogView(dialogView, editText); ViewGroup root = (ViewGroup) ((ViewGroup) dialogView).getChildAt(0); + if(internalSSID == "<unknown ssid>" && ActivityCompat.checkSelfPermission(context, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED) { + ActivityCompat.requestPermissions(context, new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, SubsonicActivity.PERMISSIONS_REQUEST_LOCATION); + } + Button defaultButton = new Button(getContext()); defaultButton.setText(internalSSIDDisplay); defaultButton.setOnClickListener(new View.OnClickListener() { |