Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d7dc6fee authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 8355735 from 581b7b11 to tm-d1-release

Change-Id: I5fd332508a8a9c59ad9469c8dd56041c44f4b4bd
parents 41fb8f8f 581b7b11
Loading
Loading
Loading
Loading
+7 −6
Original line number Original line Diff line number Diff line
@@ -2989,8 +2989,8 @@ TEST_P(CameraAidlTest, configureStreamsUseCases) {
        auto retcode = find_camera_metadata_ro_entry(
        auto retcode = find_camera_metadata_ro_entry(
                staticMeta, ANDROID_SCALER_AVAILABLE_STREAM_USE_CASES, &entry);
                staticMeta, ANDROID_SCALER_AVAILABLE_STREAM_USE_CASES, &entry);
        if ((0 == retcode) && (entry.count > 0)) {
        if ((0 == retcode) && (entry.count > 0)) {
            supportedUseCases.insert(supportedUseCases.end(), entry.data.i32,
            supportedUseCases.insert(supportedUseCases.end(), entry.data.i64,
                                     entry.data.i32 + entry.count);
                                     entry.data.i64 + entry.count);
        } else {
        } else {
            supportedUseCases.push_back(ANDROID_SCALER_AVAILABLE_STREAM_USE_CASES_DEFAULT);
            supportedUseCases.push_back(ANDROID_SCALER_AVAILABLE_STREAM_USE_CASES_DEFAULT);
        }
        }
@@ -3034,12 +3034,13 @@ TEST_P(CameraAidlTest, configureStreamsUseCases) {


            bool combSupported;
            bool combSupported;
            ret = cameraDevice->isStreamCombinationSupported(config, &combSupported);
            ret = cameraDevice->isStreamCombinationSupported(config, &combSupported);
            ASSERT_TRUE((ret.isOk()) || (static_cast<int32_t>(Status::OPERATION_NOT_SUPPORTED) ==
            if (static_cast<int32_t>(Status::OPERATION_NOT_SUPPORTED) ==
                                         ret.getServiceSpecificError()));
                ret.getServiceSpecificError()) {
            if (ret.isOk()) {
                continue;
                ASSERT_EQ(combSupported, useCaseSupported);
            }
            }

            ASSERT_TRUE(ret.isOk());
            ASSERT_TRUE(ret.isOk());
            ASSERT_EQ(combSupported, useCaseSupported);


            std::vector<HalStream> halStreams;
            std::vector<HalStream> halStreams;
            ret = mSession->configureStreams(config, &halStreams);
            ret = mSession->configureStreams(config, &halStreams);
+6 −1
Original line number Original line Diff line number Diff line
@@ -29,7 +29,12 @@ enum DimmingStage {
     */
     */
    LINEAR = 1,
    LINEAR = 1,
    /**
    /**
     * Dimming operations must be applied in gamma space, after OETF has been applied
     * Dimming operations must be applied in gamma space, after OETF has been applied.
     * Note that for this dimming operation to be perceptually correct it must also be gamma
     * corrected. The framework will assume that it is able to use the gamma 2.2
     * power function for gamma correcting the dimming matrix, for simplicity of
     * implementation and the fact that gamma 2.2 is close enough to typical SDR
     * transfer functions that would be used for the client target.
     */
     */
    GAMMA_OETF = 2,
    GAMMA_OETF = 2,
}
}
+4 −2
Original line number Original line Diff line number Diff line
@@ -61,13 +61,15 @@ parcelable KeyCreationResult {
     * the non-attestation case, whether the key can self-sign.
     * the non-attestation case, whether the key can self-sign.
     *
     *
     * 1.  Asymmetric key attestation with factory key.  If Tag::ATTESTATION_CHALLENGE is provided
     * 1.  Asymmetric key attestation with factory key.  If Tag::ATTESTATION_CHALLENGE is provided
     *     and the `attestationKey` parameter on the generate/import call is null, the returned
     *     and the `attestationKey` parameter on the generate/import call is null, and if the
     *     KeyMint implementation supports factory-provisioned attestation keys, the returned
     *     certificate chain must contain an attestation certificate signed with a factory-
     *     certificate chain must contain an attestation certificate signed with a factory-
     *     provisioned attestation key, and the full certificate chain for that factory-provisioned
     *     provisioned attestation key, and the full certificate chain for that factory-provisioned
     *     attestation key.  Tag::ATTESTATION_APPLICATION_ID must also be provided when the
     *     attestation key.  Tag::ATTESTATION_APPLICATION_ID must also be provided when the
     *     ATTESTATION_CHALLENGE is provided, otherwise ATTESTATION_APPLICATION_ID_MISSING will be
     *     ATTESTATION_CHALLENGE is provided, otherwise ATTESTATION_APPLICATION_ID_MISSING will be
     *     returned.  KeyMint implementations are not required to support factory-provisioned
     *     returned.  KeyMint implementations are not required to support factory-provisioned
     *     attestation keys.
     *     attestation keys. If the KeyMint implementation does not support factory-provisioned
     *     keys, it must return ATTESTATION_KEYS_NOT_PROVISIONED.
     *
     *
     * 2.  Asymmetric key attestation with caller-provided key.  If Tag::ATTESTATION_CHALLENGE is
     * 2.  Asymmetric key attestation with caller-provided key.  If Tag::ATTESTATION_CHALLENGE is
     *     provided and the `attestationKey` parameter on the generate/import call is non-null and
     *     provided and the `attestationKey` parameter on the generate/import call is non-null and
+24 −0
Original line number Original line Diff line number Diff line
@@ -312,6 +312,30 @@ ErrorCode KeyMintAidlTestBase::GenerateKey(const AuthorizationSet& key_desc,
    return GenerateKey(key_desc, attest_key, &key_blob_, &key_characteristics_, &cert_chain_);
    return GenerateKey(key_desc, attest_key, &key_blob_, &key_characteristics_, &cert_chain_);
}
}


ErrorCode KeyMintAidlTestBase::GenerateKeyWithSelfSignedAttestKey(
        const AuthorizationSet& attest_key_desc, const AuthorizationSet& key_desc,
        vector<uint8_t>* key_blob, vector<KeyCharacteristics>* key_characteristics,
        vector<Certificate>* cert_chain) {
    AttestationKey attest_key;
    vector<Certificate> attest_cert_chain;
    vector<KeyCharacteristics> attest_key_characteristics;
    // Generate a key with self signed attestation.
    auto error = GenerateKey(attest_key_desc, std::nullopt, &attest_key.keyBlob,
                             &attest_key_characteristics, &attest_cert_chain);
    if (error != ErrorCode::OK) {
        return error;
    }

    attest_key.issuerSubjectName = make_name_from_str("Android Keystore Key");
    // Generate a key, by passing the above self signed attestation key as attest key.
    error = GenerateKey(key_desc, attest_key, key_blob, key_characteristics, cert_chain);
    if (error == ErrorCode::OK) {
        // Append the attest_cert_chain to the attested cert_chain to yield a valid cert chain.
        cert_chain->push_back(attest_cert_chain[0]);
    }
    return error;
}

ErrorCode KeyMintAidlTestBase::ImportKey(const AuthorizationSet& key_desc, KeyFormat format,
ErrorCode KeyMintAidlTestBase::ImportKey(const AuthorizationSet& key_desc, KeyFormat format,
                                         const string& key_material, vector<uint8_t>* key_blob,
                                         const string& key_material, vector<uint8_t>* key_blob,
                                         vector<KeyCharacteristics>* key_characteristics) {
                                         vector<KeyCharacteristics>* key_characteristics) {
+15 −0
Original line number Original line Diff line number Diff line
@@ -96,6 +96,21 @@ class KeyMintAidlTestBase : public ::testing::TestWithParam<string> {
    ErrorCode GenerateKey(const AuthorizationSet& key_desc,
    ErrorCode GenerateKey(const AuthorizationSet& key_desc,
                          const optional<AttestationKey>& attest_key = std::nullopt);
                          const optional<AttestationKey>& attest_key = std::nullopt);


    // Generate key for implementations which do not support factory attestation.
    ErrorCode GenerateKeyWithSelfSignedAttestKey(const AuthorizationSet& attest_key_desc,
                                                 const AuthorizationSet& key_desc,
                                                 vector<uint8_t>* key_blob,
                                                 vector<KeyCharacteristics>* key_characteristics,
                                                 vector<Certificate>* cert_chain);

    ErrorCode GenerateKeyWithSelfSignedAttestKey(const AuthorizationSet& attest_key_desc,
                                                 const AuthorizationSet& key_desc,
                                                 vector<uint8_t>* key_blob,
                                                 vector<KeyCharacteristics>* key_characteristics) {
        return GenerateKeyWithSelfSignedAttestKey(attest_key_desc, key_desc, key_blob,
                                                  key_characteristics, &cert_chain_);
    }

    ErrorCode ImportKey(const AuthorizationSet& key_desc, KeyFormat format,
    ErrorCode ImportKey(const AuthorizationSet& key_desc, KeyFormat format,
                        const string& key_material, vector<uint8_t>* key_blob,
                        const string& key_material, vector<uint8_t>* key_blob,
                        vector<KeyCharacteristics>* key_characteristics);
                        vector<KeyCharacteristics>* key_characteristics);
Loading