Loading core/java/android/window/DesktopExperienceFlags.java +6 −1 Original line number Diff line number Diff line Loading @@ -193,7 +193,12 @@ public enum DesktopExperienceFlags { FORM_FACTOR_BASED_DESKTOP_FIRST_SWITCH(Flags::formFactorBasedDesktopFirstSwitch, true, Flags.FLAG_FORM_FACTOR_BASED_DESKTOP_FIRST_SWITCH), REPARENT_WINDOW_TOKEN_API(Flags::reparentWindowTokenApi, true, Flags.FLAG_REPARENT_WINDOW_TOKEN_API) Flags.FLAG_REPARENT_WINDOW_TOKEN_API), USE_RESOURCES_FROM_CONTEXT_TO_CREATE_DRAWABLE_ICONS( com.android.graphics.flags.Flags::useResourcesFromContextToCreateDrawableIcons, true, com.android.graphics.flags.Flags .FLAG_USE_RESOURCES_FROM_CONTEXT_TO_CREATE_DRAWABLE_ICONS) // go/keep-sorted end ; Loading graphics/java/android/graphics/drawable/Icon.java +3 −2 Original line number Diff line number Diff line Loading @@ -20,7 +20,6 @@ import static android.content.Context.CONTEXT_INCLUDE_CODE; import static android.content.Context.CONTEXT_RESTRICTED; import static com.android.graphics.flags.Flags.iconLoadDrawableReturnNullWhenUriDecodeFails; import static com.android.graphics.flags.Flags.useResourcesFromContextToCreateDrawableIcons; import android.annotation.ColorInt; import android.annotation.DrawableRes; Loading Loading @@ -54,6 +53,7 @@ import android.os.RemoteException; import android.os.UserHandle; import android.text.TextUtils; import android.util.Log; import android.window.DesktopExperienceFlags; import androidx.annotation.RequiresPermission; Loading Loading @@ -460,7 +460,8 @@ public final class Icon implements Parcelable { resPackage = context.getPackageName(); } if ("android".equals(resPackage)) { if (useResourcesFromContextToCreateDrawableIcons()) { if (DesktopExperienceFlags .USE_RESOURCES_FROM_CONTEXT_TO_CREATE_DRAWABLE_ICONS.isTrue()) { // Gets display aware resources from the context, that is already // supposed to be associated with the display the icon will be shown in. mObj1 = context.getResources(); Loading Loading
core/java/android/window/DesktopExperienceFlags.java +6 −1 Original line number Diff line number Diff line Loading @@ -193,7 +193,12 @@ public enum DesktopExperienceFlags { FORM_FACTOR_BASED_DESKTOP_FIRST_SWITCH(Flags::formFactorBasedDesktopFirstSwitch, true, Flags.FLAG_FORM_FACTOR_BASED_DESKTOP_FIRST_SWITCH), REPARENT_WINDOW_TOKEN_API(Flags::reparentWindowTokenApi, true, Flags.FLAG_REPARENT_WINDOW_TOKEN_API) Flags.FLAG_REPARENT_WINDOW_TOKEN_API), USE_RESOURCES_FROM_CONTEXT_TO_CREATE_DRAWABLE_ICONS( com.android.graphics.flags.Flags::useResourcesFromContextToCreateDrawableIcons, true, com.android.graphics.flags.Flags .FLAG_USE_RESOURCES_FROM_CONTEXT_TO_CREATE_DRAWABLE_ICONS) // go/keep-sorted end ; Loading
graphics/java/android/graphics/drawable/Icon.java +3 −2 Original line number Diff line number Diff line Loading @@ -20,7 +20,6 @@ import static android.content.Context.CONTEXT_INCLUDE_CODE; import static android.content.Context.CONTEXT_RESTRICTED; import static com.android.graphics.flags.Flags.iconLoadDrawableReturnNullWhenUriDecodeFails; import static com.android.graphics.flags.Flags.useResourcesFromContextToCreateDrawableIcons; import android.annotation.ColorInt; import android.annotation.DrawableRes; Loading Loading @@ -54,6 +53,7 @@ import android.os.RemoteException; import android.os.UserHandle; import android.text.TextUtils; import android.util.Log; import android.window.DesktopExperienceFlags; import androidx.annotation.RequiresPermission; Loading Loading @@ -460,7 +460,8 @@ public final class Icon implements Parcelable { resPackage = context.getPackageName(); } if ("android".equals(resPackage)) { if (useResourcesFromContextToCreateDrawableIcons()) { if (DesktopExperienceFlags .USE_RESOURCES_FROM_CONTEXT_TO_CREATE_DRAWABLE_ICONS.isTrue()) { // Gets display aware resources from the context, that is already // supposed to be associated with the display the icon will be shown in. mObj1 = context.getResources(); Loading