[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:
parent
b7c6ab8f33
commit
226ac160c0
|
@ -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() {
|
||||
|
|
Loading…
Reference in New Issue