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

Change-Id: I6d0730a148fbfecaaa4b94e376550af613ad174b
diff --git a/src/com/android/settings/dashboard/DashboardFeatureProviderImpl.java b/src/com/android/settings/dashboard/DashboardFeatureProviderImpl.java
index 82a5b9b..f403e05 100644
--- a/src/com/android/settings/dashboard/DashboardFeatureProviderImpl.java
+++ b/src/com/android/settings/dashboard/DashboardFeatureProviderImpl.java
@@ -258,10 +258,9 @@
                     Log.w(TAG, "Failed to get icon from uri " + uri);
                     return;
                 }
-                tile.icon = Icon.createWithResource(iconInfo.first, iconInfo.second);
+                final Icon icon = Icon.createWithResource(iconInfo.first, iconInfo.second);
                 ThreadUtils.postOnMainThread(() -> {
-                        preference.setIcon(tile.icon.loadDrawable(preference.getContext()));
-                        tile.icon = null;
+                            preference.setIcon(icon.loadDrawable(preference.getContext()));
                     }
                 );
             });