Revert "Do not manually call onChange() (fix NPE)"

This reverts commit 47e065442edc108d4bb38f9daaa7cdb3fff26b49.

Now that the ContentObserver is created when activity is started (even if not
resumed), then it will be non-null during onActivityResult(). Therefore,
the calls to onChange() will not lead to NullPointerException anymore.

The reason why we want to manually call onChange() is that the
ContentObserver notifications may happen several seconds later:
https://gitlab.com/fdroid/fdroidclient/merge_requests/58#note_948719
This commit is contained in:
Romain Vimont 2015-03-13 10:26:42 +01:00
parent cda80f5de6
commit 578084ff96

View File

@ -929,6 +929,7 @@ public class AppDetails extends ActionBarActivity implements ProgressListener, A
}
setSupportProgressBarIndeterminateVisibility(false);
myAppObserver.onChange();
}
});
}
@ -940,6 +941,7 @@ public class AppDetails extends ActionBarActivity implements ProgressListener, A
@Override
public void run() {
setSupportProgressBarIndeterminateVisibility(false);
myAppObserver.onChange();
}
});
} else {
@ -947,6 +949,7 @@ public class AppDetails extends ActionBarActivity implements ProgressListener, A
@Override
public void run() {
setSupportProgressBarIndeterminateVisibility(false);
myAppObserver.onChange();
Log.e(TAG, "Installer aborted with errorCode: " + errorCode);