Add preference click metric logs for some special cases

Bug: 137559984
Test: visual, robotest
Change-Id: If8624b49abcd0000487065160ce4a7ba861f234c
This commit is contained in:
Jason Chiu
2019-12-19 15:59:07 +08:00
parent d889dec474
commit 2d609759cd
18 changed files with 134 additions and 42 deletions

View File

@@ -82,7 +82,7 @@ public class BluetoothDeviceUpdaterTest {
private BluetoothDeviceUpdater mBluetoothDeviceUpdater;
private BluetoothDevicePreference mPreference;
private ShadowBluetoothAdapter mShadowBluetoothAdapter;
private List<CachedBluetoothDevice> mCachedDevices = new ArrayList<CachedBluetoothDevice>();
private List<CachedBluetoothDevice> mCachedDevices = new ArrayList<>();
@Before
public void setUp() {
@@ -104,11 +104,16 @@ public class BluetoothDeviceUpdaterTest {
mBluetoothDeviceUpdater =
new BluetoothDeviceUpdater(mDashboardFragment, mDevicePreferenceCallback,
mLocalManager) {
@Override
public boolean isFilterMatched(CachedBluetoothDevice cachedBluetoothDevice) {
return true;
}
};
@Override
public boolean isFilterMatched(CachedBluetoothDevice cachedBluetoothDevice) {
return true;
}
@Override
protected String getPreferenceKey() {
return "test_bt";
}
};
mBluetoothDeviceUpdater.setPrefContext(mContext);
}