Loading packages/SystemUI/src/com/android/systemui/dagger/SystemUIDefaultModule.java +0 −13 Original line number Diff line number Diff line Loading @@ -24,7 +24,6 @@ import android.content.Context; import androidx.annotation.Nullable; import com.android.keyguard.KeyguardViewController; import com.android.systemui.broadcast.BroadcastDispatcher; import com.android.systemui.dock.DockManager; import com.android.systemui.dock.DockManagerImpl; import com.android.systemui.plugins.qs.QSFactory; Loading @@ -34,7 +33,6 @@ import com.android.systemui.power.EnhancedEstimatesImpl; import com.android.systemui.qs.tileimpl.QSFactoryImpl; import com.android.systemui.recents.Recents; import com.android.systemui.recents.RecentsImplementation; import com.android.systemui.settings.CurrentUserContextTracker; import com.android.systemui.stackdivider.DividerModule; import com.android.systemui.statusbar.CommandQueue; import com.android.systemui.statusbar.NotificationLockscreenUserManager; Loading Loading @@ -138,15 +136,4 @@ public abstract class SystemUIDefaultModule { @Binds abstract KeyguardViewController bindKeyguardViewController( StatusBarKeyguardViewManager statusBarKeyguardViewManager); @Singleton @Provides static CurrentUserContextTracker provideCurrentUserContextTracker( Context context, BroadcastDispatcher broadcastDispatcher) { CurrentUserContextTracker tracker = new CurrentUserContextTracker(context, broadcastDispatcher); tracker.initialize(); return tracker; } } packages/SystemUI/src/com/android/systemui/dagger/SystemUIModule.java +2 −0 Original line number Diff line number Diff line Loading @@ -29,6 +29,7 @@ import com.android.systemui.log.dagger.LogModule; import com.android.systemui.model.SysUiState; import com.android.systemui.plugins.statusbar.StatusBarStateController; import com.android.systemui.recents.Recents; import com.android.systemui.settings.dagger.SettingsModule; import com.android.systemui.stackdivider.Divider; import com.android.systemui.statusbar.CommandQueue; import com.android.systemui.statusbar.notification.collection.inflation.NotificationRowBinder; Loading Loading @@ -61,6 +62,7 @@ import dagger.Provides; ConcurrencyModule.class, LogModule.class, PeopleHubModule.class, SettingsModule.class }, subcomponents = {StatusBarComponent.class, NotificationRowComponent.class, Loading packages/SystemUI/src/com/android/systemui/settings/CurrentUserContextTracker.kt +3 −4 Original line number Diff line number Diff line Loading @@ -22,14 +22,13 @@ import androidx.annotation.VisibleForTesting import com.android.systemui.broadcast.BroadcastDispatcher import com.android.systemui.util.Assert import java.lang.IllegalStateException import javax.inject.Inject import javax.inject.Singleton /** * Tracks a reference to the context for the current user * * Constructor is injected at SettingsModule */ @Singleton class CurrentUserContextTracker @Inject constructor( class CurrentUserContextTracker internal constructor( private val sysuiContext: Context, broadcastDispatcher: BroadcastDispatcher ) { Loading packages/SystemUI/src/com/android/systemui/settings/dagger/SettingsModule.java 0 → 100644 +48 −0 Original line number Diff line number Diff line /* * Copyright (C) 2020 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.settings.dagger; import android.content.Context; import com.android.systemui.broadcast.BroadcastDispatcher; import com.android.systemui.settings.CurrentUserContextTracker; import javax.inject.Singleton; import dagger.Module; import dagger.Provides; /** * Dagger Module for classes found within the com.android.systemui.settings package. */ @Module public interface SettingsModule { /** * Provides and initializes a CurrentUserContextTracker */ @Singleton @Provides static CurrentUserContextTracker provideCurrentUserContextTracker( Context context, BroadcastDispatcher broadcastDispatcher) { CurrentUserContextTracker tracker = new CurrentUserContextTracker(context, broadcastDispatcher); tracker.initialize(); return tracker; } } Loading
packages/SystemUI/src/com/android/systemui/dagger/SystemUIDefaultModule.java +0 −13 Original line number Diff line number Diff line Loading @@ -24,7 +24,6 @@ import android.content.Context; import androidx.annotation.Nullable; import com.android.keyguard.KeyguardViewController; import com.android.systemui.broadcast.BroadcastDispatcher; import com.android.systemui.dock.DockManager; import com.android.systemui.dock.DockManagerImpl; import com.android.systemui.plugins.qs.QSFactory; Loading @@ -34,7 +33,6 @@ import com.android.systemui.power.EnhancedEstimatesImpl; import com.android.systemui.qs.tileimpl.QSFactoryImpl; import com.android.systemui.recents.Recents; import com.android.systemui.recents.RecentsImplementation; import com.android.systemui.settings.CurrentUserContextTracker; import com.android.systemui.stackdivider.DividerModule; import com.android.systemui.statusbar.CommandQueue; import com.android.systemui.statusbar.NotificationLockscreenUserManager; Loading Loading @@ -138,15 +136,4 @@ public abstract class SystemUIDefaultModule { @Binds abstract KeyguardViewController bindKeyguardViewController( StatusBarKeyguardViewManager statusBarKeyguardViewManager); @Singleton @Provides static CurrentUserContextTracker provideCurrentUserContextTracker( Context context, BroadcastDispatcher broadcastDispatcher) { CurrentUserContextTracker tracker = new CurrentUserContextTracker(context, broadcastDispatcher); tracker.initialize(); return tracker; } }
packages/SystemUI/src/com/android/systemui/dagger/SystemUIModule.java +2 −0 Original line number Diff line number Diff line Loading @@ -29,6 +29,7 @@ import com.android.systemui.log.dagger.LogModule; import com.android.systemui.model.SysUiState; import com.android.systemui.plugins.statusbar.StatusBarStateController; import com.android.systemui.recents.Recents; import com.android.systemui.settings.dagger.SettingsModule; import com.android.systemui.stackdivider.Divider; import com.android.systemui.statusbar.CommandQueue; import com.android.systemui.statusbar.notification.collection.inflation.NotificationRowBinder; Loading Loading @@ -61,6 +62,7 @@ import dagger.Provides; ConcurrencyModule.class, LogModule.class, PeopleHubModule.class, SettingsModule.class }, subcomponents = {StatusBarComponent.class, NotificationRowComponent.class, Loading
packages/SystemUI/src/com/android/systemui/settings/CurrentUserContextTracker.kt +3 −4 Original line number Diff line number Diff line Loading @@ -22,14 +22,13 @@ import androidx.annotation.VisibleForTesting import com.android.systemui.broadcast.BroadcastDispatcher import com.android.systemui.util.Assert import java.lang.IllegalStateException import javax.inject.Inject import javax.inject.Singleton /** * Tracks a reference to the context for the current user * * Constructor is injected at SettingsModule */ @Singleton class CurrentUserContextTracker @Inject constructor( class CurrentUserContextTracker internal constructor( private val sysuiContext: Context, broadcastDispatcher: BroadcastDispatcher ) { Loading
packages/SystemUI/src/com/android/systemui/settings/dagger/SettingsModule.java 0 → 100644 +48 −0 Original line number Diff line number Diff line /* * Copyright (C) 2020 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.settings.dagger; import android.content.Context; import com.android.systemui.broadcast.BroadcastDispatcher; import com.android.systemui.settings.CurrentUserContextTracker; import javax.inject.Singleton; import dagger.Module; import dagger.Provides; /** * Dagger Module for classes found within the com.android.systemui.settings package. */ @Module public interface SettingsModule { /** * Provides and initializes a CurrentUserContextTracker */ @Singleton @Provides static CurrentUserContextTracker provideCurrentUserContextTracker( Context context, BroadcastDispatcher broadcastDispatcher) { CurrentUserContextTracker tracker = new CurrentUserContextTracker(context, broadcastDispatcher); tracker.initialize(); return tracker; } }