Use IconDrawableFactory to load icons for default apps.
Bug: 64336923 Test: robotests Change-Id: I2a4ca05a866784f97e247bad1c1679a6ec0f5efa
This commit is contained in:
@@ -61,11 +61,12 @@ public class DefaultHomePreferenceController extends DefaultAppPreferenceControl
|
||||
final ArrayList<ResolveInfo> homeActivities = new ArrayList<>();
|
||||
final ComponentName currentDefaultHome = mPackageManager.getHomeActivities(homeActivities);
|
||||
if (currentDefaultHome != null) {
|
||||
return new DefaultAppInfo(mPackageManager, mUserId, currentDefaultHome);
|
||||
return new DefaultAppInfo(mContext, mPackageManager, mUserId, currentDefaultHome);
|
||||
}
|
||||
final ActivityInfo onlyAppInfo = getOnlyAppInfo();
|
||||
if (onlyAppInfo != null) {
|
||||
return new DefaultAppInfo(mPackageManager, mUserId, onlyAppInfo.getComponentName());
|
||||
return new DefaultAppInfo(mContext, mPackageManager, mUserId,
|
||||
onlyAppInfo.getComponentName());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
Reference in New Issue
Block a user