Loading packages/SystemUI/src/com/android/systemui/controls/ui/ControlsActivity.kt +4 −0 Original line number Diff line number Diff line Loading @@ -159,6 +159,10 @@ open class ControlsActivity @Inject constructor( override fun onDestroy() { super.onDestroy() unregisterReceiver() } protected open fun unregisterReceiver() { broadcastDispatcher.unregisterReceiver(broadcastReceiver) } Loading packages/SystemUI/tests/src/com/android/systemui/controls/ui/TestableControlsActivity.kt +7 −1 Original line number Diff line number Diff line Loading @@ -22,6 +22,8 @@ import com.android.systemui.controls.settings.ControlsSettingsDialogManager import com.android.systemui.flags.FeatureFlags import com.android.systemui.statusbar.policy.KeyguardStateController // IMPORTANT: onDestroy may be called outside of bounds of the test. That means that the mocks // may have been nulled before onDestroy happens. class TestableControlsActivity( uiController: ControlsUiController, broadcastDispatcher: BroadcastDispatcher, Loading @@ -37,4 +39,8 @@ class TestableControlsActivity( featureFlags, controlsSettingsDialogManager, keyguardStateController ) ) { override fun unregisterReceiver() { // Do nothing. This will be called in `onDestroy` } } Loading
packages/SystemUI/src/com/android/systemui/controls/ui/ControlsActivity.kt +4 −0 Original line number Diff line number Diff line Loading @@ -159,6 +159,10 @@ open class ControlsActivity @Inject constructor( override fun onDestroy() { super.onDestroy() unregisterReceiver() } protected open fun unregisterReceiver() { broadcastDispatcher.unregisterReceiver(broadcastReceiver) } Loading
packages/SystemUI/tests/src/com/android/systemui/controls/ui/TestableControlsActivity.kt +7 −1 Original line number Diff line number Diff line Loading @@ -22,6 +22,8 @@ import com.android.systemui.controls.settings.ControlsSettingsDialogManager import com.android.systemui.flags.FeatureFlags import com.android.systemui.statusbar.policy.KeyguardStateController // IMPORTANT: onDestroy may be called outside of bounds of the test. That means that the mocks // may have been nulled before onDestroy happens. class TestableControlsActivity( uiController: ControlsUiController, broadcastDispatcher: BroadcastDispatcher, Loading @@ -37,4 +39,8 @@ class TestableControlsActivity( featureFlags, controlsSettingsDialogManager, keyguardStateController ) ) { override fun unregisterReceiver() { // Do nothing. This will be called in `onDestroy` } }