mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 04:43:54 +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) {
|
if (nearbyAsyncTask != null) {
|
||||||
nearbyAsyncTask.cancel(true);
|
nearbyAsyncTask.cancel(true);
|
||||||
}
|
}
|
||||||
|
if (progressBar != null) {
|
||||||
|
progressBar.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();
|
FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();
|
||||||
Fragment noPermissionsFragment = new NoPermissionsFragment();
|
Fragment noPermissionsFragment = new NoPermissionsFragment();
|
||||||
fragmentTransaction.replace(R.id.container, noPermissionsFragment);
|
fragmentTransaction.replace(R.id.container, noPermissionsFragment);
|
||||||
|
|
@ -219,8 +222,10 @@ public class NearbyActivity extends NavigationBaseActivity {
|
||||||
@Override
|
@Override
|
||||||
protected void onDestroy() {
|
protected void onDestroy() {
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
|
if (locationManager != null) {
|
||||||
locationManager.unregisterLocationManager();
|
locationManager.unregisterLocationManager();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private class NearbyAsyncTask extends AsyncTask<Void, Integer, List<Place>> {
|
private class NearbyAsyncTask extends AsyncTask<Void, Integer, List<Place>> {
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue