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

Commit 5848496b authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 12985272 from 786a5e58 to 25Q2-release

Change-Id: I2f95bbe8ea78fa67d06139ab08aabcf39b8c9b61
parents f8735a12 786a5e58
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -108,3 +108,17 @@ flag {
  description: "Shows the status bar on connected displays"
  bug: "379264862"
}

flag {
   name: "lockscreen_custom_clocks"
   namespace: "systemui"
   description: "Enable lockscreen custom clocks"
   bug: "378486437"
}

flag {
   name: "clock_reactive_variants"
   namespace: "systemui"
   description: "Add reactive variant fonts to some clocks"
   bug: "343495953"
}
+10 −7
Original line number Diff line number Diff line
@@ -61,9 +61,6 @@ import java.util.Objects;
 */
public class IconProvider {

    static final int CONFIG_ICON_MASK_RES_ID = Resources.getSystem().getIdentifier(
            "config_icon_mask", "string", "android");

    private static final String TAG = "IconProvider";
    private static final boolean DEBUG = false;
    public static final boolean ATLEAST_T = BuildCompat.isAtLeastT();
@@ -179,22 +176,28 @@ public class IconProvider {
                final Resources resources = mContext.getPackageManager()
                        .getResourcesForApplication(appInfo);
                // Try to load the package item icon first
                if (info.icon != 0) {
                if (info != appInfo && info.icon != 0) {
                    try {
                        icon = resources.getDrawableForDensity(info.icon, density);
                    } catch (Resources.NotFoundException exc) { }
                }
                if (icon == null && appInfo.icon != 0) {
                    // Load the fallback app icon
                    try {
                        icon = resources.getDrawableForDensity(appInfo.icon, density);
                    } catch (Resources.NotFoundException exc) { }
                    icon = loadAppInfoIcon(appInfo, resources, density);
                }
            } catch (NameNotFoundException | Resources.NotFoundException exc) { }
        }
        return icon != null ? icon : getFullResDefaultActivityIcon(density);
    }

    @Nullable
    protected Drawable loadAppInfoIcon(ApplicationInfo info, Resources resources, int density) {
        try {
            return resources.getDrawableForDensity(info.icon, density);
        } catch (Resources.NotFoundException exc) { }
        return null;
    }

    @TargetApi(Build.VERSION_CODES.TIRAMISU)
    private Drawable loadCalendarDrawable(int iconDpi, @Nullable ThemeData td) {
        PackageManager pm = mContext.getPackageManager();
+1 −1
Original line number Diff line number Diff line
@@ -640,7 +640,7 @@ constructor(
            ComponentKey(ComponentName(packageName, packageName + EMPTY_CLASS_NAME), user)

        // Ensures themed bitmaps in the icon cache are invalidated
        @JvmField val RELEASE_VERSION = if (Flags.forceMonochromeAppIcons()) 4 else 3
        @JvmField val RELEASE_VERSION = if (Flags.forceMonochromeAppIcons()) 6 else 5

        @JvmField val TABLE_NAME = "icons"
        @JvmField val COLUMN_ROWID = "rowid"