Fix ANR in installed app details.

InstalledAppDetails tries to refreshUi whenever something about a
package changes. It does not need to refresh when the changing package
is different from what's being displayed.

Change-Id: Ib45289c39ee402cf8974bf52c881f44d225b8be5
Fix: 37424866
Test: make RunSettingsRoboTests
This commit is contained in:
Fan Zhang
2017-04-24 16:57:35 -07:00
parent 0cdade8a78
commit f6126e7a00
2 changed files with 25 additions and 1 deletions

View File

@@ -454,6 +454,10 @@ public class InstalledAppDetails extends AppInfoBase
@Override
public void onPackageSizeChanged(String packageName) {
if (!TextUtils.equals(packageName, mPackageName)) {
Log.d(LOG_TAG, "Package change irrelevant, skipping");
return;
}
refreshUi();
}