Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dae32f36 authored by Alina Zaidi's avatar Alina Zaidi Committed by Android (Google) Code Review
Browse files

Merge "Add fix for status bar icon size and spacing to developer option" into main

parents d1594bbe 9c159c7d
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -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
    ;

+3 −2
Original line number Diff line number Diff line
@@ -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;
@@ -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;

@@ -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();