Add more logs to dumpsys for screen decoration
Bug: 270154695 Test: adb shell dumpsys activity service SystemUIService Change-Id: I5b123bee38b66ab566b4d067d3164e3ae0982cf1
This commit is contained in:
@@ -37,6 +37,8 @@ import android.view.View
|
||||
import androidx.annotation.VisibleForTesting
|
||||
import com.android.systemui.RegionInterceptingFrameLayout.RegionInterceptableView
|
||||
import com.android.systemui.animation.Interpolators
|
||||
import com.android.systemui.util.asIndenting
|
||||
import java.io.PrintWriter
|
||||
|
||||
/**
|
||||
* A class that handles common actions of display cutout view.
|
||||
@@ -324,4 +326,18 @@ open class DisplayCutoutBaseView : View, RegionInterceptableView {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
open fun dump(pw: PrintWriter) {
|
||||
val ipw = pw.asIndenting()
|
||||
ipw.increaseIndent()
|
||||
ipw.println("DisplayCutoutBaseView:")
|
||||
ipw.increaseIndent()
|
||||
ipw.println("shouldDrawCutout=$shouldDrawCutout")
|
||||
ipw.println("cutout=${displayInfo.displayCutout}")
|
||||
ipw.println("cameraProtectionProgress=$cameraProtectionProgress")
|
||||
ipw.println("protectionRect=$protectionRect")
|
||||
ipw.println("protectionRectOrig=$protectionRectOrig")
|
||||
ipw.decreaseIndent()
|
||||
ipw.decreaseIndent()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,6 +37,8 @@ import com.android.settingslib.Utils
|
||||
import com.android.systemui.animation.Interpolators
|
||||
import com.android.systemui.log.ScreenDecorationsLogger
|
||||
import com.android.systemui.plugins.statusbar.StatusBarStateController
|
||||
import com.android.systemui.util.asIndenting
|
||||
import java.io.PrintWriter
|
||||
import java.util.concurrent.Executor
|
||||
|
||||
/**
|
||||
@@ -416,4 +418,15 @@ class FaceScanningOverlay(
|
||||
path.transform(scaleMatrix)
|
||||
}
|
||||
}
|
||||
|
||||
override fun dump(pw: PrintWriter) {
|
||||
val ipw = pw.asIndenting()
|
||||
ipw.increaseIndent()
|
||||
ipw.println("FaceScanningOverlay:")
|
||||
super.dump(ipw)
|
||||
ipw.println("rimProgress=$rimProgress")
|
||||
ipw.println("rimRect=$rimRect")
|
||||
ipw.println("this=$this")
|
||||
ipw.decreaseIndent()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,6 +40,8 @@ import android.view.RoundedCorner
|
||||
import android.view.RoundedCorners
|
||||
import android.view.Surface
|
||||
import androidx.annotation.VisibleForTesting
|
||||
import com.android.systemui.util.asIndenting
|
||||
import java.io.PrintWriter
|
||||
import kotlin.math.ceil
|
||||
import kotlin.math.floor
|
||||
|
||||
@@ -47,8 +49,8 @@ import kotlin.math.floor
|
||||
* When the HWC of the device supports Composition.DISPLAY_DECORATION, we use this layer to draw
|
||||
* screen decorations.
|
||||
*/
|
||||
class ScreenDecorHwcLayer(context: Context, displayDecorationSupport: DisplayDecorationSupport)
|
||||
: DisplayCutoutBaseView(context) {
|
||||
class ScreenDecorHwcLayer(context: Context, displayDecorationSupport: DisplayDecorationSupport) :
|
||||
DisplayCutoutBaseView(context) {
|
||||
val colorMode: Int
|
||||
private val useInvertedAlphaColor: Boolean
|
||||
private val color: Int
|
||||
@@ -406,6 +408,20 @@ class ScreenDecorHwcLayer(context: Context, displayDecorationSupport: DisplayDec
|
||||
invalidate()
|
||||
}
|
||||
|
||||
override fun dump(pw: PrintWriter) {
|
||||
val ipw = pw.asIndenting()
|
||||
ipw.increaseIndent()
|
||||
ipw.println("ScreenDecorHwcLayer:")
|
||||
super.dump(pw)
|
||||
ipw.println("this=$this")
|
||||
ipw.println("transparentRect=$transparentRect")
|
||||
ipw.println("hasTopRoundedCorner=$hasTopRoundedCorner")
|
||||
ipw.println("hasBottomRoundedCorner=$hasBottomRoundedCorner")
|
||||
ipw.println("roundedCornerTopSize=$roundedCornerTopSize")
|
||||
ipw.println("roundedCornerBottomSize=$roundedCornerBottomSize")
|
||||
ipw.decreaseIndent()
|
||||
}
|
||||
|
||||
companion object {
|
||||
private val DEBUG_COLOR = ScreenDecorations.DEBUG_COLOR
|
||||
}
|
||||
|
||||
@@ -23,6 +23,8 @@ import static android.view.ViewGroup.LayoutParams.MATCH_PARENT;
|
||||
import static android.view.ViewGroup.LayoutParams.WRAP_CONTENT;
|
||||
import static android.view.WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS;
|
||||
|
||||
import static com.android.systemui.util.DumpUtilsKt.asIndenting;
|
||||
|
||||
import android.annotation.IdRes;
|
||||
import android.annotation.NonNull;
|
||||
import android.annotation.Nullable;
|
||||
@@ -44,6 +46,7 @@ import android.os.SystemProperties;
|
||||
import android.os.Trace;
|
||||
import android.provider.Settings.Secure;
|
||||
import android.util.DisplayUtils;
|
||||
import android.util.IndentingPrintWriter;
|
||||
import android.util.Log;
|
||||
import android.util.Size;
|
||||
import android.view.Display;
|
||||
@@ -1005,39 +1008,55 @@ public class ScreenDecorations implements CoreStartable, Tunable , Dumpable {
|
||||
@Override
|
||||
public void dump(@NonNull PrintWriter pw, @NonNull String[] args) {
|
||||
pw.println("ScreenDecorations state:");
|
||||
pw.println(" DEBUG_DISABLE_SCREEN_DECORATIONS:" + DEBUG_DISABLE_SCREEN_DECORATIONS);
|
||||
IndentingPrintWriter ipw = asIndenting(pw);
|
||||
ipw.increaseIndent();
|
||||
ipw.println("DEBUG_DISABLE_SCREEN_DECORATIONS:" + DEBUG_DISABLE_SCREEN_DECORATIONS);
|
||||
if (DEBUG_DISABLE_SCREEN_DECORATIONS) {
|
||||
return;
|
||||
}
|
||||
|
||||
pw.println(" mIsPrivacyDotEnabled:" + isPrivacyDotEnabled());
|
||||
pw.println(" shouldOptimizeOverlayVisibility:" + shouldOptimizeVisibility());
|
||||
ipw.println("mIsPrivacyDotEnabled:" + isPrivacyDotEnabled());
|
||||
ipw.println("shouldOptimizeOverlayVisibility:" + shouldOptimizeVisibility());
|
||||
final boolean supportsShowingFaceScanningAnim = mFaceScanningFactory.getHasProviders();
|
||||
pw.println(" supportsShowingFaceScanningAnim:" + supportsShowingFaceScanningAnim);
|
||||
ipw.println("supportsShowingFaceScanningAnim:" + supportsShowingFaceScanningAnim);
|
||||
if (supportsShowingFaceScanningAnim) {
|
||||
pw.println(" canShowFaceScanningAnim:"
|
||||
ipw.increaseIndent();
|
||||
ipw.println("canShowFaceScanningAnim:"
|
||||
+ mFaceScanningFactory.canShowFaceScanningAnim());
|
||||
pw.println(" shouldShowFaceScanningAnim (at time dump was taken):"
|
||||
ipw.println("shouldShowFaceScanningAnim (at time dump was taken):"
|
||||
+ mFaceScanningFactory.shouldShowFaceScanningAnim());
|
||||
ipw.decreaseIndent();
|
||||
}
|
||||
pw.println(" mPendingConfigChange:" + mPendingConfigChange);
|
||||
FaceScanningOverlay faceScanningOverlay =
|
||||
(FaceScanningOverlay) getOverlayView(mFaceScanningViewId);
|
||||
if (faceScanningOverlay != null) {
|
||||
faceScanningOverlay.dump(ipw);
|
||||
}
|
||||
ipw.println("mPendingConfigChange:" + mPendingConfigChange);
|
||||
if (mHwcScreenDecorationSupport != null) {
|
||||
pw.println(" mHwcScreenDecorationSupport:");
|
||||
pw.println(" format="
|
||||
ipw.increaseIndent();
|
||||
ipw.println("mHwcScreenDecorationSupport:");
|
||||
ipw.increaseIndent();
|
||||
ipw.println("format="
|
||||
+ PixelFormat.formatToString(mHwcScreenDecorationSupport.format));
|
||||
pw.println(" alphaInterpretation="
|
||||
ipw.println("alphaInterpretation="
|
||||
+ alphaInterpretationToString(mHwcScreenDecorationSupport.alphaInterpretation));
|
||||
ipw.decreaseIndent();
|
||||
ipw.decreaseIndent();
|
||||
} else {
|
||||
pw.println(" mHwcScreenDecorationSupport: null");
|
||||
ipw.increaseIndent();
|
||||
pw.println("mHwcScreenDecorationSupport: null");
|
||||
ipw.decreaseIndent();
|
||||
}
|
||||
if (mScreenDecorHwcLayer != null) {
|
||||
pw.println(" mScreenDecorHwcLayer:");
|
||||
pw.println(" transparentRegion=" + mScreenDecorHwcLayer.transparentRect);
|
||||
ipw.increaseIndent();
|
||||
mScreenDecorHwcLayer.dump(ipw);
|
||||
ipw.decreaseIndent();
|
||||
} else {
|
||||
pw.println(" mScreenDecorHwcLayer: null");
|
||||
ipw.println("mScreenDecorHwcLayer: null");
|
||||
}
|
||||
if (mOverlays != null) {
|
||||
pw.println(" mOverlays(left,top,right,bottom)=("
|
||||
ipw.println("mOverlays(left,top,right,bottom)=("
|
||||
+ (mOverlays[BOUNDS_POSITION_LEFT] != null) + ","
|
||||
+ (mOverlays[BOUNDS_POSITION_TOP] != null) + ","
|
||||
+ (mOverlays[BOUNDS_POSITION_RIGHT] != null) + ","
|
||||
|
||||
Reference in New Issue
Block a user