Merge "Fixes crash in security settings." into pi-dev

am: abe44c2674

Change-Id: I6d0730a148fbfecaaa4b94e376550af613ad174b
This commit is contained in:
Doris Ling
2018-04-25 10:16:05 -07:00
committed by android-build-merger

View File

@@ -258,10 +258,9 @@ public class DashboardFeatureProviderImpl implements DashboardFeatureProvider {
Log.w(TAG, "Failed to get icon from uri " + uri); Log.w(TAG, "Failed to get icon from uri " + uri);
return; return;
} }
tile.icon = Icon.createWithResource(iconInfo.first, iconInfo.second); final Icon icon = Icon.createWithResource(iconInfo.first, iconInfo.second);
ThreadUtils.postOnMainThread(() -> { ThreadUtils.postOnMainThread(() -> {
preference.setIcon(tile.icon.loadDrawable(preference.getContext())); preference.setIcon(icon.loadDrawable(preference.getContext()));
tile.icon = null;
} }
); );
}); });