Skip to content
Snippets Groups Projects
Commit b9dac8a5 authored by Łukasz Rymanowski's avatar Łukasz Rymanowski
Browse files

HapClientService: Don't use cache for PTS

PTS wants us to do operations on remote device, so when enabled, call
native.

Bug: 238171211
Test: atest BluetoothInstrumentationTests
Test: PTS
Tag: #feature
Change-Id: I14f8eda50321f941b69fa1cd37403b131dc5938d
parent 1e07461b
No related branches found
No related tags found
No related merge requests found
......@@ -696,6 +696,12 @@ public class HapClientService extends ProfileService {
BluetoothHapPresetInfo defaultValue = null;
if (presetIndex == BluetoothHapClient.PRESET_INDEX_UNAVAILABLE) return defaultValue;
if (Utils.isPtsTestMode()) {
/* We want native to be called for PTS testing even we have all
* the data in the cache here
*/
mHapClientNativeInterface.getPresetInfo(device, presetIndex);
}
List<BluetoothHapPresetInfo> current_presets = mPresetsMap.get(device);
if (current_presets != null) {
for (BluetoothHapPresetInfo preset : current_presets) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment