Fix HearingDevicesDialogDelegateTest failed
1. Spinner.setSelection(index) in onItemSelected() callback will cause onItemSlected() callback get called again and result in an infinite loop. Remove this line to avoid this issue. 2. HapClientProfile.selectPreset() is called in onItemSelected() callback to sync the current selection to remote device. When refreshing the UI no matter on success/failure from remote, we should use Spinner.setSelection(index, false) instead of Spinner.setSelection(index) to avoid envoke onItemSelected() and HapClientProfile.selectPreset() again Flag: EXEMPT bugfix Bug: 354602601 Test: atest HearingDevicesDialogDelegateTest Change-Id: Id81c63638f13a0723e2e4c941888c485a7e497db
Loading
Please register or sign in to comment