mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-11 06:44:00 +00:00
catch CrossWindowBlurListeners.getInstance() no method not found
This commit is contained in:
@@ -2203,8 +2203,12 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener
|
||||
private static class LaunchDepthController extends DepthController {
|
||||
LaunchDepthController(QuickstepLauncher launcher) {
|
||||
super(launcher);
|
||||
setCrossWindowBlursEnabled(
|
||||
CrossWindowBlurListeners.getInstance().isCrossWindowBlurEnabled());
|
||||
try {
|
||||
setCrossWindowBlursEnabled(
|
||||
CrossWindowBlurListeners.getInstance().isCrossWindowBlurEnabled());
|
||||
} catch (Throwable t) {
|
||||
// ignore
|
||||
}
|
||||
// Make sure that the starting value matches the current depth set by the main
|
||||
// controller.
|
||||
stateDepth.setValue(launcher.getDepthController().stateDepth.getValue());
|
||||
|
||||
@@ -90,9 +90,11 @@ public class DepthController extends BaseDepthController implements StateHandler
|
||||
mOnAttachListener = new View.OnAttachStateChangeListener() {
|
||||
@Override
|
||||
public void onViewAttachedToWindow(View view) {
|
||||
if (LawnchairQuickstepCompat.ATLEAST_S) {
|
||||
try {
|
||||
CrossWindowBlurListeners.getInstance().addListener(mLauncher.getMainExecutor(),
|
||||
mCrossWindowBlurListener);
|
||||
} catch (Throwable t) {
|
||||
// Ignore
|
||||
}
|
||||
|
||||
mLauncher.getScrimView().addOpaquenessListener(mOpaquenessListener);
|
||||
@@ -127,8 +129,12 @@ public class DepthController extends BaseDepthController implements StateHandler
|
||||
}
|
||||
|
||||
private void removeSecondaryListeners() {
|
||||
if (mCrossWindowBlurListener != null && LawnchairQuickstepCompat.ATLEAST_S) {
|
||||
CrossWindowBlurListeners.getInstance().removeListener(mCrossWindowBlurListener);
|
||||
if (mCrossWindowBlurListener != null) {
|
||||
try {
|
||||
CrossWindowBlurListeners.getInstance().removeListener(mCrossWindowBlurListener);
|
||||
} catch (Throwable t) {
|
||||
// Ignore
|
||||
}
|
||||
}
|
||||
if (mOpaquenessListener != null) {
|
||||
mLauncher.getScrimView().removeOpaquenessListener(mOpaquenessListener);
|
||||
|
||||
Reference in New Issue
Block a user