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

Commit fcbb8081 authored by Caitlin Shkuratov's avatar Caitlin Shkuratov
Browse files

[Pod] Move AirplaneTableLog to a pod.

This CL also includes some changes to the pods defaults so that
@Provides methods in Dagger are correctly compiled for
SystemUI-application.

Bug: 307607958
Flag: EXEMPT refactor
Test: dump AirplaneTableLog -> verify it still has logs
Change-Id: Id82901d7f43e341762c2f55eb20a6ed6c74e5a6d
parent 945b3ff7
Loading
Loading
Loading
Loading
+7 −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__"],
@@ -68,6 +73,7 @@ java_library {
        "com.android.systemui.retail-impl",
        "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",
@@ -82,6 +88,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__"],
+1 −1
Original line number Diff line number Diff line
@@ -22,4 +22,4 @@ import javax.inject.Qualifier
@Qualifier
@MustBeDocumented
@Retention(AnnotationRetention.RUNTIME)
annotation class AirplaneTableLog
public annotation class AirplaneTableLog
+45 −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.statusbar.pipeline.airplane.shared-api",
    srcs: [
        "*.kt",
    ],
    defaults: [
        "SystemUI_pod_defaults_api",
    ],
}

java_library {
    name: "com.android.systemui.statusbar.pipeline.airplane.shared-impl",
    srcs: [
        "impl/*.kt",
    ],
    libs: [
        "com.android.systemui.dagger-api",
        "dagger2",
        "com.android.systemui.log.table-api",
        "com.android.systemui.statusbar.pipeline.airplane.shared-api",
    ],
    defaults: [
        "SystemUI_pod_defaults_impl",
    ],
}
+36 −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 com.android.systemui.statusbar.pipeline.airplane.shared.impl

import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.log.table.TableLogBuffer
import com.android.systemui.log.table.TableLogBufferFactory
import com.android.systemui.statusbar.pipeline.airplane.shared.AirplaneTableLog
import dagger.Module
import dagger.Provides

@Module
public interface AirplaneModeSharedModule {
    public companion object {
        @Provides
        @SysUISingleton
        @AirplaneTableLog
        public fun provideAirplaneTableLogBuffer(factory: TableLogBufferFactory): TableLogBuffer {
            return factory.create("AirplaneTableLog", 30)
        }
    }
}
+2 −0
Original line number Diff line number Diff line
@@ -153,6 +153,7 @@ import com.android.systemui.statusbar.notification.row.dagger.NotificationRowCom
import com.android.systemui.statusbar.phone.CentralSurfaces;
import com.android.systemui.statusbar.phone.ConfigurationControllerModule;
import com.android.systemui.statusbar.phone.LetterboxModule;
import com.android.systemui.statusbar.pipeline.airplane.shared.impl.AirplaneModeSharedModule;
import com.android.systemui.statusbar.pipeline.dagger.StatusBarPipelineModule;
import com.android.systemui.statusbar.policy.DeviceStateRotationLockSettingController;
import com.android.systemui.statusbar.policy.KeyguardStateController;
@@ -218,6 +219,7 @@ import javax.inject.Named;
        AmbientModule.class,
        AvControlsChipModule.class,
        AppOpsModule.class,
        AirplaneModeSharedModule.class,
        AssistModule.class,
        AuthenticationModule.class,
        BiometricsModule.class,
Loading