Merge "Fix NPE in AppListPreference when there is no default."
This commit is contained in:
committed by
Android (Google) Code Review
commit
ab8d3e5a03
@@ -94,7 +94,8 @@ public class AppListPreference extends ListPreference {
|
||||
if (appInfo != null) {
|
||||
applicationNames[index] = appInfo.loadLabel(pm);
|
||||
mEntryDrawables[index] = appInfo.loadIcon(pm);
|
||||
if (appInfo.packageName.contentEquals(defaultPackageName)) {
|
||||
if (defaultPackageName != null &&
|
||||
appInfo.packageName.contentEquals(defaultPackageName)) {
|
||||
selectedIndex = index;
|
||||
}
|
||||
index++;
|
||||
|
Reference in New Issue
Block a user