Skip to content

Commit 971b323

Browse files
authored
Merge pull request commons-app#1046 from maskaravivek/crashFix
Avoid crash when service is disconnected
2 parents a85da9d + b639b64 commit 971b323

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app/src/main/java/fr/free/nrw/commons/contributions/ContributionsActivity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public void onServiceConnected(ComponentName componentName, IBinder binder) {
9494
@Override
9595
public void onServiceDisconnected(ComponentName componentName) {
9696
// this should never happen
97-
throw new RuntimeException("UploadService died but the rest of the process did not!");
97+
Timber.e(new RuntimeException("UploadService died but the rest of the process did not!"));
9898
}
9999
};
100100

app/src/main/java/fr/free/nrw/commons/upload/UploadController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public void onServiceConnected(ComponentName componentName, IBinder binder) {
5656
@Override
5757
public void onServiceDisconnected(ComponentName componentName) {
5858
// this should never happen
59-
throw new RuntimeException("UploadService died but the rest of the process did not!");
59+
Timber.e(new RuntimeException("UploadService died but the rest of the process did not!"));
6060
}
6161
};
6262

0 commit comments

Comments
 (0)