prevent AppDetailsHeaderFragment crash in startProgress()

The real solution would involve figuring out where to handle this in the
right spot in the lifecycle.  Since AppDetails is being totally replaced,
this is just to stop the crashing.

closes #802
This commit is contained in:
Hans-Christoph Steiner 2016-11-10 12:55:35 +01:00
parent b9dad4bce6
commit 096b7132c4

View File

@ -1525,9 +1525,11 @@ public class AppDetails extends AppCompatActivity {
public void startProgress(boolean allowCancel) {
cancelButton.setVisibility(allowCancel ? View.VISIBLE : View.GONE);
if (isAdded()) {
showIndeterminateProgress(getString(R.string.download_pending));
updateViews();
}
}
private void showIndeterminateProgress(String message) {
setProgressVisible(true);