From 4285aa8a5ecf7e9fcf0fdcd07a1dc9c0dced273d Mon Sep 17 00:00:00 2001 From: David Zeuthen Date: Tue, 28 Mar 2023 17:20:41 -0400 Subject: [PATCH 1/2] identity: Remove IdentityCredentialImplementedTest. Android 14 VSR no longer requires Identity Credential at feature version 202301 or later. Remove the test which was added to verify this. Test: m Bug: 249767070 Change-Id: Id767e7b9ee97a30741899afcec6895f57993642e --- identity/aidl/vts/Android.bp | 12 ---- .../vts/IdentityCredentialImplementedTest.xml | 22 ------ .../IdentityCredentialImplementedTest.java | 68 ------------------- 3 files changed, 102 deletions(-) delete mode 100644 identity/aidl/vts/IdentityCredentialImplementedTest.xml delete mode 100644 identity/aidl/vts/src/com/android/tests/security/identity/IdentityCredentialImplementedTest.java diff --git a/identity/aidl/vts/Android.bp b/identity/aidl/vts/Android.bp index d8a5a87f7b..6f7ab541c9 100644 --- a/identity/aidl/vts/Android.bp +++ b/identity/aidl/vts/Android.bp @@ -61,15 +61,3 @@ cc_test { ], require_root: true, } - -java_test_host { - name: "IdentityCredentialImplementedTest", - libs: [ - "tradefed", - ], - srcs: ["src/**/*.java"], - test_suites: [ - "vts", - ], - test_config: "IdentityCredentialImplementedTest.xml", -} diff --git a/identity/aidl/vts/IdentityCredentialImplementedTest.xml b/identity/aidl/vts/IdentityCredentialImplementedTest.xml deleted file mode 100644 index 4276ae6e94..0000000000 --- a/identity/aidl/vts/IdentityCredentialImplementedTest.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - diff --git a/identity/aidl/vts/src/com/android/tests/security/identity/IdentityCredentialImplementedTest.java b/identity/aidl/vts/src/com/android/tests/security/identity/IdentityCredentialImplementedTest.java deleted file mode 100644 index 4936f8cc26..0000000000 --- a/identity/aidl/vts/src/com/android/tests/security/identity/IdentityCredentialImplementedTest.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * 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 com.android.tests.security.identity; - -import static org.junit.Assert.fail; -import static org.junit.Assume.assumeTrue; - -import android.platform.test.annotations.RequiresDevice; -import com.android.tradefed.device.DeviceNotAvailableException; -import com.android.tradefed.testtype.DeviceJUnit4ClassRunner; -import com.android.tradefed.testtype.junit4.BaseHostJUnit4Test; -import org.junit.Test; -import org.junit.runner.RunWith; - -// This is a host-test which executes shell commands on the device. It would be -// nicer to have this be a Device test (like CTS) but this is currently not -// possible, see https://source.android.com/docs/core/tests/vts - -@RunWith(DeviceJUnit4ClassRunner.class) -public class IdentityCredentialImplementedTest extends BaseHostJUnit4Test { - // Returns the ro.vendor.api_level or 0 if not set. - // - // Throws NumberFormatException if ill-formatted. - // - // Throws DeviceNotAvailableException if device is not available. - // - private int getVendorApiLevel() throws NumberFormatException, DeviceNotAvailableException { - String vendorApiLevelString = - getDevice().executeShellCommand("getprop ro.vendor.api_level").trim(); - if (vendorApiLevelString.isEmpty()) { - return 0; - } - return Integer.parseInt(vendorApiLevelString); - } - - // As of Android 14 VSR (vendor API level 34), Identity Credential is required at feature - // version 202301 or later. - @RequiresDevice - @Test - public void testIdentityCredentialIsImplemented() throws Exception { - int vendorApiLevel = getVendorApiLevel(); - assumeTrue(vendorApiLevel >= 34); - - final String minimumFeatureVersionNeeded = "202301"; - - String result = getDevice().executeShellCommand( - "pm has-feature android.hardware.identity_credential " - + minimumFeatureVersionNeeded); - if (!result.trim().equals("true")) { - fail("Identity Credential feature version " + minimumFeatureVersionNeeded - + " required but not found"); - } - } -} From 6533cb70614071c4de2b658e17f00ea9039c04bf Mon Sep 17 00:00:00 2001 From: David Zeuthen Date: Wed, 29 Mar 2023 09:45:01 -0400 Subject: [PATCH 2/2] identity: Add bug component ID. Test: m Bug: N/A Change-Id: I993b40d7ff84e73fcf859720978a604b878d61f9 --- identity/OWNERS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/identity/OWNERS b/identity/OWNERS index 6969910ce5..9353bbcdd5 100644 --- a/identity/OWNERS +++ b/identity/OWNERS @@ -1,2 +1,4 @@ +# Bug component: 1084909 + swillden@google.com zeuthen@google.com