Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3dcceea2 authored by Vania Januar's avatar Vania Januar Committed by Android (Google) Code Review
Browse files

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

parents e37f265f b837d57b
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -341,9 +341,7 @@ public class BluetoothDeviceDetailsFragment extends RestrictedDashboardFragment

    @VisibleForTesting
    void setTitleForInputDevice() {
        // TODO(b/254835745) once source filter for bt stylus merged
        // && mInputDevice.supportsSource(InputDevice.SOURCE_BLUETOOTH_STYLUS))
        if (mInputDevice != null) {
        if (StylusDevicesController.isDeviceStylus(mInputDevice, mCachedDevice)) {
            // This will override the default R.string.device_details_title "Device Details"
            // that will show on non-stylus bluetooth devices.
            // That title is set via the manifest and also from BluetoothDeviceUpdater.
+3 −1
Original line number Diff line number Diff line
@@ -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();