Revert^2 "Add @SysUISingleton to repository switcher classes"
The Mobile and WiFi repository switcher classes never got the annotation to be created as a SysUISingleton. This is probably a mistake caused by the way we had been providing them; By using a @Binds method on the StatusBarPipelineModule, it was not immediately obvious that the classes were not singletons. But believe me, they should be singletons. Test: manually determined that there is only 1 Mobile and Wifi switcher instantiated Test: CarrierTextManagerLog gets current info when airplane mode switches Test: manually verified that the "Wi-Fi Calling" text shows when in airplane mode Fixes: 278254374 Change-Id: Idd766a5378d8deebe50bafe1d564635187ab30ee
This commit is contained in:
@@ -21,6 +21,7 @@ import androidx.annotation.VisibleForTesting
|
||||
import com.android.settingslib.SignalIcon
|
||||
import com.android.settingslib.mobile.MobileMappings
|
||||
import com.android.systemui.common.coroutine.ConflatedCallbackFlow.conflatedCallbackFlow
|
||||
import com.android.systemui.dagger.SysUISingleton
|
||||
import com.android.systemui.dagger.qualifiers.Application
|
||||
import com.android.systemui.demomode.DemoMode
|
||||
import com.android.systemui.demomode.DemoModeController
|
||||
@@ -62,6 +63,7 @@ import kotlinx.coroutines.flow.stateIn
|
||||
*/
|
||||
@Suppress("EXPERIMENTAL_IS_NOT_ENABLED")
|
||||
@OptIn(ExperimentalCoroutinesApi::class)
|
||||
@SysUISingleton
|
||||
class MobileRepositorySwitcher
|
||||
@Inject
|
||||
constructor(
|
||||
|
||||
@@ -19,6 +19,7 @@ package com.android.systemui.statusbar.pipeline.wifi.data.repository
|
||||
import android.os.Bundle
|
||||
import androidx.annotation.VisibleForTesting
|
||||
import com.android.systemui.common.coroutine.ConflatedCallbackFlow.conflatedCallbackFlow
|
||||
import com.android.systemui.dagger.SysUISingleton
|
||||
import com.android.systemui.dagger.qualifiers.Application
|
||||
import com.android.systemui.demomode.DemoMode
|
||||
import com.android.systemui.demomode.DemoModeController
|
||||
@@ -54,6 +55,7 @@ import kotlinx.coroutines.flow.stateIn
|
||||
*/
|
||||
@Suppress("EXPERIMENTAL_IS_NOT_ENABLED")
|
||||
@OptIn(ExperimentalCoroutinesApi::class)
|
||||
@SysUISingleton
|
||||
class WifiRepositorySwitcher
|
||||
@Inject
|
||||
constructor(
|
||||
|
||||
Reference in New Issue
Block a user