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

class (to be filled in with many future CLs).

Test: manual (compiles)
Bug: 238425913
Change-Id: I2f1bcc8e1c1f60299f5d7a0f647b56413a3412e0
This commit is contained in:
Caitlin Cassidy
2022-07-21 16:12:30 +00:00
parent 13f6aed5d6
commit b45c168b46
5 changed files with 81 additions and 2 deletions

View File

@@ -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.sender.MediaTttChipControllerSender;
import com.android.systemui.people.PeopleProvider;
import com.android.systemui.statusbar.pipeline.ConnectivityInfoProcessor;
import com.android.systemui.statusbar.policy.ConfigurationController;
import com.android.systemui.unfold.FoldStateLogger;
import com.android.systemui.unfold.FoldStateLoggingProvider;
@@ -134,6 +135,7 @@ public interface SysUIComponent {
getMediaTttCommandLineHelper();
getMediaMuteAwaitConnectionCli();
getNearbyMediaDevicesManager();
getConnectivityInfoProcessor();
getUnfoldLatencyTracker().init();
getFoldStateLoggingProvider().ifPresent(FoldStateLoggingProvider::init);
getFoldStateLogger().ifPresent(FoldStateLogger::init);
@@ -216,6 +218,9 @@ public interface SysUIComponent {
/** */
Optional<NearbyMediaDevicesManager> getNearbyMediaDevicesManager();
/** */
Optional<ConnectivityInfoProcessor> getConnectivityInfoProcessor();
/**
* Returns {@link CoreStartable}s that should be started with the application.
*/

View File

@@ -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.ShadeController;
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.KeyguardStateController;
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.wm.shell.bubbles.Bubbles;
import com.android.wm.shell.dagger.DynamicOverride;
import com.android.wm.shell.sysui.ShellController;
import java.util.Optional;
import java.util.concurrent.Executor;
@@ -135,6 +134,7 @@ import dagger.Provides;
SettingsUtilModule.class,
SmartRepliesInflationModule.class,
SmartspaceModule.class,
StatusBarPipelineModule.class,
StatusBarPolicyModule.class,
StatusBarWindowModule.class,
SysUIConcurrencyModule.class,

View File

@@ -145,6 +145,8 @@ public class Flags {
public static final BooleanFlag STATUS_BAR_LETTERBOX_APPEARANCE =
new BooleanFlag(603, false);
public static final BooleanFlag NEW_STATUS_BAR_PIPELINE = new BooleanFlag(604, false);
/***************************************/
// 700 - dialer/calls
public static final BooleanFlag ONGOING_CALL_STATUS_BAR_CHIP =

View File

@@ -0,0 +1,30 @@
/*
* 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()

View File

@@ -0,0 +1,42 @@
/*
* 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()
}
}
}