[app] fix OnErrorNotImplementedException when loading updatable apps

We can't do anything about the underlying DeadSystemException causing the error.

Closes acra-crash-reports#131
This commit is contained in:
Torsten Grote 2022-12-20 11:53:34 -03:00
parent b7c6ab8f33
commit 226ac160c0
No known key found for this signature in database
GPG Key ID: 3E5F77D92CF891FF
1 changed files with 3 additions and 7 deletions

View File

@ -14,6 +14,7 @@ import org.fdroid.database.FDroidDatabase;
import org.fdroid.database.UpdatableApp;
import org.fdroid.database.DbUpdateChecker;
import org.fdroid.fdroid.AppUpdateStatusManager;
import org.fdroid.fdroid.Utils;
import org.fdroid.fdroid.data.Apk;
import org.fdroid.fdroid.data.App;
import org.fdroid.fdroid.data.DBHelper;
@ -35,10 +36,7 @@ import androidx.appcompat.app.AppCompatActivity;
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
import androidx.recyclerview.widget.RecyclerView;
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers;
import io.reactivex.rxjava3.core.Single;
import io.reactivex.rxjava3.disposables.Disposable;
import io.reactivex.rxjava3.schedulers.Schedulers;
/**
* Manages the following types of information:
@ -101,10 +99,8 @@ public class UpdatesAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder
private void loadUpdatableApps() {
List<String> releaseChannels = Preferences.get().getBackendReleaseChannels();
if (disposable != null) disposable.dispose();
disposable = Single.fromCallable(() -> updateChecker.getUpdatableApps(releaseChannels))
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(this::onCanUpdateLoadFinished);
disposable = Utils.runOffUiThread(() -> updateChecker.getUpdatableApps(releaseChannels),
this::onCanUpdateLoadFinished);
}
public boolean canViewAllUpdateableApps() {