Loading packages/SystemUI/src/com/android/systemui/qs/tiles/BluetoothTile.java +6 −4 Original line number Diff line number Diff line Loading @@ -61,6 +61,8 @@ import com.android.systemui.qs.tileimpl.QSTileImpl; import com.android.systemui.res.R; import com.android.systemui.statusbar.policy.BluetoothController; import dagger.Lazy; import kotlinx.coroutines.Job; import java.util.List; Loading @@ -84,7 +86,7 @@ public class BluetoothTile extends QSTileImpl<BooleanState> { private final Executor mExecutor; private final BluetoothDetailsContentViewModel mDetailsContentViewModel; private final Lazy<BluetoothDetailsContentViewModel> mDetailsContentViewModel; private final FeatureFlags mFeatureFlags; @Nullable Loading @@ -104,7 +106,7 @@ public class BluetoothTile extends QSTileImpl<BooleanState> { QSLogger qsLogger, BluetoothController bluetoothController, FeatureFlags featureFlags, BluetoothDetailsContentViewModel detailsContentViewModel Lazy<BluetoothDetailsContentViewModel> detailsContentViewModel ) { super(host, uiEventLogger, backgroundLooper, mainHandler, falsingManager, metricsLogger, statusBarStateController, activityStarter, qsLogger); Loading Loading @@ -133,7 +135,7 @@ public class BluetoothTile extends QSTileImpl<BooleanState> { callback.accept(new BluetoothDetailsViewModel(() -> { longClick(null); return null; }, mDetailsContentViewModel)) }, mDetailsContentViewModel.get())) ); return true; } Loading @@ -158,7 +160,7 @@ public class BluetoothTile extends QSTileImpl<BooleanState> { private void handleClickEvent(@Nullable Expandable expandable) { if (mFeatureFlags.isEnabled(Flags.BLUETOOTH_QS_TILE_DIALOG)) { mDetailsContentViewModel.showDetailsContent(expandable, /* view= */ null); mDetailsContentViewModel.get().showDetailsContent(expandable, /* view= */ null); } else { // Secondary clicks are header clicks, just toggle. toggleBluetooth(); Loading packages/SystemUI/tests/src/com/android/systemui/qs/tiles/BluetoothTileTest.kt +4 −4 Original line number Diff line number Diff line Loading @@ -39,6 +39,7 @@ import com.android.systemui.util.mockito.eq import com.android.systemui.util.mockito.mock import com.android.systemui.util.mockito.whenever import com.google.common.truth.Truth.assertThat import dagger.Lazy import kotlin.test.assertTrue import kotlinx.coroutines.Job import org.junit.After Loading Loading @@ -96,8 +97,7 @@ class BluetoothTileTest(flags: FlagsParameterization) : SysuiTestCase() { qsLogger, bluetoothController, featureFlags, bluetoothDetailsContentViewModel, ) ) { bluetoothDetailsContentViewModel } tile.initialize() testableLooper.processAllMessages() Loading Loading @@ -308,7 +308,7 @@ class BluetoothTileTest(flags: FlagsParameterization) : SysuiTestCase() { qsLogger: QSLogger, bluetoothController: BluetoothController, featureFlags: FeatureFlagsClassic, bluetoothDetailsContentViewModel: BluetoothDetailsContentViewModel, lazyBluetoothDetailsContentViewModel: Lazy<BluetoothDetailsContentViewModel>, ) : BluetoothTile( qsHost, Loading @@ -322,7 +322,7 @@ class BluetoothTileTest(flags: FlagsParameterization) : SysuiTestCase() { qsLogger, bluetoothController, featureFlags, bluetoothDetailsContentViewModel, lazyBluetoothDetailsContentViewModel, ) { var restrictionChecked: String? = null Loading Loading
packages/SystemUI/src/com/android/systemui/qs/tiles/BluetoothTile.java +6 −4 Original line number Diff line number Diff line Loading @@ -61,6 +61,8 @@ import com.android.systemui.qs.tileimpl.QSTileImpl; import com.android.systemui.res.R; import com.android.systemui.statusbar.policy.BluetoothController; import dagger.Lazy; import kotlinx.coroutines.Job; import java.util.List; Loading @@ -84,7 +86,7 @@ public class BluetoothTile extends QSTileImpl<BooleanState> { private final Executor mExecutor; private final BluetoothDetailsContentViewModel mDetailsContentViewModel; private final Lazy<BluetoothDetailsContentViewModel> mDetailsContentViewModel; private final FeatureFlags mFeatureFlags; @Nullable Loading @@ -104,7 +106,7 @@ public class BluetoothTile extends QSTileImpl<BooleanState> { QSLogger qsLogger, BluetoothController bluetoothController, FeatureFlags featureFlags, BluetoothDetailsContentViewModel detailsContentViewModel Lazy<BluetoothDetailsContentViewModel> detailsContentViewModel ) { super(host, uiEventLogger, backgroundLooper, mainHandler, falsingManager, metricsLogger, statusBarStateController, activityStarter, qsLogger); Loading Loading @@ -133,7 +135,7 @@ public class BluetoothTile extends QSTileImpl<BooleanState> { callback.accept(new BluetoothDetailsViewModel(() -> { longClick(null); return null; }, mDetailsContentViewModel)) }, mDetailsContentViewModel.get())) ); return true; } Loading @@ -158,7 +160,7 @@ public class BluetoothTile extends QSTileImpl<BooleanState> { private void handleClickEvent(@Nullable Expandable expandable) { if (mFeatureFlags.isEnabled(Flags.BLUETOOTH_QS_TILE_DIALOG)) { mDetailsContentViewModel.showDetailsContent(expandable, /* view= */ null); mDetailsContentViewModel.get().showDetailsContent(expandable, /* view= */ null); } else { // Secondary clicks are header clicks, just toggle. toggleBluetooth(); Loading
packages/SystemUI/tests/src/com/android/systemui/qs/tiles/BluetoothTileTest.kt +4 −4 Original line number Diff line number Diff line Loading @@ -39,6 +39,7 @@ import com.android.systemui.util.mockito.eq import com.android.systemui.util.mockito.mock import com.android.systemui.util.mockito.whenever import com.google.common.truth.Truth.assertThat import dagger.Lazy import kotlin.test.assertTrue import kotlinx.coroutines.Job import org.junit.After Loading Loading @@ -96,8 +97,7 @@ class BluetoothTileTest(flags: FlagsParameterization) : SysuiTestCase() { qsLogger, bluetoothController, featureFlags, bluetoothDetailsContentViewModel, ) ) { bluetoothDetailsContentViewModel } tile.initialize() testableLooper.processAllMessages() Loading Loading @@ -308,7 +308,7 @@ class BluetoothTileTest(flags: FlagsParameterization) : SysuiTestCase() { qsLogger: QSLogger, bluetoothController: BluetoothController, featureFlags: FeatureFlagsClassic, bluetoothDetailsContentViewModel: BluetoothDetailsContentViewModel, lazyBluetoothDetailsContentViewModel: Lazy<BluetoothDetailsContentViewModel>, ) : BluetoothTile( qsHost, Loading @@ -322,7 +322,7 @@ class BluetoothTileTest(flags: FlagsParameterization) : SysuiTestCase() { qsLogger, bluetoothController, featureFlags, bluetoothDetailsContentViewModel, lazyBluetoothDetailsContentViewModel, ) { var restrictionChecked: String? = null Loading