Loading packages/SystemUI/Android.bp +1 −1 Original line number Diff line number Diff line Loading @@ -278,7 +278,7 @@ filegroup { "tests/src/**/systemui/media/controls/domain/pipeline/LegacyMediaDataManagerImplTest.kt", "tests/src/**/systemui/temporarydisplay/chipbar/SwipeChipbarAwayGestureHandlerTest.kt", "tests/src/**/systemui/qs/tiles/HotspotTileTest.java", "tests/src/**/systemui/qs/tiles/dialog/InternetDialogDelegateTest.java", "tests/src/**/systemui/qs/tiles/dialog/InternetDialogDelegateLegacyTest.java", "tests/src/**/systemui/navigationbar/NavigationBarControllerImplTest.java", "tests/src/**/systemui/wmshell/BubblesTest.java", "tests/src/**/systemui/statusbar/phone/StatusBarNotificationActivityStarterTest.java", Loading packages/SystemUI/src/com/android/systemui/qs/flags/QsDetailedView.kt +8 −0 Original line number Diff line number Diff line Loading @@ -79,6 +79,14 @@ object QsDetailedView { @JvmStatic inline fun assertInLegacyMode() = RefactorFlagUtils.assertInLegacyMode(isEnabled, FLAG_NAME) /** * Called to ensure code is only run when the flag is enabled. This will throw an exception if * the flag is not enabled to ensure that the refactor author catches issues in testing. * Caution!! Using this check incorrectly will cause crashes in nextfood builds! */ @JvmStatic inline fun assertInNewMode() = RefactorFlagUtils.assertInNewMode(isEnabled, FLAG_NAME) /** Returns a developer-readable string that describes the current requirement list. */ @JvmStatic fun requirementDescription(): String { Loading packages/SystemUI/src/com/android/systemui/qs/tiles/dialog/InternetDialogDelegate.java→packages/SystemUI/src/com/android/systemui/qs/tiles/dialog/InternetDialogDelegateLegacy.java +5 −3 Original line number Diff line number Diff line Loading @@ -90,7 +90,7 @@ import java.util.concurrent.Executor; /** * Dialog for showing mobile network, connected Wi-Fi network and Wi-Fi networks. */ public class InternetDialogDelegate implements public class InternetDialogDelegateLegacy implements SystemUIDialog.Delegate, InternetDetailsContentController.InternetDialogCallback { private static final String TAG = "InternetDialog"; Loading Loading @@ -184,7 +184,7 @@ public class InternetDialogDelegate implements @AssistedFactory public interface Factory { InternetDialogDelegate create( InternetDialogDelegateLegacy create( @Assisted(ABOVE_STATUS_BAR) boolean aboveStatusBar, @Assisted(CAN_CONFIG_MOBILE_DATA) boolean canConfigMobileData, @Assisted(CAN_CONFIG_WIFI) boolean canConfigWifi, Loading @@ -192,7 +192,7 @@ public class InternetDialogDelegate implements } @AssistedInject public InternetDialogDelegate( public InternetDialogDelegateLegacy( @ShadeDisplayAware Context context, InternetDialogManager internetDialogManager, InternetDetailsContentController internetDetailsContentController, Loading @@ -207,6 +207,8 @@ public class InternetDialogDelegate implements KeyguardStateController keyguardStateController, SystemUIDialog.Factory systemUIDialogFactory, ShadeDialogContextInteractor shadeDialogContextInteractor) { // TODO: b/377388104 QsDetailedView.assertInLegacyMode(); mAboveStatusBar = aboveStatusBar; mSystemUIDialogFactory = systemUIDialogFactory; mShadeDialogContextInteractor = shadeDialogContextInteractor; Loading packages/SystemUI/src/com/android/systemui/qs/tiles/dialog/InternetDialogManager.kt +5 −4 Original line number Diff line number Diff line Loading @@ -32,13 +32,13 @@ import kotlinx.coroutines.cancel private const val TAG = "InternetDialogFactory" private val DEBUG = Log.isLoggable(TAG, Log.DEBUG) /** Factory to create [InternetDialogDelegate] objects. */ /** Factory to create [InternetDialogDelegateLegacy] objects. */ @SysUISingleton class InternetDialogManager @Inject constructor( private val dialogTransitionAnimator: DialogTransitionAnimator, private val dialogFactory: InternetDialogDelegate.Factory, private val dialogFactory: InternetDialogDelegateLegacy.Factory, @Background private val bgDispatcher: CoroutineDispatcher, ) { private lateinit var coroutineScope: CoroutineScope Loading @@ -48,8 +48,8 @@ constructor( } /** * Creates a [InternetDialogDelegate]. The dialog will be animated from [expandable] if it is * not null. * Creates a [InternetDialogDelegateLegacy]. The dialog will be animated from [expandable] if * it is not null. */ fun create( aboveStatusBar: Boolean, Loading @@ -64,6 +64,7 @@ constructor( return } else { coroutineScope = CoroutineScope(bgDispatcher + newTracingContext("InternetDialogScope")) // TODO: b/377388104 check the QsDetailedView flag to use the correct dialogFactory dialog = dialogFactory .create(aboveStatusBar, canConfigMobileData, canConfigWifi, coroutineScope) Loading packages/SystemUI/tests/src/com/android/systemui/qs/tiles/dialog/InternetDialogDelegateTest.java→packages/SystemUI/tests/src/com/android/systemui/qs/tiles/dialog/InternetDialogDelegateLegacyTest.java +159 −155 File changed and moved.Preview size limit exceeded, changes collapsed. Show changes Loading
packages/SystemUI/Android.bp +1 −1 Original line number Diff line number Diff line Loading @@ -278,7 +278,7 @@ filegroup { "tests/src/**/systemui/media/controls/domain/pipeline/LegacyMediaDataManagerImplTest.kt", "tests/src/**/systemui/temporarydisplay/chipbar/SwipeChipbarAwayGestureHandlerTest.kt", "tests/src/**/systemui/qs/tiles/HotspotTileTest.java", "tests/src/**/systemui/qs/tiles/dialog/InternetDialogDelegateTest.java", "tests/src/**/systemui/qs/tiles/dialog/InternetDialogDelegateLegacyTest.java", "tests/src/**/systemui/navigationbar/NavigationBarControllerImplTest.java", "tests/src/**/systemui/wmshell/BubblesTest.java", "tests/src/**/systemui/statusbar/phone/StatusBarNotificationActivityStarterTest.java", Loading
packages/SystemUI/src/com/android/systemui/qs/flags/QsDetailedView.kt +8 −0 Original line number Diff line number Diff line Loading @@ -79,6 +79,14 @@ object QsDetailedView { @JvmStatic inline fun assertInLegacyMode() = RefactorFlagUtils.assertInLegacyMode(isEnabled, FLAG_NAME) /** * Called to ensure code is only run when the flag is enabled. This will throw an exception if * the flag is not enabled to ensure that the refactor author catches issues in testing. * Caution!! Using this check incorrectly will cause crashes in nextfood builds! */ @JvmStatic inline fun assertInNewMode() = RefactorFlagUtils.assertInNewMode(isEnabled, FLAG_NAME) /** Returns a developer-readable string that describes the current requirement list. */ @JvmStatic fun requirementDescription(): String { Loading
packages/SystemUI/src/com/android/systemui/qs/tiles/dialog/InternetDialogDelegate.java→packages/SystemUI/src/com/android/systemui/qs/tiles/dialog/InternetDialogDelegateLegacy.java +5 −3 Original line number Diff line number Diff line Loading @@ -90,7 +90,7 @@ import java.util.concurrent.Executor; /** * Dialog for showing mobile network, connected Wi-Fi network and Wi-Fi networks. */ public class InternetDialogDelegate implements public class InternetDialogDelegateLegacy implements SystemUIDialog.Delegate, InternetDetailsContentController.InternetDialogCallback { private static final String TAG = "InternetDialog"; Loading Loading @@ -184,7 +184,7 @@ public class InternetDialogDelegate implements @AssistedFactory public interface Factory { InternetDialogDelegate create( InternetDialogDelegateLegacy create( @Assisted(ABOVE_STATUS_BAR) boolean aboveStatusBar, @Assisted(CAN_CONFIG_MOBILE_DATA) boolean canConfigMobileData, @Assisted(CAN_CONFIG_WIFI) boolean canConfigWifi, Loading @@ -192,7 +192,7 @@ public class InternetDialogDelegate implements } @AssistedInject public InternetDialogDelegate( public InternetDialogDelegateLegacy( @ShadeDisplayAware Context context, InternetDialogManager internetDialogManager, InternetDetailsContentController internetDetailsContentController, Loading @@ -207,6 +207,8 @@ public class InternetDialogDelegate implements KeyguardStateController keyguardStateController, SystemUIDialog.Factory systemUIDialogFactory, ShadeDialogContextInteractor shadeDialogContextInteractor) { // TODO: b/377388104 QsDetailedView.assertInLegacyMode(); mAboveStatusBar = aboveStatusBar; mSystemUIDialogFactory = systemUIDialogFactory; mShadeDialogContextInteractor = shadeDialogContextInteractor; Loading
packages/SystemUI/src/com/android/systemui/qs/tiles/dialog/InternetDialogManager.kt +5 −4 Original line number Diff line number Diff line Loading @@ -32,13 +32,13 @@ import kotlinx.coroutines.cancel private const val TAG = "InternetDialogFactory" private val DEBUG = Log.isLoggable(TAG, Log.DEBUG) /** Factory to create [InternetDialogDelegate] objects. */ /** Factory to create [InternetDialogDelegateLegacy] objects. */ @SysUISingleton class InternetDialogManager @Inject constructor( private val dialogTransitionAnimator: DialogTransitionAnimator, private val dialogFactory: InternetDialogDelegate.Factory, private val dialogFactory: InternetDialogDelegateLegacy.Factory, @Background private val bgDispatcher: CoroutineDispatcher, ) { private lateinit var coroutineScope: CoroutineScope Loading @@ -48,8 +48,8 @@ constructor( } /** * Creates a [InternetDialogDelegate]. The dialog will be animated from [expandable] if it is * not null. * Creates a [InternetDialogDelegateLegacy]. The dialog will be animated from [expandable] if * it is not null. */ fun create( aboveStatusBar: Boolean, Loading @@ -64,6 +64,7 @@ constructor( return } else { coroutineScope = CoroutineScope(bgDispatcher + newTracingContext("InternetDialogScope")) // TODO: b/377388104 check the QsDetailedView flag to use the correct dialogFactory dialog = dialogFactory .create(aboveStatusBar, canConfigMobileData, canConfigWifi, coroutineScope) Loading
packages/SystemUI/tests/src/com/android/systemui/qs/tiles/dialog/InternetDialogDelegateTest.java→packages/SystemUI/tests/src/com/android/systemui/qs/tiles/dialog/InternetDialogDelegateLegacyTest.java +159 −155 File changed and moved.Preview size limit exceeded, changes collapsed. Show changes