Dump keyguard status bar state
We didn't have KeyguardStatusBarView dumps in our dumpsys, adding more info will make our lives easier in the future. Test: adb shell dumpsys activity service com.android.systemui Change-Id: I07af14922501889cc15005f01463674f0651dfde Fixes: 109899206
This commit is contained in:
@@ -210,6 +210,10 @@ public class BatteryMeterDrawableBase extends Drawable {
|
||||
postInvalidate();
|
||||
}
|
||||
|
||||
public boolean getPowerSave() {
|
||||
return mPowerSaveEnabled;
|
||||
}
|
||||
|
||||
protected void setPowerSaveAsColorError(boolean asError) {
|
||||
mPowerSaveAsColorError = asError;
|
||||
}
|
||||
|
||||
@@ -56,6 +56,8 @@ import com.android.systemui.tuner.TunerService;
|
||||
import com.android.systemui.tuner.TunerService.Tunable;
|
||||
import com.android.systemui.util.Utils.DisableStateTracker;
|
||||
|
||||
import java.io.FileDescriptor;
|
||||
import java.io.PrintWriter;
|
||||
import java.text.NumberFormat;
|
||||
|
||||
public class BatteryMeterView extends LinearLayout implements
|
||||
@@ -343,6 +345,17 @@ public class BatteryMeterView extends LinearLayout implements
|
||||
return (int) ArgbEvaluator.getInstance().evaluate(darkIntensity, lightColor, darkColor);
|
||||
}
|
||||
|
||||
public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
|
||||
String powerSave = mDrawable == null ? null : mDrawable.getPowerSave() + "";
|
||||
CharSequence percent = mBatteryPercentView == null ? null : mBatteryPercentView.getText();
|
||||
pw.println(" BatteryMeterView:");
|
||||
pw.println(" mDrawable.getPowerSave: " + powerSave);
|
||||
pw.println(" mBatteryPercentView.getText(): " + percent);
|
||||
pw.println(" mTextColor: #" + Integer.toHexString(mTextColor));
|
||||
pw.println(" mLevel: " + mLevel);
|
||||
pw.println(" mForceShowPercent: " + mForceShowPercent);
|
||||
}
|
||||
|
||||
private final class SettingObserver extends ContentObserver {
|
||||
public SettingObserver(Handler handler) {
|
||||
super(handler);
|
||||
|
||||
@@ -57,6 +57,9 @@ import com.android.systemui.statusbar.policy.UserInfoController.OnUserInfoChange
|
||||
import com.android.systemui.statusbar.policy.UserInfoControllerImpl;
|
||||
import com.android.systemui.statusbar.policy.UserSwitcherController;
|
||||
|
||||
import java.io.FileDescriptor;
|
||||
import java.io.PrintWriter;
|
||||
|
||||
/**
|
||||
* The header group on Keyguard.
|
||||
*/
|
||||
@@ -458,4 +461,15 @@ public class KeyguardStatusBarView extends RelativeLayout
|
||||
((DarkReceiver) v).onDarkChanged(tintArea, intensity, color);
|
||||
}
|
||||
}
|
||||
|
||||
public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
|
||||
pw.println("KeyguardStatusBarView:");
|
||||
pw.println(" mBatteryCharging: " + mBatteryCharging);
|
||||
pw.println(" mKeyguardUserSwitcherShowing: " + mKeyguardUserSwitcherShowing);
|
||||
pw.println(" mBatteryListening: " + mBatteryListening);
|
||||
pw.println(" mLayoutState: " + mLayoutState);
|
||||
if (mBatteryView != null) {
|
||||
mBatteryView.dump(fd, pw, args);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,6 +77,8 @@ import com.android.systemui.statusbar.stack.AnimationProperties;
|
||||
import com.android.systemui.statusbar.stack.NotificationStackScrollLayout;
|
||||
import com.android.systemui.statusbar.stack.StackStateAnimator;
|
||||
|
||||
import java.io.FileDescriptor;
|
||||
import java.io.PrintWriter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.function.Consumer;
|
||||
@@ -2827,4 +2829,12 @@ public class NotificationPanelView extends PanelView implements
|
||||
setKeyguardStatusViewVisibility(mStatusBarState, true /* keyguardFadingAway */,
|
||||
false /* goingToFullShade */);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
|
||||
super.dump(fd, pw, args);
|
||||
if (mKeyguardStatusBar != null) {
|
||||
mKeyguardStatusBar.dump(fd, pw, args);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user