Possibly fix apps loading forever
- Consistently handle results from filters whether async or not - Make sure we trigger a rebuild after loading entries is complete Bug: 22838302 Change-Id: I4595c61d4ea7069e59440c9dc673a1f0b73bc864
This commit is contained in:
@@ -864,6 +864,11 @@ public class ManageApplications extends InstrumentedFragment
|
|||||||
// Don't have new list yet, but can continue using the old one.
|
// Don't have new list yet, but can continue using the old one.
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
onRebuildComplete(entries);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onRebuildComplete(ArrayList<AppEntry> entries) {
|
||||||
mBaseEntries = entries;
|
mBaseEntries = entries;
|
||||||
if (mBaseEntries != null) {
|
if (mBaseEntries != null) {
|
||||||
mEntries = applyPrefixFilter(mCurFilterPrefix, mBaseEntries);
|
mEntries = applyPrefixFilter(mCurFilterPrefix, mBaseEntries);
|
||||||
@@ -922,21 +927,6 @@ public class ManageApplications extends InstrumentedFragment
|
|||||||
mManageApplications.getActivity().setProgressBarIndeterminateVisibility(running);
|
mManageApplications.getActivity().setProgressBarIndeterminateVisibility(running);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onRebuildComplete(ArrayList<AppEntry> apps) {
|
|
||||||
if (mManageApplications.mLoadingContainer.getVisibility() == View.VISIBLE) {
|
|
||||||
mManageApplications.mLoadingContainer.startAnimation(AnimationUtils.loadAnimation(
|
|
||||||
mContext, android.R.anim.fade_out));
|
|
||||||
mManageApplications.mListContainer.startAnimation(AnimationUtils.loadAnimation(
|
|
||||||
mContext, android.R.anim.fade_in));
|
|
||||||
}
|
|
||||||
mManageApplications.mListContainer.setVisibility(View.VISIBLE);
|
|
||||||
mManageApplications.mLoadingContainer.setVisibility(View.GONE);
|
|
||||||
mBaseEntries = apps;
|
|
||||||
mEntries = applyPrefixFilter(mCurFilterPrefix, mBaseEntries);
|
|
||||||
notifyDataSetChanged();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onPackageListChanged() {
|
public void onPackageListChanged() {
|
||||||
rebuild(false);
|
rebuild(false);
|
||||||
@@ -951,6 +941,8 @@ public class ManageApplications extends InstrumentedFragment
|
|||||||
@Override
|
@Override
|
||||||
public void onLoadEntriesCompleted() {
|
public void onLoadEntriesCompleted() {
|
||||||
mHasReceivedLoadEntries = true;
|
mHasReceivedLoadEntries = true;
|
||||||
|
// We may have been skipping rebuilds until this came in, trigger one now.
|
||||||
|
rebuild(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Reference in New Issue
Block a user