Remove unnecessary null check

canAndWantToUpdate returns false if suggestedApk is null
This commit is contained in:
Tobias_Groza
2024-09-02 20:11:35 +02:00
parent 2fdc87c4f6
commit af4de1217e

View File

@@ -665,7 +665,7 @@ public class AppDetailsRecyclerViewAdapter
buttonPrimaryView.setEnabled(true);
buttonPrimaryView.setOnClickListener(v -> callbacks.installApk(suggestedApk));
} else if (app.isInstalled(context)) {
if (app.canAndWantToUpdate(suggestedApk) && suggestedApk != null) {
if (app.canAndWantToUpdate(suggestedApk)) {
buttonPrimaryView.setText(R.string.menu_upgrade);
buttonPrimaryView.setOnClickListener(v -> callbacks.installApk(suggestedApk));
} else {