mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
Remove progress bar and add null check for locationManager
This commit is contained in:
parent
c3d4b029c1
commit
a8d302bdf3
1 changed files with 6 additions and 1 deletions
|
|
@ -130,6 +130,9 @@ public class NearbyActivity extends NavigationBaseActivity {
|
|||
if (nearbyAsyncTask != null) {
|
||||
nearbyAsyncTask.cancel(true);
|
||||
}
|
||||
if (progressBar != null) {
|
||||
progressBar.setVisibility(View.GONE);
|
||||
}
|
||||
FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();
|
||||
Fragment noPermissionsFragment = new NoPermissionsFragment();
|
||||
fragmentTransaction.replace(R.id.container, noPermissionsFragment);
|
||||
|
|
@ -219,7 +222,9 @@ public class NearbyActivity extends NavigationBaseActivity {
|
|||
@Override
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
locationManager.unregisterLocationManager();
|
||||
if (locationManager != null) {
|
||||
locationManager.unregisterLocationManager();
|
||||
}
|
||||
}
|
||||
|
||||
private class NearbyAsyncTask extends AsyncTask<Void, Integer, List<Place>> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue