Merge "Set title for Bluetooth Details page to "Stylus" for styluses."

This commit is contained in:
Vania Januar
2022-12-30 09:32:43 +00:00
committed by Android (Google) Code Review
2 changed files with 4 additions and 4 deletions

View File

@@ -159,7 +159,9 @@ public class BluetoothDeviceDetailsFragmentTest {
public void getTitle_inputDeviceTitle() {
FeatureFlagUtils.setEnabled(mContext, FeatureFlagUtils.SETTINGS_SHOW_STYLUS_PREFERENCES,
true);
doReturn(mock(InputDevice.class)).when(mFragment).getInputDevice(mContext);
InputDevice inputDevice = mock(InputDevice.class);
doReturn(true).when(inputDevice).supportsSource(InputDevice.SOURCE_STYLUS);
doReturn(inputDevice).when(mFragment).getInputDevice(mContext);
mFragment.onAttach(mContext);
mFragment.setTitleForInputDevice();