Don't crash in Music Storage Settings.
This crash occurs because the music files entry is active, but does not have an AppEntry (because it is not an app.) ManageApplications assumes all active elements have an AppEntry, which causes an NPE. By adding in a null check, we can avoid this. Bug: 34888282 Test: Manual -- because ManageApplications needs refactoring badly. Change-Id: Ief0c202f6176d90e492e62e5930b940e5a28b95c
This commit is contained in:
@@ -1139,6 +1139,9 @@ public class ManageApplications extends InstrumentedPreferenceFragment
|
||||
public void onPackageSizeChanged(String packageName) {
|
||||
for (int i = 0; i < mActive.size(); i++) {
|
||||
AppViewHolder holder = (AppViewHolder) mActive.get(i).getTag();
|
||||
if (holder == null) {
|
||||
continue;
|
||||
}
|
||||
ApplicationInfo info = holder.entry.info;
|
||||
if (info == null) {
|
||||
continue;
|
||||
|
Reference in New Issue
Block a user