mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 12:53:55 +01:00
Remove unnecessary calls, add more logging
This commit is contained in:
parent
cce7ac6770
commit
0d114a66a2
1 changed files with 2 additions and 2 deletions
|
|
@ -161,9 +161,7 @@ public class NearbyActivity extends NavigationBaseActivity implements LocationUp
|
||||||
case LOCATION_REQUEST: {
|
case LOCATION_REQUEST: {
|
||||||
if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
|
if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
|
||||||
Timber.d("Location permission granted, refreshing view");
|
Timber.d("Location permission granted, refreshing view");
|
||||||
lockNearbyView = false;
|
|
||||||
checkGps();
|
checkGps();
|
||||||
addNetworkBroadcastReceiver();
|
|
||||||
lastKN = locationManager.getLKN();
|
lastKN = locationManager.getLKN();
|
||||||
refreshView(LocationServiceManager.LocationChangeType.PERMISSION_JUST_GRANTED);
|
refreshView(LocationServiceManager.LocationChangeType.PERMISSION_JUST_GRANTED);
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -405,6 +403,7 @@ public class NearbyActivity extends NavigationBaseActivity implements LocationUp
|
||||||
|
|
||||||
// First time to init fragments
|
// First time to init fragments
|
||||||
if (nearbyMapFragment == null) {
|
if (nearbyMapFragment == null) {
|
||||||
|
Timber.d("Init map fragment for the first time");
|
||||||
lockNearbyView(true);
|
lockNearbyView(true);
|
||||||
setMapFragment();
|
setMapFragment();
|
||||||
setListFragment();
|
setListFragment();
|
||||||
|
|
@ -412,6 +411,7 @@ public class NearbyActivity extends NavigationBaseActivity implements LocationUp
|
||||||
lockNearbyView(false);
|
lockNearbyView(false);
|
||||||
} else {
|
} else {
|
||||||
// There are fragments, just update the map and list
|
// There are fragments, just update the map and list
|
||||||
|
Timber.d("Map fragment already exists, just update the map and list");
|
||||||
updateMapFragment(false);
|
updateMapFragment(false);
|
||||||
updateListFragment();
|
updateListFragment();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue