From c4a00e964198b041cfeae4e5c93b43982857b7b5 Mon Sep 17 00:00:00 2001 From: misaochan Date: Sat, 14 Apr 2018 19:42:42 +1000 Subject: [PATCH] Copy onResume() actions into onPermissionsRequestResult --- .../main/java/fr/free/nrw/commons/nearby/NearbyActivity.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/java/fr/free/nrw/commons/nearby/NearbyActivity.java b/app/src/main/java/fr/free/nrw/commons/nearby/NearbyActivity.java index bc4503d71..aa906f1d6 100644 --- a/app/src/main/java/fr/free/nrw/commons/nearby/NearbyActivity.java +++ b/app/src/main/java/fr/free/nrw/commons/nearby/NearbyActivity.java @@ -159,6 +159,9 @@ public class NearbyActivity extends NavigationBaseActivity implements LocationUp case LOCATION_REQUEST: { if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) { Timber.d("Location permission granted, refreshing view"); + lockNearbyView = false; + checkGps(); + addNetworkBroadcastReceiver(); refreshView(LocationServiceManager.LocationChangeType.LOCATION_SIGNIFICANTLY_CHANGED); } else { //If permission not granted, go to page that says Nearby Places cannot be displayed