Merge "Removing unused wallpaper-scrim feature" into udc-dev am: 386f9796e3

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/23039034

Change-Id: I3ac5daa14f3f0ef79e7f5f974bc84a9d04bccc99
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Treehugger Robot
2023-05-09 21:16:07 +00:00
committed by Automerger Merge Worker
4 changed files with 1 additions and 26 deletions

View File

@@ -75,7 +75,6 @@
<color name="text_color_tertiary_dark">#CCFFFFFF</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_dark">#ff3d665f</color>

View File

@@ -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/wallpaper_scrim_color" />
</DynamicResources>

View File

@@ -372,10 +372,6 @@ public final class FeatureFlags {
"ENABLE_ENFORCED_ROUNDED_CORNERS", ENABLED,
"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,
"ENABLE_ICON_LABEL_AUTO_SCALING", ENABLED,
"Enables scaling/spacing for icon labels to make more characters visible");

View File

@@ -36,13 +36,10 @@ import android.view.View;
import com.android.launcher3.BaseDraggingActivity;
import com.android.launcher3.DeviceProfile;
import com.android.launcher3.R;
import com.android.launcher3.config.FeatureFlags;
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.ScreenOnListener;
import com.android.launcher3.util.Themes;
import com.android.systemui.plugins.ResourceProvider;
/**
* 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_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 Paint mBottomMaskPaint = new Paint(Paint.FILTER_BITMAP_FLAG);
private final Bitmap mBottomMask;
@@ -118,7 +113,6 @@ public class SysUiScrim implements View.OnAttachStateChangeListener {
private boolean mAnimateScrimOnNextDraw = false;
private float mSysUiAnimMultiplier = 1;
private int mWallpaperScrimMaxAlpha;
public SysUiScrim(View view) {
mRoot = view;
@@ -135,14 +129,6 @@ public class SysUiScrim implements View.OnAttachStateChangeListener {
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);
}
@@ -167,9 +153,6 @@ public class SysUiScrim implements View.OnAttachStateChangeListener {
mAnimateScrimOnNextDraw = false;
}
if (mDrawWallpaperScrim) {
canvas.drawRect(mWallpaperScrimRect, mWallpaperScrimPaint);
}
if (mDrawTopScrim) {
mTopScrim.draw(canvas);
}
@@ -228,7 +211,6 @@ public class SysUiScrim implements View.OnAttachStateChangeListener {
mTopScrim.setBounds(0, 0, w, h);
mFinalMaskRect.set(0, h - mMaskHeight, w, h);
}
mWallpaperScrimRect.set(0, 0, w, h);
}
private void setSysUiProgress(float progress) {
@@ -251,7 +233,6 @@ public class SysUiScrim implements View.OnAttachStateChangeListener {
if (mTopScrim != null) {
mTopScrim.setAlpha(Math.round(255 * factor));
}
mWallpaperScrimPaint.setAlpha(Math.round(mWallpaperScrimMaxAlpha * factor));
}
private Bitmap createDitheredAlphaMask() {