Remove the gear icon and change tapping event

* Remove the gear icon in "currently connected" section.
* Change the tapping event in "currently connected" section.
  When tapping device in this section, take user to device detail page.

Bug: 78490845
Test: make -j40 RunSettingsRoboTests
Change-Id: I25f8455def3c38e24dea9af9e9e29ba37c250f67
Merged-In: I25f8455def3c38e24dea9af9e9e29ba37c250f67
This commit is contained in:
hughchen
2018-04-24 15:46:30 +08:00
committed by tim peng
parent 1a38390728
commit 8dcd550d36
4 changed files with 63 additions and 19 deletions

View File

@@ -15,6 +15,7 @@
*/
package com.android.settings.bluetooth;
import static com.google.common.truth.Truth.assertThat;
import static org.mockito.Matchers.any;
import static org.mockito.Mockito.doNothing;
import static org.mockito.Mockito.doReturn;
@@ -207,4 +208,15 @@ public class ConnectedBluetoothDeviceUpdaterTest {
verify(mBluetoothDeviceUpdater).removePreference(mCachedBluetoothDevice);
}
@Test
public void addPreference_addPreference_shouldHideSecondTarget() {
BluetoothDevicePreference btPreference =
new BluetoothDevicePreference(mContext, mCachedBluetoothDevice, true);
mBluetoothDeviceUpdater.mPreferenceMap.put(mBluetoothDevice, btPreference);
mBluetoothDeviceUpdater.addPreference(mCachedBluetoothDevice);
assertThat(btPreference.shouldHideSecondTarget()).isTrue();
}
}