From 1c2d783f4bc7ad16b7cd4e323317d10e0b20432a Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Mon, 12 Oct 2020 20:25:01 -0700 Subject: Add explanation of why user is prompted for location access --- .../java/github/daneren2005/dsub/activity/SubsonicActivity.java | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'app/src/main/java') diff --git a/app/src/main/java/github/daneren2005/dsub/activity/SubsonicActivity.java b/app/src/main/java/github/daneren2005/dsub/activity/SubsonicActivity.java index 4d8dfb59..3b6935eb 100644 --- a/app/src/main/java/github/daneren2005/dsub/activity/SubsonicActivity.java +++ b/app/src/main/java/github/daneren2005/dsub/activity/SubsonicActivity.java @@ -198,6 +198,15 @@ public class SubsonicActivity extends AppCompatActivity implements OnItemSelecte finish(); } } + case PERMISSIONS_REQUEST_LOCATION: { + // If request is cancelled, the result arrays are empty. + if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) { + + } else { + Util.toast(this, R.string.permission_location_failed); + finish(); + } + } } } -- cgit v1.2.3