Loading graphics/java/android/framework_graphics.aconfig +10 −0 Original line number Diff line number Diff line Loading @@ -43,6 +43,16 @@ flag { bug: "344038816" } flag { name: "use_resources_from_context_to_create_drawable_icons" namespace: "lse_desktop_experience" description: "Uses resources from the context to create icon drawables instead of system resources (that are not display aware)" bug: "404242315" metadata { purpose: PURPOSE_BUGFIX } } flag { name: "gradient_drawable_shape_arc_for_rounded_cap" is_fixed_read_only: true Loading graphics/java/android/graphics/drawable/Icon.java +8 −1 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ 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 @@ -459,7 +460,13 @@ public final class Icon implements Parcelable { resPackage = context.getPackageName(); } if ("android".equals(resPackage)) { if (useResourcesFromContextToCreateDrawableIcons()) { // 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(); } else { mObj1 = Resources.getSystem(); } } else { final PackageManager pm = context.getPackageManager(); try { Loading Loading
graphics/java/android/framework_graphics.aconfig +10 −0 Original line number Diff line number Diff line Loading @@ -43,6 +43,16 @@ flag { bug: "344038816" } flag { name: "use_resources_from_context_to_create_drawable_icons" namespace: "lse_desktop_experience" description: "Uses resources from the context to create icon drawables instead of system resources (that are not display aware)" bug: "404242315" metadata { purpose: PURPOSE_BUGFIX } } flag { name: "gradient_drawable_shape_arc_for_rounded_cap" is_fixed_read_only: true Loading
graphics/java/android/graphics/drawable/Icon.java +8 −1 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ 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 @@ -459,7 +460,13 @@ public final class Icon implements Parcelable { resPackage = context.getPackageName(); } if ("android".equals(resPackage)) { if (useResourcesFromContextToCreateDrawableIcons()) { // 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(); } else { mObj1 = Resources.getSystem(); } } else { final PackageManager pm = context.getPackageManager(); try { Loading