Skip to content

Commit 02cbb8e

Browse files
authored
Merge pull request commons-app#630 from maskaravivek/stateloss
Fixes commons-app#614: Crash: Fragment State loss exception
2 parents f6a7759 + 5fc9f84 commit 02cbb8e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

app/src/main/java/fr/free/nrw/commons/nearby/NearbyActivity.java

+6
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,12 @@ protected void onResume() {
149149
checkGps();
150150
}
151151

152+
@Override
153+
protected void onPause() {
154+
super.onPause();
155+
nearbyAsyncTask.cancel(true);
156+
}
157+
152158
protected void refreshView() {
153159
nearbyAsyncTask = new NearbyAsyncTask(this);
154160
nearbyAsyncTask.execute();

0 commit comments

Comments
 (0)