Loading packages/SystemUI/pods/Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -62,6 +62,7 @@ java_library { name: "com.android.systemui.pods-aosp-handheld", static_libs: [ "com.android.systemui.dagger-api", "com.android.systemui.log.table-api", "com.android.systemui.retail-impl", "com.android.systemui.util.kotlin", "com.android.systemui.util.settings-api", Loading packages/SystemUI/pods/com/android/systemui/log/table/Android.bp 0 → 100644 +29 −0 Original line number Diff line number Diff line // // Copyright (C) 2025 The Android Open Source Project // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // package { default_applicable_licenses: ["frameworks_base_packages_SystemUI_license"], } java_library { name: "com.android.systemui.log.table-api", srcs: [ "*.kt", ], defaults: [ "SystemUI_pod_defaults_api", ], } packages/SystemUI/pods/com/android/systemui/log/table/Diffable.kt 0 → 100644 +53 −0 Original line number Diff line number Diff line /* * Copyright (C) 2022 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.systemui.log.table /** * An interface that enables logging the difference between values in table format. * * Many objects that we want to log are data-y objects with a collection of fields. When logging * these objects, we want to log each field separately. This allows ABT (Android Bug Tool) to easily * highlight changes in individual fields. * * See [TableLogBuffer]. */ public interface Diffable<T> { /** * Finds the differences between [prevVal] and this object and logs those diffs to [row]. * * Each implementer should determine which individual fields have changed between [prevVal] and * this object, and only log the fields that have actually changed. This helps save buffer * space. * * For example, if: * - prevVal = Object(val1=100, val2=200, val3=300) * - this = Object(val1=100, val2=200, val3=333) * * Then only the val3 change should be logged. */ public fun logDiffs(prevVal: T, row: TableRowLogger) /** * Logs all the relevant fields of this object to [row]. * * As opposed to [logDiffs], this method should log *all* fields. * * Implementation is optional. This method will only be used with [logDiffsForTable] in order to * fully log the initial value of the flow. */ public fun logFull(row: TableRowLogger) {} } packages/SystemUI/src/com/android/systemui/log/table/TableRowLogger.kt→packages/SystemUI/pods/com/android/systemui/log/table/TableRowLogger.kt +4 −4 Original line number Diff line number Diff line Loading @@ -23,13 +23,13 @@ package com.android.systemui.log.table * to individual fields using the [logChange] methods. All logged changes will be associated with * the same timestamp. */ interface TableRowLogger { public interface TableRowLogger { /** Logs a change to a string value. */ fun logChange(columnName: String, value: String?) public fun logChange(columnName: String, value: String?) /** Logs a change to a boolean value. */ fun logChange(columnName: String, value: Boolean) public fun logChange(columnName: String, value: Boolean) /** Logs a change to an int value. */ fun logChange(columnName: String, value: Int) public fun logChange(columnName: String, value: Int) } packages/SystemUI/src/com/android/systemui/log/table/Diffable.kt→packages/SystemUI/src/com/android/systemui/log/table/DiffableExtensions.kt +0 −36 Original line number Diff line number Diff line Loading @@ -25,42 +25,6 @@ import com.android.systemui.kairos.util.NameTag import com.android.systemui.util.kotlin.pairwiseBy import kotlinx.coroutines.flow.Flow /** * An interface that enables logging the difference between values in table format. * * Many objects that we want to log are data-y objects with a collection of fields. When logging * these objects, we want to log each field separately. This allows ABT (Android Bug Tool) to easily * highlight changes in individual fields. * * See [TableLogBuffer]. */ interface Diffable<T> { /** * Finds the differences between [prevVal] and this object and logs those diffs to [row]. * * Each implementer should determine which individual fields have changed between [prevVal] and * this object, and only log the fields that have actually changed. This helps save buffer * space. * * For example, if: * - prevVal = Object(val1=100, val2=200, val3=300) * - this = Object(val1=100, val2=200, val3=333) * * Then only the val3 change should be logged. */ fun logDiffs(prevVal: T, row: TableRowLogger) /** * Logs all the relevant fields of this object to [row]. * * As opposed to [logDiffs], this method should log *all* fields. * * Implementation is optional. This method will only be used with [logDiffsForTable] in order to * fully log the initial value of the flow. */ fun logFull(row: TableRowLogger) {} } /** * Each time the flow is updated with a new value, logs the differences between the previous value * and the new value to the given [tableLogBuffer]. Loading Loading
packages/SystemUI/pods/Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -62,6 +62,7 @@ java_library { name: "com.android.systemui.pods-aosp-handheld", static_libs: [ "com.android.systemui.dagger-api", "com.android.systemui.log.table-api", "com.android.systemui.retail-impl", "com.android.systemui.util.kotlin", "com.android.systemui.util.settings-api", Loading
packages/SystemUI/pods/com/android/systemui/log/table/Android.bp 0 → 100644 +29 −0 Original line number Diff line number Diff line // // Copyright (C) 2025 The Android Open Source Project // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // package { default_applicable_licenses: ["frameworks_base_packages_SystemUI_license"], } java_library { name: "com.android.systemui.log.table-api", srcs: [ "*.kt", ], defaults: [ "SystemUI_pod_defaults_api", ], }
packages/SystemUI/pods/com/android/systemui/log/table/Diffable.kt 0 → 100644 +53 −0 Original line number Diff line number Diff line /* * Copyright (C) 2022 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.systemui.log.table /** * An interface that enables logging the difference between values in table format. * * Many objects that we want to log are data-y objects with a collection of fields. When logging * these objects, we want to log each field separately. This allows ABT (Android Bug Tool) to easily * highlight changes in individual fields. * * See [TableLogBuffer]. */ public interface Diffable<T> { /** * Finds the differences between [prevVal] and this object and logs those diffs to [row]. * * Each implementer should determine which individual fields have changed between [prevVal] and * this object, and only log the fields that have actually changed. This helps save buffer * space. * * For example, if: * - prevVal = Object(val1=100, val2=200, val3=300) * - this = Object(val1=100, val2=200, val3=333) * * Then only the val3 change should be logged. */ public fun logDiffs(prevVal: T, row: TableRowLogger) /** * Logs all the relevant fields of this object to [row]. * * As opposed to [logDiffs], this method should log *all* fields. * * Implementation is optional. This method will only be used with [logDiffsForTable] in order to * fully log the initial value of the flow. */ public fun logFull(row: TableRowLogger) {} }
packages/SystemUI/src/com/android/systemui/log/table/TableRowLogger.kt→packages/SystemUI/pods/com/android/systemui/log/table/TableRowLogger.kt +4 −4 Original line number Diff line number Diff line Loading @@ -23,13 +23,13 @@ package com.android.systemui.log.table * to individual fields using the [logChange] methods. All logged changes will be associated with * the same timestamp. */ interface TableRowLogger { public interface TableRowLogger { /** Logs a change to a string value. */ fun logChange(columnName: String, value: String?) public fun logChange(columnName: String, value: String?) /** Logs a change to a boolean value. */ fun logChange(columnName: String, value: Boolean) public fun logChange(columnName: String, value: Boolean) /** Logs a change to an int value. */ fun logChange(columnName: String, value: Int) public fun logChange(columnName: String, value: Int) }
packages/SystemUI/src/com/android/systemui/log/table/Diffable.kt→packages/SystemUI/src/com/android/systemui/log/table/DiffableExtensions.kt +0 −36 Original line number Diff line number Diff line Loading @@ -25,42 +25,6 @@ import com.android.systemui.kairos.util.NameTag import com.android.systemui.util.kotlin.pairwiseBy import kotlinx.coroutines.flow.Flow /** * An interface that enables logging the difference between values in table format. * * Many objects that we want to log are data-y objects with a collection of fields. When logging * these objects, we want to log each field separately. This allows ABT (Android Bug Tool) to easily * highlight changes in individual fields. * * See [TableLogBuffer]. */ interface Diffable<T> { /** * Finds the differences between [prevVal] and this object and logs those diffs to [row]. * * Each implementer should determine which individual fields have changed between [prevVal] and * this object, and only log the fields that have actually changed. This helps save buffer * space. * * For example, if: * - prevVal = Object(val1=100, val2=200, val3=300) * - this = Object(val1=100, val2=200, val3=333) * * Then only the val3 change should be logged. */ fun logDiffs(prevVal: T, row: TableRowLogger) /** * Logs all the relevant fields of this object to [row]. * * As opposed to [logDiffs], this method should log *all* fields. * * Implementation is optional. This method will only be used with [logDiffsForTable] in order to * fully log the initial value of the flow. */ fun logFull(row: TableRowLogger) {} } /** * Each time the flow is updated with a new value, logs the differences between the previous value * and the new value to the given [tableLogBuffer]. Loading