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

Commit 40e55c8a authored by Kshitij's avatar Kshitij
Browse files

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

parent 32b8b8e9
Loading
Loading
Loading
Loading
Loading
Compare c3f2f171 to 2ed03af5
Original line number Diff line number Diff line
Subproject commit c3f2f17125eb90b1b311d9c0de15e92f301aaa91
Subproject commit 2ed03af5937d5f21ead67b68b1780a419fe6b717
+4 −4
Original line number Diff line number Diff line
@@ -754,19 +754,19 @@ 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);
    }

    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;