Merge "Improve flicker when enter Security page" into sc-dev

This commit is contained in:
TreeHugger Robot
2021-06-11 16:40:05 +00:00
committed by Android (Google) Code Review

View File

@@ -360,6 +360,11 @@ public class DashboardFeatureProviderImpl implements DashboardFeatureProvider {
// Icon provided by the content provider overrides any static icon. // Icon provided by the content provider overrides any static icon.
if (tile.getMetaData() != null if (tile.getMetaData() != null
&& tile.getMetaData().containsKey(META_DATA_PREFERENCE_ICON_URI)) { && tile.getMetaData().containsKey(META_DATA_PREFERENCE_ICON_URI)) {
// Set a transparent color before starting to fetch the real icon, this is necessary
// to avoid preference padding change.
setPreferenceIcon(preference, tile, forceRoundedIcon, mContext.getPackageName(),
Icon.createWithResource(mContext, android.R.color.transparent));
ThreadUtils.postOnBackgroundThread(() -> { ThreadUtils.postOnBackgroundThread(() -> {
final Intent intent = tile.getIntent(); final Intent intent = tile.getIntent();
String packageName = null; String packageName = null;