mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
Fix logical error
This commit is contained in:
parent
361196bedd
commit
50ecf4fd15
1 changed files with 3 additions and 1 deletions
|
|
@ -109,7 +109,9 @@ public class NearbyActivity extends NavigationBaseActivity {
|
|||
public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
|
||||
switch (requestCode) {
|
||||
case LOCATION_REQUEST: {
|
||||
if (grantResults.length > 0 && grantResults[0] != PackageManager.PERMISSION_GRANTED) {
|
||||
if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
|
||||
refreshView();
|
||||
} else {
|
||||
//If permission not granted, display notification that Nearby Places cannot be displayed
|
||||
int duration = Toast.LENGTH_LONG;
|
||||
Toast toast = Toast.makeText(this, "Nearby places cannot be found without location permissions", duration);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue