Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1933f823 authored by Caitlin Shkuratov's avatar Caitlin Shkuratov Committed by Android (Google) Code Review
Browse files

Merge changes from topic "caitlinshk-airplanetablelog-pod" into main

* changes:
  [Pod] Move AirplaneTableLog to a pod.
  [Pod] Move LogProxy interface to pod.
parents c787bd61 fcbb8081
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ package com.android.systemui.log.table
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
import com.android.systemui.SysuiTestCase
import com.android.systemui.log.FakeLogProxy
import com.android.systemui.log.LogcatEchoTrackerAlways
import com.android.systemui.log.table.TableChange.Companion.IS_INITIAL_PREFIX
import com.android.systemui.util.time.FakeSystemClock
@@ -51,7 +52,13 @@ class LogDiffsForTableTest : SysuiTestCase() {
    fun setUp() {
        systemClock = FakeSystemClock()
        tableLogBuffer =
            TableLogBufferImpl(MAX_SIZE, BUFFER_NAME, systemClock, LogcatEchoTrackerAlways())
            TableLogBufferImpl(
                MAX_SIZE,
                BUFFER_NAME,
                systemClock,
                LogcatEchoTrackerAlways(),
                localLogcat = FakeLogProxy(),
            )
    }

    // ---- Flow<Boolean> tests ----
+1 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ package com.android.systemui.log.table
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
import com.android.systemui.SysuiTestCase
import com.android.systemui.log.FakeLogProxy
import com.android.systemui.log.LogcatEchoTracker
import com.android.systemui.log.core.LogLevel
import com.android.systemui.log.table.TableChange.Companion.IS_INITIAL_PREFIX
+7 −1
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
import com.android.systemui.SysuiTestCase
import com.android.systemui.dump.DumpManager
import com.android.systemui.log.FakeLogProxy
import com.android.systemui.log.LogcatEchoTrackerAlways
import com.android.systemui.util.time.FakeSystemClock
import com.google.common.truth.Truth.assertThat
@@ -33,7 +34,12 @@ class TableLogBufferFactoryImplTest : SysuiTestCase() {
    private val dumpManager: DumpManager = mock()
    private val systemClock = FakeSystemClock()
    private val underTest =
        TableLogBufferFactoryImpl(dumpManager, systemClock, LogcatEchoTrackerAlways())
        TableLogBufferFactoryImpl(
            dumpManager,
            systemClock,
            LogcatEchoTrackerAlways(),
            logProxy = FakeLogProxy(),
        )

    @Test
    fun create_alwaysCreatesNewInstance() {
+8 −0
Original line number Diff line number Diff line
@@ -41,6 +41,7 @@ java_defaults {
java_defaults {
    name: "SystemUI_pod_defaults_impl",
    libs: [
        "dagger2",
        "jsr330",
    ],
    lint: {
@@ -51,6 +52,10 @@ java_defaults {
        "-Xexplicit-api=strict",
        "-Xjvm-default=all",
    ],
    plugins: [
        // Needed so that @Provides methods in Dagger are correctly generated.
        "dagger2-compiler",
    ],
    // TODO(b/423659894): Once SysUI stands up its Dagger graph in its own build target, this
    // visibility should be updated to just that build target.
    visibility: ["//frameworks/base/packages/SystemUI:__subpackages__"],
@@ -63,9 +68,11 @@ java_library {
    name: "com.android.systemui.pods-api-aosp-handheld",
    static_libs: [
        "com.android.systemui.dagger-api",
        "com.android.systemui.log-api",
        "com.android.systemui.log.table-api",
        "com.android.systemui.retail.data-api",
        "com.android.systemui.retail.domain-api",
        "com.android.systemui.statusbar.pipeline.airplane.shared-api",
        "com.android.systemui.util.kotlin",
        "com.android.systemui.util.settings-api",
        "com.android.systemui.util.time-api",
@@ -80,6 +87,7 @@ java_library {
    static_libs: [
        "com.android.systemui.pods-api-aosp-handheld",
        "com.android.systemui.retail-impl",
        "com.android.systemui.statusbar.pipeline.airplane.shared-impl",
        "com.android.systemui.util.time-impl",
    ],
    visibility: ["//frameworks/base/packages/SystemUI:__pkg__"],
+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-api",
    srcs: [
        "*.kt",
    ],
    defaults: [
        "SystemUI_pod_defaults_api",
    ],
}
Loading