diff --git a/src/com/android/settings/shortcut/CreateShortcutPreferenceController.java b/src/com/android/settings/shortcut/CreateShortcutPreferenceController.java index 6b95b92f1b2..c0f7e1ffc37 100644 --- a/src/com/android/settings/shortcut/CreateShortcutPreferenceController.java +++ b/src/com/android/settings/shortcut/CreateShortcutPreferenceController.java @@ -38,6 +38,11 @@ import android.view.LayoutInflater; import android.view.View; import android.widget.ImageView; +import androidx.annotation.VisibleForTesting; +import androidx.preference.Preference; +import androidx.preference.PreferenceCategory; +import androidx.preference.PreferenceGroup; + import com.android.settings.R; import com.android.settings.Settings.TetherSettingsActivity; import com.android.settings.core.BasePreferenceController; @@ -49,11 +54,6 @@ import java.util.Collections; import java.util.Comparator; import java.util.List; -import androidx.annotation.VisibleForTesting; -import androidx.preference.Preference; -import androidx.preference.PreferenceCategory; -import androidx.preference.PreferenceGroup; - /** * {@link BasePreferenceController} that populates a list of widgets that Settings app support. */ @@ -245,7 +245,7 @@ public class CreateShortcutPreferenceController extends BasePreferenceController Drawable iconDrawable; try { iconDrawable = context.getPackageManager().getResourcesForApplication(app) - .getDrawable(resource); + .getDrawable(resource, themedContext.getTheme()); if (iconDrawable instanceof LayerDrawable) { iconDrawable = ((LayerDrawable) iconDrawable).getDrawable(1); }