Merge "Dump DepthController internals" into sc-v2-dev am: 6087951a9f

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

Change-Id: I37653383befee4fee1be691be79a65015598f603
This commit is contained in:
TreeHugger Robot
2021-09-11 01:13:01 +00:00
committed by Automerger Merge Worker
2 changed files with 33 additions and 2 deletions
@@ -90,6 +90,8 @@ import com.android.systemui.unfold.UnfoldTransitionFactory;
import com.android.systemui.unfold.UnfoldTransitionProgressProvider;
import com.android.systemui.unfold.config.UnfoldTransitionConfig;
import java.io.FileDescriptor;
import java.io.PrintWriter;
import java.util.List;
import java.util.stream.Stream;
@@ -619,4 +621,12 @@ public abstract class BaseQuickstepLauncher extends Launcher
recentsView.finishRecentsAnimation(/* toRecents= */ true, null);
}
}
@Override
public void dump(String prefix, FileDescriptor fd, PrintWriter writer, String[] args) {
super.dump(prefix, fd, writer, args);
if (mDepthController != null) {
mDepthController.dump(prefix, writer);
}
}
}
@@ -44,6 +44,8 @@ import com.android.launcher3.states.StateAnimationConfig;
import com.android.systemui.shared.system.BlurUtils;
import com.android.systemui.shared.system.WallpaperManagerCompat;
import java.io.FileDescriptor;
import java.io.PrintWriter;
import java.util.function.Consumer;
/**
@@ -137,6 +139,11 @@ public class DepthController implements StateHandler<LauncherState>,
* @see android.service.wallpaper.WallpaperService.Engine#onZoomChanged(float)
*/
private float mDepth;
/**
* Last blur value, in pixels, that was applied.
* For debugging purposes.
*/
private int mCurrentBlur;
/**
* If we're launching and app and should not be blurring the screen for performance reasons.
*/
@@ -306,10 +313,10 @@ public class DepthController implements StateHandler<LauncherState>,
if (supportsBlur) {
boolean opaque = mLauncher.getScrimView().isFullyOpaque();
int blur = !mCrossWindowBlursEnabled || mBlurDisabledForAppLaunch
mCurrentBlur = !mCrossWindowBlursEnabled || mBlurDisabledForAppLaunch
? 0 : (int) (depth * mMaxBlurRadius);
SurfaceControl.Transaction transaction = new SurfaceControl.Transaction()
.setBackgroundBlurRadius(mSurface, blur)
.setBackgroundBlurRadius(mSurface, mCurrentBlur)
.setOpaque(mSurface, opaque);
// Set early wake-up flags when we know we're executing an expensive operation, this way
@@ -348,4 +355,18 @@ public class DepthController implements StateHandler<LauncherState>,
mwAnimation.setAutoCancel(true);
mwAnimation.start();
}
public void dump(String prefix, PrintWriter writer) {
writer.println(prefix + this.getClass().getSimpleName());
writer.println(prefix + "\tmMaxBlurRadius=" + mMaxBlurRadius);
writer.println(prefix + "\tmCrossWindowBlursEnabled=" + mCrossWindowBlursEnabled);
writer.println(prefix + "\tmSurface=" + mSurface);
writer.println(prefix + "\tmOverlayScrollProgress=" + mOverlayScrollProgress);
writer.println(prefix + "\tmDepth=" + mDepth);
writer.println(prefix + "\tmCurrentBlur=" + mCurrentBlur);
writer.println(prefix + "\tmBlurDisabledForAppLaunch=" + mBlurDisabledForAppLaunch);
writer.println(prefix + "\tmInEarlyWakeUp=" + mInEarlyWakeUp);
writer.println(prefix + "\tmIgnoreStateChangesDuringMultiWindowAnimation="
+ mIgnoreStateChangesDuringMultiWindowAnimation);
}
}