summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-08-02 23:00:34 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-08-02 23:00:34 +0000
commit2e4a59904baca38a6acef7fda1705caadf5f601d (patch)
treefa9472b22b2044869968e91d640ac86aba42782c
parent5b7ed8f434d7be19df62c563de63f992a2941b26 (diff)
parent5c9254bc996fc03b90e89f49c9ebb8f7c55e0414 (diff)
downloadcts-2e4a59904baca38a6acef7fda1705caadf5f601d.tar.gz
Snap for 8898478 from 5c9254bc996fc03b90e89f49c9ebb8f7c55e0414 to tm-d1-release
Change-Id: I0191bc63ea5d34553bb7a0903114fd0553680cd9
-rw-r--r--apps/CameraITS/config.yml6
-rw-r--r--apps/CameraITS/tests/sensor_fusion/test_preview_stabilization.py4
-rw-r--r--apps/CameraITS/utils/video_processing_utils.py6
-rw-r--r--apps/CtsVerifier/AndroidManifest.xml9
-rw-r--r--apps/CtsVerifier/res/values/strings.xml1
-rw-r--r--tests/tests/security/src/android/security/cts/CVE_2022_20135.java67
6 files changed, 88 insertions, 5 deletions
diff --git a/apps/CameraITS/config.yml b/apps/CameraITS/config.yml
index 0ae754eb3be..b9b0ddf21ec 100644
--- a/apps/CameraITS/config.yml
+++ b/apps/CameraITS/config.yml
@@ -20,9 +20,9 @@ TestBeds:
# Test configuration for scenes[0:4, 6, _change]
Controllers:
AndroidDevice:
- - serial: <device_id>
+ - serial: <device_id> # quotes are needed if serial id is entirely numeric
label: dut
- - serial: <tablet_id>
+ - serial: <tablet_id> # quotes are needed if serial id is entirely numeric
label: tablet
TestParams:
brightness: 192
@@ -37,7 +37,7 @@ TestBeds:
# Test configuration for sensor_fusion/test_sensor_fusion.py
Controllers:
AndroidDevice:
- - serial: <device-id>
+ - serial: <device-id> # quotes are needed if serial id is entirely numeric
label: dut
TestParams:
fps: 30
diff --git a/apps/CameraITS/tests/sensor_fusion/test_preview_stabilization.py b/apps/CameraITS/tests/sensor_fusion/test_preview_stabilization.py
index c6b852c5378..e1909517dda 100644
--- a/apps/CameraITS/tests/sensor_fusion/test_preview_stabilization.py
+++ b/apps/CameraITS/tests/sensor_fusion/test_preview_stabilization.py
@@ -142,7 +142,9 @@ class PreviewStabilizationTest(its_base_test.ItsBaseTest):
# List of video resolutions to test
supported_preview_sizes = cam.get_supported_preview_sizes(self.camera_id)
- supported_preview_sizes.remove(video_processing_utils.QCIF_SIZE)
+ for size in video_processing_utils.LOW_RESOLUTION_SIZES:
+ if size in supported_preview_sizes:
+ supported_preview_sizes.remove(size)
logging.debug('Supported preview resolutions: %s',
supported_preview_sizes)
diff --git a/apps/CameraITS/utils/video_processing_utils.py b/apps/CameraITS/utils/video_processing_utils.py
index 98d930bc90b..5eab20c0742 100644
--- a/apps/CameraITS/utils/video_processing_utils.py
+++ b/apps/CameraITS/utils/video_processing_utils.py
@@ -33,7 +33,11 @@ ITS_SUPPORTED_QUALITIES = (
'LOW',
'VGA'
)
-QCIF_SIZE = '176x144'
+
+LOW_RESOLUTION_SIZES = (
+ '176x144',
+ '192x144',
+)
def extract_key_frames_from_video(log_path, video_file_name):
diff --git a/apps/CtsVerifier/AndroidManifest.xml b/apps/CtsVerifier/AndroidManifest.xml
index 0ed88bfbe2c..fde8f7edbb7 100644
--- a/apps/CtsVerifier/AndroidManifest.xml
+++ b/apps/CtsVerifier/AndroidManifest.xml
@@ -3153,6 +3153,7 @@
<meta-data android:name="test_category" android:value="@string/test_category_notifications" />
<meta-data android:name="display_mode"
android:value="multi_display_mode" />
+ <meta-data android:name="CddTest" android:value="2.2.3/3.8.3/H-0-1|3.8.3.1/C-1-5|3.8.3.1/C-3-1|3.8.3.1/C-3-2|3.8.3.2/C-0-1|3.8.3.2/C-0-2|3.8.3.2/C-1-1" />
</activity>
<activity android:name=".notifications.NotificationPrivacyVerifierActivity"
@@ -3167,6 +3168,7 @@
<meta-data android:name="test_excluded_features"
android:value="android.hardware.type.automotive" />
<meta-data android:name="display_mode" android:value="multi_display_mode" />
+ <meta-data android:name="CddTest" android:value="3.8.3.1/C-1-4|2.2.3/3.8.10/H-1-1" />
</activity>
<activity android:name=".notifications.ShowWhenLockedActivity"
@@ -3217,6 +3219,7 @@
android:value="android.hardware.type.automotive:android.hardware.type.television:android.software.leanback:android.hardware.type.watch" />
<meta-data android:name="display_mode"
android:value="multi_display_mode" />
+ <meta-data android:name="CddTest" android:value="3.8.3.3/C-1-1" />
</activity>
<activity android:name=".notifications.AttentionManagementVerifierActivity"
@@ -3231,6 +3234,7 @@
android:value="android.hardware.type.watch:android.software.leanback" />
<meta-data android:name="display_mode"
android:value="multi_display_mode" />
+ <meta-data android:name="CddTest" android:value="2.2.3/3.8.4/H-1-1|3.8.3.3/C-1-1|3.8.3.3/C-1-3" />
</activity>
<activity android:name=".notifications.ToastVerifierActivity"
@@ -3243,6 +3247,8 @@
<meta-data android:name="test_category" android:value="@string/test_category_notifications" />
<meta-data android:name="display_mode"
android:value="multi_display_mode" />
+ <meta-data android:name="ApiTest"
+ android:value="android.widget.Toast#makeText" />
</activity>
<activity android:name=".notifications.BubblesVerifierActivity"
@@ -3257,6 +3263,8 @@
android:value="android.hardware.type.watch:android.software.leanback:android.hardware.type.automotive" />
<meta-data android:name="display_mode"
android:value="multi_display_mode" />
+ <meta-data android:name="ApiTest"
+ android:value="android.app.Notification.Builder#setBubbleMetadata|android.app.NotificationManager#notify" />
</activity>
<activity android:name=".notifications.BubbleActivity"
@@ -3312,6 +3320,7 @@
android:value="android.hardware.type.watch:android.software.leanback:android.hardware.type.automotive" />
<meta-data android:name="display_mode"
android:value="multi_display_mode" />
+ <meta-data android:name="CddTest" android:value="3.8.1/C-4-1" />
</activity>
<activity android:name=".qstiles.TileServiceVerifierActivity"
diff --git a/apps/CtsVerifier/res/values/strings.xml b/apps/CtsVerifier/res/values/strings.xml
index 7d34865c2ac..131228adad8 100644
--- a/apps/CtsVerifier/res/values/strings.xml
+++ b/apps/CtsVerifier/res/values/strings.xml
@@ -311,6 +311,7 @@
</string>
<string name="clipboard_preview_test_instructions">
Press the \'Copy\' button to copy the secret code to the clipboard.
+ \nDo not press any other buttons after you press the \'Copy\' button.
\n\n If nothing happens, press Fail.
\n\n If you see the word "FAIL" appear on screen, press Fail.
\n\n If you see a confirmation that content has been copied to the clipboard, press Pass.
diff --git a/tests/tests/security/src/android/security/cts/CVE_2022_20135.java b/tests/tests/security/src/android/security/cts/CVE_2022_20135.java
new file mode 100644
index 00000000000..2789ff85d10
--- /dev/null
+++ b/tests/tests/security/src/android/security/cts/CVE_2022_20135.java
@@ -0,0 +1,67 @@
+/*
+ * Copyright (C) 2022 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.security.cts;
+
+import static org.junit.Assume.assumeNoException;
+import static org.junit.Assume.assumeNotNull;
+
+import android.os.Bundle;
+import android.os.Parcel;
+import android.os.Parcelable;
+import android.platform.test.annotations.AppModeFull;
+import android.platform.test.annotations.AsbSecurityTest;
+
+import androidx.test.runner.AndroidJUnit4;
+
+import com.android.sts.common.util.StsExtraBusinessLogicTestCase;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import java.lang.reflect.Field;
+
+@AppModeFull
+@RunWith(AndroidJUnit4.class)
+public class CVE_2022_20135 extends StsExtraBusinessLogicTestCase {
+
+ @Test
+ @AsbSecurityTest(cveBugId = 220303465)
+ public void testPocCVE_2022_20135() {
+ Bundle bundle = new Bundle();
+ try {
+ Class clazz = Class.forName("android.service.gatekeeper.GateKeeperResponse");
+ assumeNotNull(clazz);
+ Object obj = clazz.getMethod("createGenericResponse", int.class).invoke(null, 0);
+ assumeNotNull(obj);
+ Field field = clazz.getDeclaredField("mPayload");
+ assumeNotNull(field);
+ field.setAccessible(true);
+ field.set(obj, new byte[0]);
+ bundle.putParcelable("1", (Parcelable) obj);
+ bundle.putByteArray("2", new byte[1000]);
+ } catch (Exception ex) {
+ assumeNoException(ex);
+ }
+ Parcel parcel = Parcel.obtain();
+ assumeNotNull(parcel);
+ parcel.writeBundle(bundle);
+ parcel.setDataPosition(0);
+ Bundle newBundle = new Bundle();
+ newBundle.readFromParcel(parcel);
+ newBundle.keySet();
+ }
+}