Loading packages/SystemUI/plugin/src/com/android/systemui/plugins/log/TableLogBufferBase.kt +6 −6 Original line number Diff line number Diff line Loading @@ -25,34 +25,34 @@ interface TableLogBufferBase { * * For Java overloading. */ fun logChange(prefix: String, columnName: String, value: String?) { fun logChange(prefix: String = "", columnName: String, value: String?) { logChange(prefix, columnName, value, isInitial = false) } /** Logs a String? change. */ fun logChange(prefix: String, columnName: String, value: String?, isInitial: Boolean) fun logChange(prefix: String = "", columnName: String, value: String?, isInitial: Boolean) /** * Logs a Boolean change. * * For Java overloading. */ fun logChange(prefix: String, columnName: String, value: Boolean) { fun logChange(prefix: String = "", columnName: String, value: Boolean) { logChange(prefix, columnName, value, isInitial = false) } /** Logs a Boolean change. */ fun logChange(prefix: String, columnName: String, value: Boolean, isInitial: Boolean) fun logChange(prefix: String = "", columnName: String, value: Boolean, isInitial: Boolean) /** * Logs an Int? change. * * For Java overloading. */ fun logChange(prefix: String, columnName: String, value: Int?) { fun logChange(prefix: String = "", columnName: String, value: Int?) { logChange(prefix, columnName, value, isInitial = false) } /** Logs an Int? change. */ fun logChange(prefix: String, columnName: String, value: Int?, isInitial: Boolean) fun logChange(prefix: String = "", columnName: String, value: Int?, isInitial: Boolean) } packages/SystemUI/src/com/android/systemui/log/table/Diffable.kt +6 −6 Original line number Diff line number Diff line Loading @@ -65,7 +65,7 @@ interface Diffable<T> { */ fun <T : Diffable<T>> Flow<T>.logDiffsForTable( tableLogBuffer: TableLogBuffer, columnPrefix: String, columnPrefix: String = "", initialValue: T, ): Flow<T> { // Fully log the initial value to the table. Loading @@ -87,7 +87,7 @@ fun <T : Diffable<T>> Flow<T>.logDiffsForTable( /** See [logDiffsForTable(TableLogBuffer, String, T)]. */ fun Flow<Boolean>.logDiffsForTable( tableLogBuffer: TableLogBuffer, columnPrefix: String, columnPrefix: String = "", columnName: String, initialValue: Boolean, ): Flow<Boolean> { Loading @@ -106,7 +106,7 @@ fun Flow<Boolean>.logDiffsForTable( /** See [logDiffsForTable(TableLogBuffer, String, T)]. */ fun Flow<Int>.logDiffsForTable( tableLogBuffer: TableLogBuffer, columnPrefix: String, columnPrefix: String = "", columnName: String, initialValue: Int, ): Flow<Int> { Loading @@ -125,7 +125,7 @@ fun Flow<Int>.logDiffsForTable( /** See [logDiffsForTable(TableLogBuffer, String, T)]. */ fun Flow<Int?>.logDiffsForTable( tableLogBuffer: TableLogBuffer, columnPrefix: String, columnPrefix: String = "", columnName: String, initialValue: Int?, ): Flow<Int?> { Loading @@ -144,7 +144,7 @@ fun Flow<Int?>.logDiffsForTable( /** See [logDiffsForTable(TableLogBuffer, String, T)]. */ fun Flow<String?>.logDiffsForTable( tableLogBuffer: TableLogBuffer, columnPrefix: String, columnPrefix: String = "", columnName: String, initialValue: String?, ): Flow<String?> { Loading @@ -163,7 +163,7 @@ fun Flow<String?>.logDiffsForTable( /** See [logDiffsForTable(TableLogBuffer, String, T)]. */ fun <T> Flow<List<T>>.logDiffsForTable( tableLogBuffer: TableLogBuffer, columnPrefix: String, columnPrefix: String = "", columnName: String, initialValue: List<T>, ): Flow<List<T>> { Loading packages/SystemUI/src/com/android/systemui/log/table/TableLogBuffer.kt +4 −3 Original line number Diff line number Diff line Loading @@ -124,7 +124,7 @@ class TableLogBuffer( * the separator token for parsing, so it can't be present in any part of the column name. */ @Synchronized fun <T : Diffable<T>> logDiffs(columnPrefix: String, prevVal: T, newVal: T) { fun <T : Diffable<T>> logDiffs(columnPrefix: String = "", prevVal: T, newVal: T) { val row = tempRow row.timestamp = systemClock.currentTimeMillis() row.columnPrefix = columnPrefix Loading @@ -136,6 +136,7 @@ class TableLogBuffer( /** * Logs change(s) to the buffer using [rowInitializer]. * * @param columnPrefix see [logDiffs]. * @param rowInitializer a function that will be called immediately to store relevant data on * the row. * @param isInitial true if this change represents the starting value for a particular column Loading @@ -145,9 +146,9 @@ class TableLogBuffer( */ @Synchronized fun logChange( columnPrefix: String, columnPrefix: String = "", isInitial: Boolean = false, rowInitializer: (TableRowLogger) -> Unit rowInitializer: (TableRowLogger) -> Unit, ) { val row = tempRow row.timestamp = systemClock.currentTimeMillis() Loading packages/SystemUI/src/com/android/systemui/statusbar/pipeline/airplane/data/repository/AirplaneModeRepository.kt +1 −6 Original line number Diff line number Diff line Loading @@ -81,12 +81,7 @@ constructor( awaitClose { observer.isListening = false } } .distinctUntilChanged() .logDiffsForTable( logger, columnPrefix = "", columnName = "isAirplaneMode", initialValue = false, ) .logDiffsForTable(logger, columnName = "isAirplaneMode", initialValue = false) .stateIn( scope, started = SharingStarted.WhileSubscribed(), Loading packages/SystemUI/src/com/android/systemui/statusbar/pipeline/airplane/ui/viewmodel/AirplaneModeViewModel.kt +0 −1 Original line number Diff line number Diff line Loading @@ -59,7 +59,6 @@ constructor( .distinctUntilChanged() .logDiffsForTable( logger, columnPrefix = "", columnName = "isAirplaneModeIconVisible", initialValue = false, ) Loading Loading
packages/SystemUI/plugin/src/com/android/systemui/plugins/log/TableLogBufferBase.kt +6 −6 Original line number Diff line number Diff line Loading @@ -25,34 +25,34 @@ interface TableLogBufferBase { * * For Java overloading. */ fun logChange(prefix: String, columnName: String, value: String?) { fun logChange(prefix: String = "", columnName: String, value: String?) { logChange(prefix, columnName, value, isInitial = false) } /** Logs a String? change. */ fun logChange(prefix: String, columnName: String, value: String?, isInitial: Boolean) fun logChange(prefix: String = "", columnName: String, value: String?, isInitial: Boolean) /** * Logs a Boolean change. * * For Java overloading. */ fun logChange(prefix: String, columnName: String, value: Boolean) { fun logChange(prefix: String = "", columnName: String, value: Boolean) { logChange(prefix, columnName, value, isInitial = false) } /** Logs a Boolean change. */ fun logChange(prefix: String, columnName: String, value: Boolean, isInitial: Boolean) fun logChange(prefix: String = "", columnName: String, value: Boolean, isInitial: Boolean) /** * Logs an Int? change. * * For Java overloading. */ fun logChange(prefix: String, columnName: String, value: Int?) { fun logChange(prefix: String = "", columnName: String, value: Int?) { logChange(prefix, columnName, value, isInitial = false) } /** Logs an Int? change. */ fun logChange(prefix: String, columnName: String, value: Int?, isInitial: Boolean) fun logChange(prefix: String = "", columnName: String, value: Int?, isInitial: Boolean) }
packages/SystemUI/src/com/android/systemui/log/table/Diffable.kt +6 −6 Original line number Diff line number Diff line Loading @@ -65,7 +65,7 @@ interface Diffable<T> { */ fun <T : Diffable<T>> Flow<T>.logDiffsForTable( tableLogBuffer: TableLogBuffer, columnPrefix: String, columnPrefix: String = "", initialValue: T, ): Flow<T> { // Fully log the initial value to the table. Loading @@ -87,7 +87,7 @@ fun <T : Diffable<T>> Flow<T>.logDiffsForTable( /** See [logDiffsForTable(TableLogBuffer, String, T)]. */ fun Flow<Boolean>.logDiffsForTable( tableLogBuffer: TableLogBuffer, columnPrefix: String, columnPrefix: String = "", columnName: String, initialValue: Boolean, ): Flow<Boolean> { Loading @@ -106,7 +106,7 @@ fun Flow<Boolean>.logDiffsForTable( /** See [logDiffsForTable(TableLogBuffer, String, T)]. */ fun Flow<Int>.logDiffsForTable( tableLogBuffer: TableLogBuffer, columnPrefix: String, columnPrefix: String = "", columnName: String, initialValue: Int, ): Flow<Int> { Loading @@ -125,7 +125,7 @@ fun Flow<Int>.logDiffsForTable( /** See [logDiffsForTable(TableLogBuffer, String, T)]. */ fun Flow<Int?>.logDiffsForTable( tableLogBuffer: TableLogBuffer, columnPrefix: String, columnPrefix: String = "", columnName: String, initialValue: Int?, ): Flow<Int?> { Loading @@ -144,7 +144,7 @@ fun Flow<Int?>.logDiffsForTable( /** See [logDiffsForTable(TableLogBuffer, String, T)]. */ fun Flow<String?>.logDiffsForTable( tableLogBuffer: TableLogBuffer, columnPrefix: String, columnPrefix: String = "", columnName: String, initialValue: String?, ): Flow<String?> { Loading @@ -163,7 +163,7 @@ fun Flow<String?>.logDiffsForTable( /** See [logDiffsForTable(TableLogBuffer, String, T)]. */ fun <T> Flow<List<T>>.logDiffsForTable( tableLogBuffer: TableLogBuffer, columnPrefix: String, columnPrefix: String = "", columnName: String, initialValue: List<T>, ): Flow<List<T>> { Loading
packages/SystemUI/src/com/android/systemui/log/table/TableLogBuffer.kt +4 −3 Original line number Diff line number Diff line Loading @@ -124,7 +124,7 @@ class TableLogBuffer( * the separator token for parsing, so it can't be present in any part of the column name. */ @Synchronized fun <T : Diffable<T>> logDiffs(columnPrefix: String, prevVal: T, newVal: T) { fun <T : Diffable<T>> logDiffs(columnPrefix: String = "", prevVal: T, newVal: T) { val row = tempRow row.timestamp = systemClock.currentTimeMillis() row.columnPrefix = columnPrefix Loading @@ -136,6 +136,7 @@ class TableLogBuffer( /** * Logs change(s) to the buffer using [rowInitializer]. * * @param columnPrefix see [logDiffs]. * @param rowInitializer a function that will be called immediately to store relevant data on * the row. * @param isInitial true if this change represents the starting value for a particular column Loading @@ -145,9 +146,9 @@ class TableLogBuffer( */ @Synchronized fun logChange( columnPrefix: String, columnPrefix: String = "", isInitial: Boolean = false, rowInitializer: (TableRowLogger) -> Unit rowInitializer: (TableRowLogger) -> Unit, ) { val row = tempRow row.timestamp = systemClock.currentTimeMillis() Loading
packages/SystemUI/src/com/android/systemui/statusbar/pipeline/airplane/data/repository/AirplaneModeRepository.kt +1 −6 Original line number Diff line number Diff line Loading @@ -81,12 +81,7 @@ constructor( awaitClose { observer.isListening = false } } .distinctUntilChanged() .logDiffsForTable( logger, columnPrefix = "", columnName = "isAirplaneMode", initialValue = false, ) .logDiffsForTable(logger, columnName = "isAirplaneMode", initialValue = false) .stateIn( scope, started = SharingStarted.WhileSubscribed(), Loading
packages/SystemUI/src/com/android/systemui/statusbar/pipeline/airplane/ui/viewmodel/AirplaneModeViewModel.kt +0 −1 Original line number Diff line number Diff line Loading @@ -59,7 +59,6 @@ constructor( .distinctUntilChanged() .logDiffsForTable( logger, columnPrefix = "", columnName = "isAirplaneModeIconVisible", initialValue = false, ) Loading