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

Commit ff63d59a authored by Caitlin Cassidy's avatar Caitlin Cassidy Committed by Android (Google) Code Review
Browse files

Merge "[SB Refactor] Add a flag for the new pipeline and an empty processor...

Merge "[SB Refactor] Add a flag for the new pipeline and an empty processor class (to be filled in with many future CLs)." into tm-qpr-dev
parents 7fdf1045 b45c168b
Loading
Loading
Loading
Loading
+5 −0
Original line number Original line Diff line number Diff line
@@ -31,6 +31,7 @@ import com.android.systemui.media.taptotransfer.MediaTttCommandLineHelper;
import com.android.systemui.media.taptotransfer.receiver.MediaTttChipControllerReceiver;
import com.android.systemui.media.taptotransfer.receiver.MediaTttChipControllerReceiver;
import com.android.systemui.media.taptotransfer.sender.MediaTttChipControllerSender;
import com.android.systemui.media.taptotransfer.sender.MediaTttChipControllerSender;
import com.android.systemui.people.PeopleProvider;
import com.android.systemui.people.PeopleProvider;
import com.android.systemui.statusbar.pipeline.ConnectivityInfoProcessor;
import com.android.systemui.statusbar.policy.ConfigurationController;
import com.android.systemui.statusbar.policy.ConfigurationController;
import com.android.systemui.unfold.FoldStateLogger;
import com.android.systemui.unfold.FoldStateLogger;
import com.android.systemui.unfold.FoldStateLoggingProvider;
import com.android.systemui.unfold.FoldStateLoggingProvider;
@@ -130,6 +131,7 @@ public interface SysUIComponent {
        getMediaTttCommandLineHelper();
        getMediaTttCommandLineHelper();
        getMediaMuteAwaitConnectionCli();
        getMediaMuteAwaitConnectionCli();
        getNearbyMediaDevicesManager();
        getNearbyMediaDevicesManager();
        getConnectivityInfoProcessor();
        getUnfoldLatencyTracker().init();
        getUnfoldLatencyTracker().init();
        getFoldStateLoggingProvider().ifPresent(FoldStateLoggingProvider::init);
        getFoldStateLoggingProvider().ifPresent(FoldStateLoggingProvider::init);
        getFoldStateLogger().ifPresent(FoldStateLogger::init);
        getFoldStateLogger().ifPresent(FoldStateLogger::init);
@@ -212,6 +214,9 @@ public interface SysUIComponent {
    /** */
    /** */
    Optional<NearbyMediaDevicesManager> getNearbyMediaDevicesManager();
    Optional<NearbyMediaDevicesManager> getNearbyMediaDevicesManager();


    /** */
    Optional<ConnectivityInfoProcessor> getConnectivityInfoProcessor();

    /**
    /**
     * Returns {@link CoreStartable}s that should be started with the application.
     * Returns {@link CoreStartable}s that should be started with the application.
     */
     */
+2 −2
Original line number Original line Diff line number Diff line
@@ -70,7 +70,7 @@ import com.android.systemui.statusbar.notification.row.dagger.NotificationShelfC
import com.android.systemui.statusbar.phone.CentralSurfaces;
import com.android.systemui.statusbar.phone.CentralSurfaces;
import com.android.systemui.statusbar.phone.ShadeController;
import com.android.systemui.statusbar.phone.ShadeController;
import com.android.systemui.statusbar.phone.dagger.CentralSurfacesComponent;
import com.android.systemui.statusbar.phone.dagger.CentralSurfacesComponent;
import com.android.systemui.statusbar.policy.ConfigurationController;
import com.android.systemui.statusbar.pipeline.dagger.StatusBarPipelineModule;
import com.android.systemui.statusbar.policy.HeadsUpManager;
import com.android.systemui.statusbar.policy.HeadsUpManager;
import com.android.systemui.statusbar.policy.KeyguardStateController;
import com.android.systemui.statusbar.policy.KeyguardStateController;
import com.android.systemui.statusbar.policy.ZenModeController;
import com.android.systemui.statusbar.policy.ZenModeController;
@@ -91,7 +91,6 @@ import com.android.systemui.wallet.dagger.WalletModule;
import com.android.systemui.wmshell.BubblesManager;
import com.android.systemui.wmshell.BubblesManager;
import com.android.wm.shell.bubbles.Bubbles;
import com.android.wm.shell.bubbles.Bubbles;
import com.android.wm.shell.dagger.DynamicOverride;
import com.android.wm.shell.dagger.DynamicOverride;
import com.android.wm.shell.sysui.ShellController;


import java.util.Optional;
import java.util.Optional;
import java.util.concurrent.Executor;
import java.util.concurrent.Executor;
@@ -135,6 +134,7 @@ import dagger.Provides;
            SettingsUtilModule.class,
            SettingsUtilModule.class,
            SmartRepliesInflationModule.class,
            SmartRepliesInflationModule.class,
            SmartspaceModule.class,
            SmartspaceModule.class,
            StatusBarPipelineModule.class,
            StatusBarPolicyModule.class,
            StatusBarPolicyModule.class,
            StatusBarWindowModule.class,
            StatusBarWindowModule.class,
            SysUIConcurrencyModule.class,
            SysUIConcurrencyModule.class,
+2 −0
Original line number Original line Diff line number Diff line
@@ -148,6 +148,8 @@ public class Flags {
    public static final BooleanFlag STATUS_BAR_LETTERBOX_APPEARANCE =
    public static final BooleanFlag STATUS_BAR_LETTERBOX_APPEARANCE =
            new BooleanFlag(603, false);
            new BooleanFlag(603, false);


    public static final BooleanFlag NEW_STATUS_BAR_PIPELINE = new BooleanFlag(604, false);

    /***************************************/
    /***************************************/
    // 700 - dialer/calls
    // 700 - dialer/calls
    public static final BooleanFlag ONGOING_CALL_STATUS_BAR_CHIP =
    public static final BooleanFlag ONGOING_CALL_STATUS_BAR_CHIP =
+30 −0
Original line number Original line 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.statusbar.pipeline

import com.android.systemui.dagger.SysUISingleton
import javax.inject.Inject

/**
 * A processor that transforms raw connectivity information that we get from callbacks and turns it
 * into a list of displayable connectivity information.
 *
 * This will be used for the new status bar pipeline to calculate the list of icons that should be
 * displayed in the RHS of the status bar.
 */
@SysUISingleton
class ConnectivityInfoProcessor @Inject constructor()
+42 −0
Original line number Original line 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.statusbar.pipeline.dagger

import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.flags.FeatureFlags
import com.android.systemui.flags.Flags
import com.android.systemui.statusbar.pipeline.ConnectivityInfoProcessor
import dagger.Lazy
import dagger.Module
import dagger.Provides
import java.util.Optional

@Module
class StatusBarPipelineModule {
    @Provides
    @SysUISingleton
    fun provideConnectivityInfoProcessor(
            featureFlags: FeatureFlags,
            processorLazy: Lazy<ConnectivityInfoProcessor>
    ): Optional<ConnectivityInfoProcessor> {
        return if (featureFlags.isEnabled(Flags.NEW_STATUS_BAR_PIPELINE)) {
            Optional.of(processorLazy.get())
        } else {
            Optional.empty()
        }
    }
}