Loading packages/SystemUI/src/com/android/systemui/statusbar/policy/BatteryControllerImpl.java +1 −0 Original line number Diff line number Diff line Loading @@ -490,6 +490,7 @@ public class BatteryControllerImpl extends BroadcastReceiver implements BatteryC } private void fireBatteryUnknownStateChanged() { mLogger.logBatteryUnknownStateChangedCallback(mStateUnknown); dispatchSafeChange((callback) -> callback.onBatteryUnknownStateChanged(mStateUnknown)); } Loading packages/SystemUI/src/com/android/systemui/statusbar/policy/BatteryControllerLogger.kt +16 −7 Original line number Diff line number Diff line Loading @@ -35,7 +35,7 @@ constructor(@BatteryControllerLog private val logBuffer: LogBuffer) { TAG, LogLevel.DEBUG, { int1 = System.identityHashCode(controller) }, { "BatteryController CREATE (${Integer.toHexString(int1)})" } { "BatteryController CREATE (${Integer.toHexString(int1)})" }, ) } Loading @@ -47,7 +47,7 @@ constructor(@BatteryControllerLog private val logBuffer: LogBuffer) { int1 = System.identityHashCode(controller) bool1 = hasReceivedBattery }, { "BatteryController INIT (${Integer.toHexString(int1)}) hasReceivedBattery=$bool1" } { "BatteryController INIT (${Integer.toHexString(int1)}) hasReceivedBattery=$bool1" }, ) } Loading @@ -63,7 +63,7 @@ constructor(@BatteryControllerLog private val logBuffer: LogBuffer) { int1 = intent.getIntExtra(EXTRA_LEVEL, DEFAULT) int2 = intent.getIntExtra(EXTRA_SCALE, DEFAULT) }, { "Processing BATTERY_CHANGED intent. level=${int1.report()} scale=${int2.report()}" } { "Processing BATTERY_CHANGED intent. level=${int1.report()} scale=${int2.report()}" }, ) } Loading @@ -72,7 +72,7 @@ constructor(@BatteryControllerLog private val logBuffer: LogBuffer) { TAG, LogLevel.DEBUG, {}, { "Detected test intent. Will not execute battery level callbacks." } { "Detected test intent. Will not execute battery level callbacks." }, ) } Loading @@ -81,7 +81,7 @@ constructor(@BatteryControllerLog private val logBuffer: LogBuffer) { TAG, LogLevel.DEBUG, {}, { "Entering test mode for BATTERY_LEVEL_TEST intent" } { "Entering test mode for BATTERY_LEVEL_TEST intent" }, ) } Loading @@ -101,7 +101,16 @@ constructor(@BatteryControllerLog private val logBuffer: LogBuffer) { { "Sending onBatteryLevelChanged callbacks " + "with level=$int1, plugged=$bool1, charging=$bool2" }, ) } fun logBatteryUnknownStateChangedCallback(isUnknown: Boolean) { logBuffer.log( TAG, LogLevel.DEBUG, { bool1 = isUnknown }, { "Sending onBatteryStateUnknown callback with isUnknown=$bool1" }, ) } Loading @@ -110,7 +119,7 @@ constructor(@BatteryControllerLog private val logBuffer: LogBuffer) { TAG, LogLevel.DEBUG, { bool1 = isPowerSave }, { "Sending onPowerSaveChanged callback with powerSave=$bool1" } { "Sending onPowerSaveChanged callback with powerSave=$bool1" }, ) } Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/policy/BatteryControllerImpl.java +1 −0 Original line number Diff line number Diff line Loading @@ -490,6 +490,7 @@ public class BatteryControllerImpl extends BroadcastReceiver implements BatteryC } private void fireBatteryUnknownStateChanged() { mLogger.logBatteryUnknownStateChangedCallback(mStateUnknown); dispatchSafeChange((callback) -> callback.onBatteryUnknownStateChanged(mStateUnknown)); } Loading
packages/SystemUI/src/com/android/systemui/statusbar/policy/BatteryControllerLogger.kt +16 −7 Original line number Diff line number Diff line Loading @@ -35,7 +35,7 @@ constructor(@BatteryControllerLog private val logBuffer: LogBuffer) { TAG, LogLevel.DEBUG, { int1 = System.identityHashCode(controller) }, { "BatteryController CREATE (${Integer.toHexString(int1)})" } { "BatteryController CREATE (${Integer.toHexString(int1)})" }, ) } Loading @@ -47,7 +47,7 @@ constructor(@BatteryControllerLog private val logBuffer: LogBuffer) { int1 = System.identityHashCode(controller) bool1 = hasReceivedBattery }, { "BatteryController INIT (${Integer.toHexString(int1)}) hasReceivedBattery=$bool1" } { "BatteryController INIT (${Integer.toHexString(int1)}) hasReceivedBattery=$bool1" }, ) } Loading @@ -63,7 +63,7 @@ constructor(@BatteryControllerLog private val logBuffer: LogBuffer) { int1 = intent.getIntExtra(EXTRA_LEVEL, DEFAULT) int2 = intent.getIntExtra(EXTRA_SCALE, DEFAULT) }, { "Processing BATTERY_CHANGED intent. level=${int1.report()} scale=${int2.report()}" } { "Processing BATTERY_CHANGED intent. level=${int1.report()} scale=${int2.report()}" }, ) } Loading @@ -72,7 +72,7 @@ constructor(@BatteryControllerLog private val logBuffer: LogBuffer) { TAG, LogLevel.DEBUG, {}, { "Detected test intent. Will not execute battery level callbacks." } { "Detected test intent. Will not execute battery level callbacks." }, ) } Loading @@ -81,7 +81,7 @@ constructor(@BatteryControllerLog private val logBuffer: LogBuffer) { TAG, LogLevel.DEBUG, {}, { "Entering test mode for BATTERY_LEVEL_TEST intent" } { "Entering test mode for BATTERY_LEVEL_TEST intent" }, ) } Loading @@ -101,7 +101,16 @@ constructor(@BatteryControllerLog private val logBuffer: LogBuffer) { { "Sending onBatteryLevelChanged callbacks " + "with level=$int1, plugged=$bool1, charging=$bool2" }, ) } fun logBatteryUnknownStateChangedCallback(isUnknown: Boolean) { logBuffer.log( TAG, LogLevel.DEBUG, { bool1 = isUnknown }, { "Sending onBatteryStateUnknown callback with isUnknown=$bool1" }, ) } Loading @@ -110,7 +119,7 @@ constructor(@BatteryControllerLog private val logBuffer: LogBuffer) { TAG, LogLevel.DEBUG, { bool1 = isPowerSave }, { "Sending onPowerSaveChanged callback with powerSave=$bool1" } { "Sending onPowerSaveChanged callback with powerSave=$bool1" }, ) } Loading