Launcher3: Make overview transparent only if blur is enabled

Change-Id: Ibf71c795abd712eb8b7d8db2924b35efb67eabc0
This commit is contained in:
Adithya R 2023-10-31 23:31:10 +05:30 committed by fazilsheik96
parent 087772fa8a
commit 9f2c6712c9
1 changed files with 6 additions and 2 deletions

View File

@ -21,6 +21,7 @@ import static com.android.launcher3.logging.StatsLogManager.LAUNCHER_STATE_OVERV
import android.content.Context;
import android.graphics.Rect;
import android.os.SystemProperties;
import android.view.CrossWindowBlurListeners;
import androidx.core.graphics.ColorUtils;
@ -124,8 +125,11 @@ public class OverviewState extends LauncherState {
@Override
public int getWorkspaceScrimColor(Launcher launcher) {
return ColorUtils.setAlphaComponent(
Themes.getAttrColor(launcher, R.attr.overviewScrimColor), 15);
int color = Themes.getAttrColor(launcher, R.attr.overviewScrimColor);
if (CrossWindowBlurListeners.getInstance().isCrossWindowBlurEnabled()) {
return ColorUtils.setAlphaComponent(color, 15);
}
return color;
}
@Override