Copy onResume() actions into onPermissionsRequestResult

This commit is contained in:
misaochan 2018-04-14 19:42:42 +10:00
parent 024ceeb23f
commit c4a00e9641

View file

@ -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