Merge "Apply correct theme when launcher restarts" into main
This commit is contained in:
committed by
Android (Google) Code Review
commit
894224b3d2
@@ -298,8 +298,9 @@ public class QuickstepLauncher extends Launcher implements RecentsViewContainer,
|
||||
|
||||
@Override
|
||||
protected void setupViews() {
|
||||
getTheme().applyStyle(getOverviewBlurStyleResId(), true);
|
||||
getAppWidgetHolder().setOnViewCreationCallback(new QuickstepInteractionHandler(this));
|
||||
mDepthController = new DepthController(this);
|
||||
getTheme().applyStyle(getOverviewBlurStyleResId(), true);
|
||||
super.setupViews();
|
||||
|
||||
mActionsView = findViewById(R.id.overview_actions_view);
|
||||
@@ -329,7 +330,7 @@ public class QuickstepLauncher extends Launcher implements RecentsViewContainer,
|
||||
mAppTransitionManager.registerRemoteTransitions();
|
||||
|
||||
mTISBindHelper = new TISBindHelper(this, this::onTISConnected);
|
||||
mDepthController = new DepthController(this);
|
||||
|
||||
if (DesktopModeStatus.canEnterDesktopModeOrShowAppHandle(this)) {
|
||||
mSplitSelectStateController.initSplitFromDesktopController(this);
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@ import android.os.Trace;
|
||||
import android.util.FloatProperty;
|
||||
import android.util.Log;
|
||||
import android.view.AttachedSurfaceControl;
|
||||
import android.view.CrossWindowBlurListeners;
|
||||
import android.view.SurfaceControl;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
@@ -122,9 +123,11 @@ public class BaseDepthController {
|
||||
public BaseDepthController(Launcher activity) {
|
||||
mLauncher = activity;
|
||||
if (Flags.allAppsBlur() || enableOverviewBackgroundWallpaperBlur()) {
|
||||
mCrossWindowBlursEnabled =
|
||||
CrossWindowBlurListeners.getInstance().isCrossWindowBlurEnabled();
|
||||
mBlursEnabled = calculateBlursEnabled();
|
||||
mMaxBlurRadius = activity.getResources().getDimensionPixelSize(
|
||||
R.dimen.max_depth_blur_radius_enhanced);
|
||||
mLauncher.updateBlurStyle();
|
||||
} else {
|
||||
mMaxBlurRadius = activity.getResources().getInteger(R.integer.max_depth_blur_radius);
|
||||
}
|
||||
@@ -157,7 +160,7 @@ public class BaseDepthController {
|
||||
}
|
||||
|
||||
protected final void onBlurChange() {
|
||||
boolean blursEnabled = mCrossWindowBlursEnabled && !mPauseBlurs;
|
||||
boolean blursEnabled = calculateBlursEnabled();
|
||||
if (mBlursEnabled == blursEnabled) {
|
||||
return;
|
||||
}
|
||||
@@ -412,4 +415,8 @@ public class BaseDepthController {
|
||||
private SurfaceControl.Transaction createTransaction() {
|
||||
return new SurfaceControl.Transaction();
|
||||
}
|
||||
|
||||
private Boolean calculateBlursEnabled() {
|
||||
return mCrossWindowBlursEnabled && !mPauseBlurs;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user