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

Commit 820707d6 authored by Xin Li's avatar Xin Li
Browse files

Merge sc-v2-dev-plus-aosp-without-vendor@8084891

Bug: 214455710
Merged-In: I4e434816b505b320b78efd90c910bc0a464e6175
Change-Id: I146a7e642778aa3c5c5c8f0b7f03535de5d9a814
parents 6d932bc9 5894c65e
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -7,8 +7,6 @@ android {
    defaultConfig {
        minSdkVersion 26
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
    }

    sourceSets {
+2 −2
Original line number Diff line number Diff line
@@ -63,7 +63,7 @@ public class BaseIconFactory implements AutoCloseable {

    private final Paint mTextPaint = new Paint(Paint.ANTI_ALIAS_FLAG | Paint.FILTER_BITMAP_FLAG);
    private static final float PLACEHOLDER_TEXT_SIZE = 20f;
    private static int PLACEHOLDER_BACKGROUND_COLOR = Color.rgb(240, 240, 240);
    private static int PLACEHOLDER_BACKGROUND_COLOR = Color.rgb(245, 245, 245);

    protected BaseIconFactory(Context context, int fillResIconDpi, int iconBitmapSize,
            boolean shapeDetection) {
@@ -144,7 +144,7 @@ public class BaseIconFactory implements AutoCloseable {
        AdaptiveIconDrawable drawable = new AdaptiveIconDrawable(
                new ColorDrawable(PLACEHOLDER_BACKGROUND_COLOR),
                new BitmapDrawable(mContext.getResources(), placeholderBitmap));
        Bitmap icon = createIconBitmap(drawable, 1f);
        Bitmap icon = createIconBitmap(drawable, IconNormalizer.ICON_VISIBLE_AREA_FACTOR);
        return BitmapInfo.of(icon, extractColor(icon));
    }

+3 −2
Original line number Diff line number Diff line
@@ -25,10 +25,8 @@ import android.content.res.Resources;
import android.content.res.TypedArray;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.ColorFilter;
import android.graphics.Paint;
import android.graphics.PorterDuff;
import android.graphics.PorterDuff.Mode;
import android.graphics.PorterDuffColorFilter;
import android.graphics.Rect;
@@ -373,10 +371,13 @@ public class ClockDrawableWrapper extends AdaptiveIconDrawable implements Bitmap
            // prepare and draw the foreground
            mInfo.animInfo.applyTime(mTime, mForeground);

            int saveCount = canvas.save();
            canvas.scale(mInfo.scale, mInfo.scale,
                    bounds.exactCenterX() + mInfo.offset, bounds.exactCenterY() + mInfo.offset);
            canvas.clipPath(mFullDrawable.getIconMask());
            mForeground.setBounds(bounds);
            mForeground.draw(canvas);
            canvas.restoreToCount(saveCount);

            reschedule();
        }
+1 −1
Original line number Diff line number Diff line
@@ -287,7 +287,7 @@ public class FastBitmapDrawable extends Drawable {
        mat[14] = brightnessI;
        mat[18] = disabledAlpha;
        tempFilterMatrix.preConcat(tempBrightnessMatrix);
        return new ColorMatrixColorFilter(tempBrightnessMatrix);
        return new ColorMatrixColorFilter(tempFilterMatrix);
    }

    protected static class FastBitmapConstantState extends ConstantState {
+3 −3
Original line number Diff line number Diff line
@@ -35,14 +35,14 @@ public class ShadowGenerator {

    public static final boolean ENABLE_SHADOWS = true;

    public static final float BLUR_FACTOR = 1.5f/48;
    public static final float BLUR_FACTOR = 1.68f/48;

    // Percent of actual icon size
    public static final float KEY_SHADOW_DISTANCE = 1f/48;
    private static final int KEY_SHADOW_ALPHA = 10;
    private static final int KEY_SHADOW_ALPHA = 7;
    // Percent of actual icon size
    private static final float HALF_DISTANCE = 0.5f;
    private static final int AMBIENT_SHADOW_ALPHA = 7;
    private static final int AMBIENT_SHADOW_ALPHA = 25;

    private final int mIconSize;

Loading