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

Commit c36a0712 authored by hughchen's avatar hughchen Committed by android-build-merger
Browse files

Merge "Update api name"

am: f82f807e

Change-Id: I20240365a45eb27bcfed019ac77e4e6bfe09d24d
parents 38b21bca f82f807e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -79,7 +79,7 @@ public class BluetoothDetailsButtonsController extends BluetoothDetailsControlle
                        .setButton2Text(R.string.bluetooth_device_context_connect)
                        .setButton2Icon(R.drawable.ic_add_24dp)
                        .setButton2OnClickListener(
                                view -> mCachedDevice.connect(true /* connectAllProfiles */));
                                view -> mCachedDevice.connect());
                mConnectButtonInitialized = true;
            }
        }
+1 −1
Original line number Diff line number Diff line
@@ -218,7 +218,7 @@ public final class BluetoothDevicePreference extends GearPreference implements
        } else if (bondState == BluetoothDevice.BOND_BONDED) {
            metricsFeatureProvider.action(context,
                    SettingsEnums.ACTION_SETTINGS_BLUETOOTH_CONNECT);
            mCachedDevice.connect(true);
            mCachedDevice.connect();
        } else if (bondState == BluetoothDevice.BOND_NONE) {
            metricsFeatureProvider.action(context,
                    SettingsEnums.ACTION_SETTINGS_BLUETOOTH_PAIR);
+1 −1
Original line number Diff line number Diff line
@@ -53,7 +53,7 @@ public class SavedBluetoothDeviceUpdater extends BluetoothDeviceUpdater
    public boolean onPreferenceClick(Preference preference) {
        final CachedBluetoothDevice device = ((BluetoothDevicePreference) preference)
                .getBluetoothDevice();
        device.connect(true);
        device.connect();
        return true;
    }
}
+2 −3
Original line number Diff line number Diff line
@@ -22,7 +22,6 @@ import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyBoolean;
import static org.mockito.ArgumentMatchers.anyInt;
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
@@ -103,7 +102,7 @@ public class BluetoothDetailsButtonsControllerTest extends BluetoothDetailsContr
        verify(mButtonsPref).setButton2Text(R.string.bluetooth_device_context_connect);

        mConnectButton.callOnClick();
        verify(mCachedDevice).connect(eq(true));
        verify(mCachedDevice).connect();
    }

    @Test
@@ -119,7 +118,7 @@ public class BluetoothDetailsButtonsControllerTest extends BluetoothDetailsContr

        // Click the button and make sure that connect (not disconnect) gets called.
        mConnectButton.callOnClick();
        verify(mCachedDevice).connect(eq(true));
        verify(mCachedDevice).connect();
    }

    @Test
+1 −1
Original line number Diff line number Diff line
@@ -121,6 +121,6 @@ public class SavedBluetoothDeviceUpdaterTest {
    public void onClick_Preference_setConnect() {
        mBluetoothDeviceUpdater.onPreferenceClick(mPreference);

        verify(mCachedBluetoothDevice).connect(true);
        verify(mCachedBluetoothDevice).connect();
    }
}