Merge "Add more info to dump" into tm-dev am: b0b4b466e5

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18245864

Change-Id: I005c0ff6a2ed8a3fc4cb7b3628558a99c9650409
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Shawn Lin
2022-05-11 04:34:40 +00:00
committed by Automerger Merge Worker
2 changed files with 24 additions and 5 deletions

View File

@@ -957,11 +957,19 @@ public class ScreenDecorations extends CoreStartable implements Tunable , Dumpab
} else { } else {
pw.println(" mScreenDecorHwcLayer: null"); pw.println(" mScreenDecorHwcLayer: null");
} }
pw.println(" mOverlays(left,top,right,bottom)=(" if (mOverlays != null) {
+ (mOverlays != null && mOverlays[BOUNDS_POSITION_LEFT] != null) + "," pw.println(" mOverlays(left,top,right,bottom)=("
+ (mOverlays != null && mOverlays[BOUNDS_POSITION_TOP] != null) + "," + (mOverlays[BOUNDS_POSITION_LEFT] != null) + ","
+ (mOverlays != null && mOverlays[BOUNDS_POSITION_RIGHT] != null) + "," + (mOverlays[BOUNDS_POSITION_TOP] != null) + ","
+ (mOverlays != null && mOverlays[BOUNDS_POSITION_BOTTOM] != null) + ")"); + (mOverlays[BOUNDS_POSITION_RIGHT] != null) + ","
+ (mOverlays[BOUNDS_POSITION_BOTTOM] != null) + ")");
for (int i = BOUNDS_POSITION_LEFT; i < BOUNDS_POSITION_LENGTH; i++) {
if (mOverlays[i] != null) {
mOverlays[i].dump(pw, getWindowTitleByPos(i));
}
}
}
mRoundedCornerResDelegate.dump(pw, args); mRoundedCornerResDelegate.dump(pw, args);
} }

View File

@@ -16,11 +16,13 @@
package com.android.systemui.decor package com.android.systemui.decor
import android.annotation.IdRes import android.annotation.IdRes
import android.annotation.NonNull
import android.content.Context import android.content.Context
import android.view.Surface import android.view.Surface
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import com.android.systemui.RegionInterceptingFrameLayout import com.android.systemui.RegionInterceptingFrameLayout
import java.io.PrintWriter
class OverlayWindow(private val context: Context) { class OverlayWindow(private val context: Context) {
@@ -100,4 +102,13 @@ class OverlayWindow(private val context: Context) {
} }
} }
} }
fun dump(@NonNull pw: PrintWriter, name: String) {
pw.println(" $name=")
pw.println(" rootView=$rootView")
for (i in 0 until rootView.childCount) {
val child = rootView.getChildAt(i)
pw.println(" child[$i]=$child")
}
}
} }