Loading packages/SettingsLib/src/com/android/settingslib/graph/SignalDrawable.java +9 −0 Original line number Diff line number Diff line Loading @@ -164,6 +164,15 @@ public class SignalDrawable extends DrawableWrapper { return true; } /** * Returns the level used to access the different drawable assets. * * Temporarily visible for logging purposes - b/378919631. */ public int unpackLevel() { return unpackLevel(getLevel()); } private int unpackLevel(int packedState) { int numBins = (packedState & NUM_LEVEL_MASK) >> NUM_LEVEL_SHIFT; int cutOutOffset = 0; Loading packages/SystemUI/src/com/android/systemui/statusbar/pipeline/dagger/StatusBarPipelineModule.kt +1 −1 Original line number Diff line number Diff line Loading @@ -281,7 +281,7 @@ abstract class StatusBarPipelineModule { @SysUISingleton @VerboseMobileViewLog fun provideVerboseMobileViewLogBuffer(factory: LogBufferFactory): LogBuffer { return factory.create("VerboseMobileViewLog", 100) return factory.create("VerboseMobileViewLog", 200) } @Provides Loading packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/ui/VerboseMobileViewLogger.kt +50 −7 Original line number Diff line number Diff line Loading @@ -35,9 +35,7 @@ import javax.inject.Inject @SysUISingleton class VerboseMobileViewLogger @Inject constructor( @VerboseMobileViewLog private val buffer: LogBuffer, ) { constructor(@VerboseMobileViewLog private val buffer: LogBuffer) { fun logBinderReceivedVisibility(parentView: View, subId: Int, visibility: Boolean) { buffer.log( TAG, Loading @@ -51,7 +49,53 @@ constructor( ) } fun logBinderReceivedSignalIcon(parentView: View, subId: Int, icon: SignalIconModel) { fun logBinderSignalIconResult(parentView: View, subId: Int, unpackedLevel: Int) { buffer.log( TAG, LogLevel.VERBOSE, { str1 = parentView.getIdForLogging() int1 = subId int2 = unpackedLevel }, { "Binder[subId=$int1, viewId=$str1] SignalDrawable used $int2 for drawable level" }, ) } fun logBinderReceivedSignalCellularIcon( parentView: View, subId: Int, icon: SignalIconModel.Cellular, packedSignalDrawableState: Int, shouldRequestLayout: Boolean, ) { buffer.log( TAG, LogLevel.VERBOSE, { str1 = parentView.getIdForLogging() int1 = subId int2 = icon.level long1 = icon.numberOfLevels.toLong() // See SettingsLib/res/drawable/ic_mobile_level_list.xml for how the // SignalDrawableState level is used for rendering. long2 = packedSignalDrawableState.toLong() bool1 = icon.showExclamationMark bool2 = shouldRequestLayout }, { "Binder[subId=$int1, viewId=$str1] received new signal icon (cellular): " + "level=$int2 numLevels=$long1 showExclamation=$bool1 " + "packedDrawableLevel=$long2 shouldRequestLayout=$bool2" }, ) } fun logBinderReceivedSignalSatelliteIcon( parentView: View, subId: Int, icon: SignalIconModel.Satellite, ) { buffer.log( TAG, LogLevel.VERBOSE, Loading @@ -59,11 +103,10 @@ constructor( str1 = parentView.getIdForLogging() int1 = subId int2 = icon.level bool1 = if (icon is SignalIconModel.Cellular) icon.showExclamationMark else false }, { "Binder[subId=$int1, viewId=$str1] received new signal icon: " + "level=$int2 showExclamation=$bool1" "Binder[subId=$int1, viewId=$str1] received new signal icon (satellite): " + "level=$int2" }, ) } Loading packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/ui/binder/MobileIconBinder.kt +19 −6 Original line number Diff line number Diff line Loading @@ -149,15 +149,28 @@ object MobileIconBinder { Pair(shouldRequestLayout, newIcon) } .collect { (shouldRequestLayout, newIcon) -> viewModel.verboseLogger?.logBinderReceivedSignalIcon( view, viewModel.subscriptionId, newIcon, ) if (newIcon is SignalIconModel.Cellular) { val packedSignalDrawableState = newIcon.toSignalDrawableState() viewModel.verboseLogger?.logBinderReceivedSignalCellularIcon( parentView = view, subId = viewModel.subscriptionId, icon = newIcon, packedSignalDrawableState = packedSignalDrawableState, shouldRequestLayout = shouldRequestLayout, ) iconView.setImageDrawable(mobileDrawable) mobileDrawable.level = newIcon.toSignalDrawableState() mobileDrawable.level = packedSignalDrawableState viewModel.verboseLogger?.logBinderSignalIconResult( parentView = view, subId = viewModel.subscriptionId, unpackedLevel = mobileDrawable.unpackLevel(), ) } else if (newIcon is SignalIconModel.Satellite) { viewModel.verboseLogger?.logBinderReceivedSignalSatelliteIcon( parentView = view, subId = viewModel.subscriptionId, icon = newIcon, ) IconViewBinder.bind(newIcon.icon, iconView) } Loading packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/ui/binder/MobileIconBinderKairos.kt +19 −6 Original line number Diff line number Diff line Loading @@ -225,15 +225,28 @@ object MobileIconBinderKairos { else -> false } viewModel.verboseLogger?.logBinderReceivedSignalIcon( view, viewModel.subscriptionId, newIcon, ) if (newIcon is SignalIconModel.Cellular) { val packedSignalDrawableState = newIcon.toSignalDrawableState() viewModel.verboseLogger?.logBinderReceivedSignalCellularIcon( parentView = view, subId = viewModel.subscriptionId, icon = newIcon, packedSignalDrawableState = packedSignalDrawableState, shouldRequestLayout = shouldRequestLayout, ) iconView.setImageDrawable(mobileDrawable) mobileDrawable.level = newIcon.toSignalDrawableState() mobileDrawable.level = packedSignalDrawableState viewModel.verboseLogger?.logBinderSignalIconResult( parentView = view, subId = viewModel.subscriptionId, unpackedLevel = mobileDrawable.unpackLevel(), ) } else if (newIcon is SignalIconModel.Satellite) { viewModel.verboseLogger?.logBinderReceivedSignalSatelliteIcon( parentView = view, subId = viewModel.subscriptionId, icon = newIcon, ) IconViewBinder.bind(newIcon.icon, iconView) } if (shouldRequestLayout) { Loading Loading
packages/SettingsLib/src/com/android/settingslib/graph/SignalDrawable.java +9 −0 Original line number Diff line number Diff line Loading @@ -164,6 +164,15 @@ public class SignalDrawable extends DrawableWrapper { return true; } /** * Returns the level used to access the different drawable assets. * * Temporarily visible for logging purposes - b/378919631. */ public int unpackLevel() { return unpackLevel(getLevel()); } private int unpackLevel(int packedState) { int numBins = (packedState & NUM_LEVEL_MASK) >> NUM_LEVEL_SHIFT; int cutOutOffset = 0; Loading
packages/SystemUI/src/com/android/systemui/statusbar/pipeline/dagger/StatusBarPipelineModule.kt +1 −1 Original line number Diff line number Diff line Loading @@ -281,7 +281,7 @@ abstract class StatusBarPipelineModule { @SysUISingleton @VerboseMobileViewLog fun provideVerboseMobileViewLogBuffer(factory: LogBufferFactory): LogBuffer { return factory.create("VerboseMobileViewLog", 100) return factory.create("VerboseMobileViewLog", 200) } @Provides Loading
packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/ui/VerboseMobileViewLogger.kt +50 −7 Original line number Diff line number Diff line Loading @@ -35,9 +35,7 @@ import javax.inject.Inject @SysUISingleton class VerboseMobileViewLogger @Inject constructor( @VerboseMobileViewLog private val buffer: LogBuffer, ) { constructor(@VerboseMobileViewLog private val buffer: LogBuffer) { fun logBinderReceivedVisibility(parentView: View, subId: Int, visibility: Boolean) { buffer.log( TAG, Loading @@ -51,7 +49,53 @@ constructor( ) } fun logBinderReceivedSignalIcon(parentView: View, subId: Int, icon: SignalIconModel) { fun logBinderSignalIconResult(parentView: View, subId: Int, unpackedLevel: Int) { buffer.log( TAG, LogLevel.VERBOSE, { str1 = parentView.getIdForLogging() int1 = subId int2 = unpackedLevel }, { "Binder[subId=$int1, viewId=$str1] SignalDrawable used $int2 for drawable level" }, ) } fun logBinderReceivedSignalCellularIcon( parentView: View, subId: Int, icon: SignalIconModel.Cellular, packedSignalDrawableState: Int, shouldRequestLayout: Boolean, ) { buffer.log( TAG, LogLevel.VERBOSE, { str1 = parentView.getIdForLogging() int1 = subId int2 = icon.level long1 = icon.numberOfLevels.toLong() // See SettingsLib/res/drawable/ic_mobile_level_list.xml for how the // SignalDrawableState level is used for rendering. long2 = packedSignalDrawableState.toLong() bool1 = icon.showExclamationMark bool2 = shouldRequestLayout }, { "Binder[subId=$int1, viewId=$str1] received new signal icon (cellular): " + "level=$int2 numLevels=$long1 showExclamation=$bool1 " + "packedDrawableLevel=$long2 shouldRequestLayout=$bool2" }, ) } fun logBinderReceivedSignalSatelliteIcon( parentView: View, subId: Int, icon: SignalIconModel.Satellite, ) { buffer.log( TAG, LogLevel.VERBOSE, Loading @@ -59,11 +103,10 @@ constructor( str1 = parentView.getIdForLogging() int1 = subId int2 = icon.level bool1 = if (icon is SignalIconModel.Cellular) icon.showExclamationMark else false }, { "Binder[subId=$int1, viewId=$str1] received new signal icon: " + "level=$int2 showExclamation=$bool1" "Binder[subId=$int1, viewId=$str1] received new signal icon (satellite): " + "level=$int2" }, ) } Loading
packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/ui/binder/MobileIconBinder.kt +19 −6 Original line number Diff line number Diff line Loading @@ -149,15 +149,28 @@ object MobileIconBinder { Pair(shouldRequestLayout, newIcon) } .collect { (shouldRequestLayout, newIcon) -> viewModel.verboseLogger?.logBinderReceivedSignalIcon( view, viewModel.subscriptionId, newIcon, ) if (newIcon is SignalIconModel.Cellular) { val packedSignalDrawableState = newIcon.toSignalDrawableState() viewModel.verboseLogger?.logBinderReceivedSignalCellularIcon( parentView = view, subId = viewModel.subscriptionId, icon = newIcon, packedSignalDrawableState = packedSignalDrawableState, shouldRequestLayout = shouldRequestLayout, ) iconView.setImageDrawable(mobileDrawable) mobileDrawable.level = newIcon.toSignalDrawableState() mobileDrawable.level = packedSignalDrawableState viewModel.verboseLogger?.logBinderSignalIconResult( parentView = view, subId = viewModel.subscriptionId, unpackedLevel = mobileDrawable.unpackLevel(), ) } else if (newIcon is SignalIconModel.Satellite) { viewModel.verboseLogger?.logBinderReceivedSignalSatelliteIcon( parentView = view, subId = viewModel.subscriptionId, icon = newIcon, ) IconViewBinder.bind(newIcon.icon, iconView) } Loading
packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/ui/binder/MobileIconBinderKairos.kt +19 −6 Original line number Diff line number Diff line Loading @@ -225,15 +225,28 @@ object MobileIconBinderKairos { else -> false } viewModel.verboseLogger?.logBinderReceivedSignalIcon( view, viewModel.subscriptionId, newIcon, ) if (newIcon is SignalIconModel.Cellular) { val packedSignalDrawableState = newIcon.toSignalDrawableState() viewModel.verboseLogger?.logBinderReceivedSignalCellularIcon( parentView = view, subId = viewModel.subscriptionId, icon = newIcon, packedSignalDrawableState = packedSignalDrawableState, shouldRequestLayout = shouldRequestLayout, ) iconView.setImageDrawable(mobileDrawable) mobileDrawable.level = newIcon.toSignalDrawableState() mobileDrawable.level = packedSignalDrawableState viewModel.verboseLogger?.logBinderSignalIconResult( parentView = view, subId = viewModel.subscriptionId, unpackedLevel = mobileDrawable.unpackLevel(), ) } else if (newIcon is SignalIconModel.Satellite) { viewModel.verboseLogger?.logBinderReceivedSignalSatelliteIcon( parentView = view, subId = viewModel.subscriptionId, icon = newIcon, ) IconViewBinder.bind(newIcon.icon, iconView) } if (shouldRequestLayout) { Loading