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

Commit cb156aa4 authored by Kshitij's avatar Kshitij
Browse files

fix: Revert badge size and position to pre-tablet [1/2]

parent a0f567fe
Loading
Loading
Loading
Loading
Loading
Compare 12655597 to 7d89f955
Original line number Diff line number Diff line
Subproject commit 12655597637509123622d236278596abb6951732
Subproject commit 7d89f9559dda754b190023681addbb05724b4592
+5 −5
Original line number Diff line number Diff line
@@ -597,20 +597,20 @@ public class DeviceProfile {
        }

        // This is done last, after iconSizePx is calculated above.
        mDotRendererWorkSpace = createDotRenderer(context, iconSizePx, dotRendererCache, showNotificationCount, typeface);
        mDotRendererAllApps = createDotRenderer(context, allAppsIconSizePx, dotRendererCache, showNotificationCount, typeface);
        mDotRendererWorkSpace = createDotRenderer(context, iconSizePx, dotRendererCache, showNotificationCount, typeface, isTablet);
        mDotRendererAllApps = createDotRenderer(context, allAppsIconSizePx, dotRendererCache, showNotificationCount, typeface, isTablet);
        this.context = context;
    }

    private static DotRenderer createDotRenderer(
            @NonNull Context context, int size, @NonNull SparseArray<DotRenderer> cache,
            boolean showNotificationCount, Typeface typeface) {
            boolean showNotificationCount, Typeface typeface, boolean isTablet) {
        DisplayMetrics metrics = context.getResources().getDisplayMetrics();
        int dotSize = (int) (size / (metrics.density / 4));
        DotRenderer renderer = cache.get(dotSize);
        if (renderer == null) {
            renderer = new DotRenderer(dotSize, getShapePath(context, DEFAULT_DOT_SIZE),
                    DEFAULT_DOT_SIZE, showNotificationCount, typeface);
                    DEFAULT_DOT_SIZE, showNotificationCount, typeface, isTablet);
            cache.put(size, renderer);
        }
        return renderer;