Navigation Menu

Skip to content

Commit

Permalink
Small fix for install detection.
Browse files Browse the repository at this point in the history
  • Loading branch information
rumboalla committed Jun 27, 2017
1 parent 3bbbf8b commit 553c9d4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/src/main/java/com/apkupdater/adapter/UpdaterAdapter.java
Expand Up @@ -362,7 +362,9 @@ public void onInstallEvent(
) {
for (int i = 0; i < mUpdates.size(); i++) {
Update app = mUpdates.get(i);
if (app.getInstallStatus().getId() == ev.getId() || app.getPname().equals(ev.getPackageName())) {
if (app.getInstallStatus().getId() != 0 &&
(app.getInstallStatus().getId() == ev.getId() || app.getPname().equals(ev.getPackageName())))
{
app.getInstallStatus().setId(0);
if (ev.isSuccess()) {
app.getInstallStatus().setStatus(InstallStatus.STATUS_INSTALLED);
Expand Down

0 comments on commit 553c9d4

Please sign in to comment.