diff options
author | Asai,Atsuhiko <Atsuhiko.Asai@sony.com> | 2019-08-01 10:34:12 +0000 |
---|---|---|
committer | Hiroaki Hashiguchi <Hiroaki.Hashiguchi@sony.com> | 2022-09-30 01:44:44 +0000 |
commit | 5d816b3f71c62b693f4ce7d715b3cf1c9b86de9e (patch) | |
tree | 47f36aef0284324c98408fc8f4dae3ea8c4e43e4 | |
parent | 00b5a304ff1b999cdbd5eb08b683e4bd9f3fbfd7 (diff) | |
download | cts-5d816b3f71c62b693f4ce7d715b3cf1c9b86de9e.tar.gz |
No need test volume key in some case
If the "config_handleVolumeKeysInWindowManager" is true,
the volume key should not be tested.
Bug: 138661139
Test: Manually use UI of CtsVerifier - "USB Audio Peripheral Buttons Test"
Change-Id: Id6f1ca14bb436f6ecec9fbef2c1e9dd379312e2a
Merged-In: Id6f1ca14bb436f6ecec9fbef2c1e9dd379312e2a
Signed-off-by: fang hui <hui.fang@nxp.com>
(cherry picked from commit 18d3a5f3163afd7db7afa602cda727064cb9b75e)
-rw-r--r-- | apps/CtsVerifier/src/com/android/cts/verifier/audio/USBAudioPeripheralButtonsActivity.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/apps/CtsVerifier/src/com/android/cts/verifier/audio/USBAudioPeripheralButtonsActivity.java b/apps/CtsVerifier/src/com/android/cts/verifier/audio/USBAudioPeripheralButtonsActivity.java index 823f3268df7..324b5dbf87f 100644 --- a/apps/CtsVerifier/src/com/android/cts/verifier/audio/USBAudioPeripheralButtonsActivity.java +++ b/apps/CtsVerifier/src/com/android/cts/verifier/audio/USBAudioPeripheralButtonsActivity.java @@ -108,7 +108,14 @@ public class USBAudioPeripheralButtonsActivity extends USBAudioPeripheralActivit private void calculateMatch() { if (mIsPeripheralAttached) { - boolean match = mHasBtnA && mHasBtnB && mHasBtnC; + boolean match; + boolean interceptedVolume = getResources().getBoolean(Resources.getSystem() + .getIdentifier("config_handleVolumeKeysInWindowManager", "bool", "android")); + if (interceptedVolume) { + match = mHasBtnA; + } else { + match = mHasBtnA && mHasBtnB && mHasBtnC; + } Log.i(TAG, "match:" + match); getPassButton().setEnabled(match); } else { |