Merge "Removing unused wallpaper-scrim feature" into udc-dev am: 386f9796e3 am: e97f1eac9b
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/23039034 Change-Id: I62d37d9534b68ce9932869166f50570041e137fc Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -75,7 +75,6 @@
|
|||||||
<color name="text_color_tertiary_dark">#CCFFFFFF</color>
|
<color name="text_color_tertiary_dark">#CCFFFFFF</color>
|
||||||
|
|
||||||
<color name="wallpaper_popup_scrim">?android:attr/colorAccent</color>
|
<color name="wallpaper_popup_scrim">?android:attr/colorAccent</color>
|
||||||
<color name="wallpaper_scrim_color">#0D878787</color>
|
|
||||||
|
|
||||||
<color name="workspace_accent_color_light">#ff8df5e3</color>
|
<color name="workspace_accent_color_light">#ff8df5e3</color>
|
||||||
<color name="workspace_accent_color_dark">#ff3d665f</color>
|
<color name="workspace_accent_color_dark">#ff3d665f</color>
|
||||||
|
|||||||
@@ -4,6 +4,5 @@
|
|||||||
<entry id="@color/delete_target_hover_tint" />
|
<entry id="@color/delete_target_hover_tint" />
|
||||||
<entry id="@color/delete_target_hover_tint" />
|
<entry id="@color/delete_target_hover_tint" />
|
||||||
<entry id="@color/delete_target_hover_tint" />
|
<entry id="@color/delete_target_hover_tint" />
|
||||||
<entry id="@color/wallpaper_scrim_color" />
|
|
||||||
|
|
||||||
</DynamicResources>
|
</DynamicResources>
|
||||||
|
|||||||
@@ -372,10 +372,6 @@ public final class FeatureFlags {
|
|||||||
"ENABLE_ENFORCED_ROUNDED_CORNERS", ENABLED,
|
"ENABLE_ENFORCED_ROUNDED_CORNERS", ENABLED,
|
||||||
"Enforce rounded corners on all App Widgets");
|
"Enforce rounded corners on all App Widgets");
|
||||||
|
|
||||||
public static final BooleanFlag ENABLE_WALLPAPER_SCRIM = getDebugFlag(270393604,
|
|
||||||
"ENABLE_WALLPAPER_SCRIM", DISABLED,
|
|
||||||
"Enables scrim over wallpaper for text protection.");
|
|
||||||
|
|
||||||
public static final BooleanFlag ENABLE_ICON_LABEL_AUTO_SCALING = getDebugFlag(270393294,
|
public static final BooleanFlag ENABLE_ICON_LABEL_AUTO_SCALING = getDebugFlag(270393294,
|
||||||
"ENABLE_ICON_LABEL_AUTO_SCALING", ENABLED,
|
"ENABLE_ICON_LABEL_AUTO_SCALING", ENABLED,
|
||||||
"Enables scaling/spacing for icon labels to make more characters visible");
|
"Enables scaling/spacing for icon labels to make more characters visible");
|
||||||
|
|||||||
@@ -36,13 +36,10 @@ import android.view.View;
|
|||||||
import com.android.launcher3.BaseDraggingActivity;
|
import com.android.launcher3.BaseDraggingActivity;
|
||||||
import com.android.launcher3.DeviceProfile;
|
import com.android.launcher3.DeviceProfile;
|
||||||
import com.android.launcher3.R;
|
import com.android.launcher3.R;
|
||||||
import com.android.launcher3.config.FeatureFlags;
|
|
||||||
import com.android.launcher3.testing.shared.ResourceUtils;
|
import com.android.launcher3.testing.shared.ResourceUtils;
|
||||||
import com.android.launcher3.util.DynamicResource;
|
|
||||||
import com.android.launcher3.util.ScreenOnTracker;
|
import com.android.launcher3.util.ScreenOnTracker;
|
||||||
import com.android.launcher3.util.ScreenOnTracker.ScreenOnListener;
|
import com.android.launcher3.util.ScreenOnTracker.ScreenOnListener;
|
||||||
import com.android.launcher3.util.Themes;
|
import com.android.launcher3.util.Themes;
|
||||||
import com.android.systemui.plugins.ResourceProvider;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* View scrim which draws behind hotseat and workspace
|
* View scrim which draws behind hotseat and workspace
|
||||||
@@ -100,10 +97,8 @@ public class SysUiScrim implements View.OnAttachStateChangeListener {
|
|||||||
private static final int ALPHA_MASK_BITMAP_DP = 200;
|
private static final int ALPHA_MASK_BITMAP_DP = 200;
|
||||||
private static final int ALPHA_MASK_WIDTH_DP = 2;
|
private static final int ALPHA_MASK_WIDTH_DP = 2;
|
||||||
|
|
||||||
private boolean mDrawTopScrim, mDrawBottomScrim, mDrawWallpaperScrim;
|
private boolean mDrawTopScrim, mDrawBottomScrim;
|
||||||
|
|
||||||
private final RectF mWallpaperScrimRect = new RectF();
|
|
||||||
private final Paint mWallpaperScrimPaint = new Paint();
|
|
||||||
private final RectF mFinalMaskRect = new RectF();
|
private final RectF mFinalMaskRect = new RectF();
|
||||||
private final Paint mBottomMaskPaint = new Paint(Paint.FILTER_BITMAP_FLAG);
|
private final Paint mBottomMaskPaint = new Paint(Paint.FILTER_BITMAP_FLAG);
|
||||||
private final Bitmap mBottomMask;
|
private final Bitmap mBottomMask;
|
||||||
@@ -118,7 +113,6 @@ public class SysUiScrim implements View.OnAttachStateChangeListener {
|
|||||||
|
|
||||||
private boolean mAnimateScrimOnNextDraw = false;
|
private boolean mAnimateScrimOnNextDraw = false;
|
||||||
private float mSysUiAnimMultiplier = 1;
|
private float mSysUiAnimMultiplier = 1;
|
||||||
private int mWallpaperScrimMaxAlpha;
|
|
||||||
|
|
||||||
public SysUiScrim(View view) {
|
public SysUiScrim(View view) {
|
||||||
mRoot = view;
|
mRoot = view;
|
||||||
@@ -135,14 +129,6 @@ public class SysUiScrim implements View.OnAttachStateChangeListener {
|
|||||||
mHideSysUiScrim = true;
|
mHideSysUiScrim = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
mDrawWallpaperScrim = FeatureFlags.ENABLE_WALLPAPER_SCRIM.get()
|
|
||||||
&& !Themes.getAttrBoolean(view.getContext(), R.attr.isMainColorDark)
|
|
||||||
&& !Themes.getAttrBoolean(view.getContext(), R.attr.isWorkspaceDarkText);
|
|
||||||
ResourceProvider rp = DynamicResource.provider(view.getContext());
|
|
||||||
int wallpaperScrimColor = rp.getColor(R.color.wallpaper_scrim_color);
|
|
||||||
mWallpaperScrimMaxAlpha = Color.alpha(wallpaperScrimColor);
|
|
||||||
mWallpaperScrimPaint.setColor(wallpaperScrimColor);
|
|
||||||
|
|
||||||
view.addOnAttachStateChangeListener(this);
|
view.addOnAttachStateChangeListener(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -167,9 +153,6 @@ public class SysUiScrim implements View.OnAttachStateChangeListener {
|
|||||||
mAnimateScrimOnNextDraw = false;
|
mAnimateScrimOnNextDraw = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mDrawWallpaperScrim) {
|
|
||||||
canvas.drawRect(mWallpaperScrimRect, mWallpaperScrimPaint);
|
|
||||||
}
|
|
||||||
if (mDrawTopScrim) {
|
if (mDrawTopScrim) {
|
||||||
mTopScrim.draw(canvas);
|
mTopScrim.draw(canvas);
|
||||||
}
|
}
|
||||||
@@ -228,7 +211,6 @@ public class SysUiScrim implements View.OnAttachStateChangeListener {
|
|||||||
mTopScrim.setBounds(0, 0, w, h);
|
mTopScrim.setBounds(0, 0, w, h);
|
||||||
mFinalMaskRect.set(0, h - mMaskHeight, w, h);
|
mFinalMaskRect.set(0, h - mMaskHeight, w, h);
|
||||||
}
|
}
|
||||||
mWallpaperScrimRect.set(0, 0, w, h);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setSysUiProgress(float progress) {
|
private void setSysUiProgress(float progress) {
|
||||||
@@ -251,7 +233,6 @@ public class SysUiScrim implements View.OnAttachStateChangeListener {
|
|||||||
if (mTopScrim != null) {
|
if (mTopScrim != null) {
|
||||||
mTopScrim.setAlpha(Math.round(255 * factor));
|
mTopScrim.setAlpha(Math.round(255 * factor));
|
||||||
}
|
}
|
||||||
mWallpaperScrimPaint.setAlpha(Math.round(mWallpaperScrimMaxAlpha * factor));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private Bitmap createDitheredAlphaMask() {
|
private Bitmap createDitheredAlphaMask() {
|
||||||
|
|||||||
Reference in New Issue
Block a user