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

Commit 9b31d023 authored by Mohammed Althaf T's avatar Mohammed Althaf T 😊
Browse files

Merge branch '2887-a14-pwa' into 'a14'

Hide pwa badges

See merge request e/os/BlissLauncher3!102
parents 302a0344 255c9ae9
Loading
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -191,7 +191,8 @@ class BlurWallpaperProvider(val context: Context) {
                setBitmap(bitmap)
            } catch (e: IllegalStateException) {
                Logger.e(TAG, "Failed to set bitmap, using fallback", e)
                val newBitmap = Bitmap.createBitmap(
                val newBitmap =
                    Bitmap.createBitmap(
                        wallpaper.width,
                        wallpaper.height,
                        wallpaper.config ?: Bitmap.Config.ARGB_8888
+7 −3
Original line number Diff line number Diff line
@@ -106,6 +106,8 @@ import java.util.Locale;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

import foundation.e.bliss.multimode.MultiModeController;

/**
 * Various utilities shared amongst the Launcher's classes.
 */
@@ -584,7 +586,8 @@ public final class Utilities {
        Drawable mainIcon = null;

        Drawable badge = null;
        if ((info instanceof ItemInfoWithIcon iiwi) && !iiwi.usingLowResIcon()) {
        if ((info instanceof ItemInfoWithIcon iiwi) && !iiwi.usingLowResIcon()
                && !MultiModeController.isSingleLayerMode()) {
            badge = iiwi.bitmap.getBadgeDrawable(context, useTheme);
        }

@@ -611,7 +614,8 @@ public final class Utilities {
                mainIcon = ShortcutCachingLogic.getIcon(context, si,
                        appState.getInvariantDeviceProfile().fillResIconDpi);
                // Only fetch badge if the icon is on workspace
                if (info.id != ItemInfo.NO_ID && badge == null) {
                if (info.id != ItemInfo.NO_ID && badge == null
                        && !MultiModeController.isSingleLayerMode()) {
                    badge = appState.getIconCache().getShortcutInfoBadge(si)
                            .newIcon(context, FLAG_THEMED);
                }
@@ -673,7 +677,7 @@ public final class Utilities {
                                    .getUserInfo(info.user)
                                    .applyBitmapInfoFlags(FlagOp.NO_OP))
                    .getBadgeDrawable(context, useTheme);
            if (badge == null) {
            if (badge == null || MultiModeController.isSingleLayerMode()) {
                badge = new ColorDrawable(Color.TRANSPARENT);
            }
        }
+7 −1
Original line number Diff line number Diff line
@@ -78,6 +78,8 @@ import java.util.function.Predicate;
import java.util.function.Supplier;
import java.util.stream.Stream;

import foundation.e.bliss.multimode.MultiModeController;

/**
 * Cache of application icons.  Icons can be made from any thread.
 */
@@ -277,8 +279,12 @@ public class IconCache extends BaseIconCache {
        if (isDefaultIcon(bitmapInfo, si.getUserHandle()) && fallbackIconCheck.test(info)) {
            return;
        }

        info.bitmap = bitmapInfo;
        if (!MultiModeController.isSingleLayerMode()) {
            info.bitmap = bitmapInfo.withBadgeInfo(getShortcutInfoBadge(si));
        }
    }

    /**
     * Returns the badging info for the shortcut