Fix for run cts-on-gsi -m CtsOsTestCases -t android.os.cts.VibratorTest
For dual vibrator device, the AOSP code needs to be adjusted as follow. Bug: 209932477 Test: run cts-on-gsi -m CtsOsTestCases -t android.os.cts.VibratorTest#testVibrateComposed run cts-on-gsi -m CtsOsTestCases -t android.os.cts.VibratorTest#testVibratorIsVibrating run cts-on-gsi -m CtsOsTestCases -t android.os.cts.VibratorTest#testVibrateMultiThread run cts-on-gsi -m CtsOsTestCases -t android.os.cts.VibratorTest#testVibratorVibratesNoLongerThanDuration run cts-on-gsi -m CtsOsTestCases -t android.os.cts.VibratorTest#testVibrateOneShot run cts-on-gsi -m CtsOsTestCases -t android.os.cts.VibratorTest#testVibratorStateCallback run cts-on-gsi -m CtsOsTestCases -t android.os.cts.VibratorTest#testVibratePattern run cts-on-gsi -m CtsOsTestCases -t android.os.cts.VibratorTest#testVibratePredefined run cts-on-gsi -m CtsOsTestCases -t android.os.cts.VibratorTest#testVibrateWaveform run cts-on-gsi -m CtsOsTestCases -t android.os.cts.VibratorTest#testVibratorCancel Change-Id: I31afc8179acb4f7749b1208f3abd13a1941a01b2
This commit is contained in:
committed by
Hung-ying Tyan
parent
40eb40302d
commit
b166fcedac
@@ -389,7 +389,7 @@ public class SystemVibrator extends Vibrator {
|
||||
mExecutor.execute(() -> {
|
||||
boolean anyVibrating;
|
||||
synchronized (mLock) {
|
||||
int allInitializedMask = 1 << mVibratorListeners.size() - 1;
|
||||
int allInitializedMask = (1 << mVibratorListeners.size()) - 1;
|
||||
int vibratorMask = 1 << vibratorIdx;
|
||||
if ((mInitializedMask & vibratorMask) == 0) {
|
||||
// First state report for this vibrator, set vibrating initial value.
|
||||
|
||||
Reference in New Issue
Block a user