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

Commit 96aeb7f3 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

release-request-7bfcab52-d1c0-4256-9d6b-5b5092bc78ca-for-git_oc-mr1-release-41...

release-request-7bfcab52-d1c0-4256-9d6b-5b5092bc78ca-for-git_oc-mr1-release-4133428 snap-temp-L95800000077479875

Change-Id: I013f89119ceed8fa78664b6d052a5331bb22d09d
parents 12f56862 2d4b941f
Loading
Loading
Loading
Loading
+16 −7
Original line number Diff line number Diff line
@@ -585,20 +585,26 @@ enum VmsMessageType : int32_t {
  /** A client publishes a data packet. */
  DATA = 3,

  /* A client declaring layers offering. */
  /** A client declaring layers offering. */
  OFFERING = 4,

  /* Requesting the list of available layers. */
  /** Requesting the list of available layers. */
  AVAILABILITY_REQUEST = 5,

  /* Returning the list of available layers. */
  /** Returning the list of available layers. */
  AVAILABILITY_RESPONSE = 6,

  /** Sending to the HAL the current list of the available layers. */
  AVAILABILITY_CHANGE = 7,

  /** Requesting layers that have subscribers. */
  SUBSCRIPTION_REQUEST = 7,
  SUBSCRIPTIONS_REQUEST = 8,

  /** Returning layers that have subscribers. */
  SUBSCRIPTION_RESPONSE = 8,
  SUBSCRIPTIONS_RESPONSE = 9,

  /** Sending to the HAL the current list of the subscribed layers. */
  SUBSCRIPTIONS_CHANGE = 10,
};

/**
@@ -630,11 +636,14 @@ enum VmsSimpleMessageIntegerValuesIndex : VmsBaseMessageIntegerValuesIndex {
 * value properties
 */
enum VmsOfferingMessageIntegerValuesIndex : VmsBaseMessageIntegerValuesIndex {
  /* The ID assigend to the publisher by the VMS core. */
  PUBLISHER_ID = 1,

  /* The number of VMS layer dependencies. */
  VMS_NUMBER_OF_LAYERS_DEPENDENCIES = 1,
  VMS_NUMBER_OF_LAYERS_DEPENDENCIES = 2,

  /* The first index that contain dependencies */
  FIRST_DEPENDENCIES_INDEX = 2,
  FIRST_DEPENDENCIES_INDEX = 3,
};

/**
+8 −4
Original line number Diff line number Diff line
@@ -116,7 +116,7 @@ CameraDevice::~CameraDevice() {
    Mutex::Autolock _l(mLock);
    if (mDevice != nullptr) {
        ALOGW("%s: camera %s is deleted while open", __FUNCTION__, mCameraId.c_str());
        close();
        closeLocked();
    }
    mHalPreviewWindow.cleanUpCirculatingBuffers();
}
@@ -130,7 +130,7 @@ void CameraDevice::setConnectionStatus(bool connected) {
    }
    if (!connected) {
        ALOGW("%s: camera %s is disconneted. Closing", __FUNCTION__, mCameraId.c_str());
        close();
        closeLocked();
    }
    return;
}
@@ -982,8 +982,13 @@ Return<Status> CameraDevice::sendCommand(CommandType cmd, int32_t arg1, int32_t
}

Return<void> CameraDevice::close() {
    ALOGI("Closing camera %s", mCameraId.c_str());
    Mutex::Autolock _l(mLock);
    closeLocked();
    return Void();
}

void CameraDevice::closeLocked() {
    ALOGI("Closing camera %s", mCameraId.c_str());
    if(mDevice) {
        int rc = mDevice->common.close(&mDevice->common);
        if (rc != OK) {
@@ -991,7 +996,6 @@ Return<void> CameraDevice::close() {
        }
        mDevice = nullptr;
    }
    return Void();
}

}  // namespace implementation
+1 −0
Original line number Diff line number Diff line
@@ -222,6 +222,7 @@ private:
    static status_t getStatusT(const Status& s);

    Status initStatus() const;
    void closeLocked();
};

}  // namespace implementation
+71 −32
Original line number Diff line number Diff line
@@ -247,7 +247,8 @@ string bin2hex(const hidl_vec<uint8_t>& data) {
    return retval;
}

string rsa_key = hex2str("30820275020100300d06092a864886f70d01010105000482025f3082025b"
string rsa_key = hex2str(
    "30820275020100300d06092a864886f70d01010105000482025f3082025b"
    "02010002818100c6095409047d8634812d5a218176e45c41d60a75b13901"
    "f234226cffe776521c5a77b9e389417b71c0b6a44d13afe4e4a2805d46c9"
    "da2935adb1ff0c1f24ea06e62b20d776430a4d435157233c6f916783c30e"
@@ -270,12 +271,24 @@ string rsa_key = hex2str("30820275020100300d06092a864886f70d01010105000482025f30
    "d5f33645e8ed8b4a1cb3cc4a1d67987399f2a09f5b3fb68c88d5e5d90ac3"
    "3492d6");

string ec_key = hex2str("308187020100301306072a8648ce3d020106082a8648ce3d030107046d30"
string ec_256_key = hex2str(
    "308187020100301306072a8648ce3d020106082a8648ce3d030107046d30"
    "6b0201010420737c2ecd7b8d1940bf2930aa9b4ed3ff941eed09366bc032"
    "99986481f3a4d859a14403420004bf85d7720d07c25461683bc648b4778a"
    "9a14dd8a024e3bdd8c7ddd9ab2b528bbc7aa1b51f14ebbbb0bd0ce21bcc4"
    "1c6eb00083cf3376d11fd44949e0b2183bfe");

string ec_521_key = hex2str(
    "3081EE020100301006072A8648CE3D020106052B810400230481D63081D3"
    "02010104420011458C586DB5DAA92AFAB03F4FE46AA9D9C3CE9A9B7A006A"
    "8384BEC4C78E8E9D18D7D08B5BCFA0E53C75B064AD51C449BAE0258D54B9"
    "4B1E885DED08ED4FB25CE9A1818903818600040149EC11C6DF0FA122C6A9"
    "AFD9754A4FA9513A627CA329E349535A5629875A8ADFBE27DCB932C05198"
    "6377108D054C28C6F39B6F2C9AF81802F9F326B842FF2E5F3C00AB7635CF"
    "B36157FC0882D574A10D839C1A0C049DC5E0D775E2EE50671A208431BB45"
    "E78E70BEFE930DB34818EE4D5C26259F5C6B8E28A652950F9F88D7B4B2C9"
    "D9");

struct RSA_Delete {
    void operator()(RSA* p) { RSA_free(p); }
};
@@ -2385,14 +2398,14 @@ TEST_F(ImportKeyTest, RsaPublicExponentMismatch) {
/*
 * ImportKeyTest.EcdsaSuccess
 *
 * Verifies that importing and using an ECDSA key pair works correctly.
 * Verifies that importing and using an ECDSA P-256 key pair works correctly.
 */
TEST_F(ImportKeyTest, EcdsaSuccess) {
    ASSERT_EQ(ErrorCode::OK, ImportKey(AuthorizationSetBuilder()
                                           .Authorization(TAG_NO_AUTH_REQUIRED)
                                           .EcdsaSigningKey(256)
                                           .Digest(Digest::SHA_2_256),
                                       KeyFormat::PKCS8, ec_key))
                                       KeyFormat::PKCS8, ec_256_key))
        << "(Possibly b/33945114)";

    CheckKm0CryptoParam(TAG_ALGORITHM, Algorithm::EC);
@@ -2408,6 +2421,32 @@ TEST_F(ImportKeyTest, EcdsaSuccess) {
    VerifyMessage(message, signature, params);
}

/*
 * ImportKeyTest.Ecdsa521Success
 *
 * Verifies that importing and using an ECDSA P-521 key pair works correctly.
 */
TEST_F(ImportKeyTest, Ecdsa521Success) {
    ASSERT_EQ(ErrorCode::OK, ImportKey(AuthorizationSetBuilder()
                                           .Authorization(TAG_NO_AUTH_REQUIRED)
                                           .EcdsaSigningKey(521)
                                           .Digest(Digest::SHA_2_256),
                                       KeyFormat::PKCS8, ec_521_key))
        << "(Possibly b/33945114)";

    CheckKm0CryptoParam(TAG_ALGORITHM, Algorithm::EC);
    CheckKm0CryptoParam(TAG_KEY_SIZE, 521U);
    CheckKm1CryptoParam(TAG_DIGEST, Digest::SHA_2_256);
    CheckKm2CryptoParam(TAG_EC_CURVE, EcCurve::P_521);

    CheckOrigin();

    string message(32, 'a');
    auto params = AuthorizationSetBuilder().Digest(Digest::SHA_2_256);
    string signature = SignMessage(message, params);
    VerifyMessage(message, signature, params);
}

/*
 * ImportKeyTest.EcdsaSizeMismatch
 *
@@ -2419,7 +2458,7 @@ TEST_F(ImportKeyTest, EcdsaSizeMismatch) {
              ImportKey(AuthorizationSetBuilder()
                            .EcdsaSigningKey(224 /* Doesn't match key */)
                            .Digest(Digest::NONE),
                        KeyFormat::PKCS8, ec_key));
                        KeyFormat::PKCS8, ec_256_key));
}

/*
@@ -2438,7 +2477,7 @@ TEST_F(ImportKeyTest, EcdsaCurveMismatch) {
              ImportKey(AuthorizationSetBuilder()
                            .EcdsaSigningKey(EcCurve::P_224 /* Doesn't match key */)
                            .Digest(Digest::NONE),
                        KeyFormat::PKCS8, ec_key))
                        KeyFormat::PKCS8, ec_256_key))
        << "(Possibly b/36233241)";
}

+7 −6
Original line number Diff line number Diff line
@@ -568,7 +568,8 @@ void waitOnInputConsumption(sp<IOmxNode> omxNode, sp<CodecObserver> observer,
                            android::Vector<BufferInfo>* iBuffer,
                            android::Vector<BufferInfo>* oBuffer,
                            OMX_AUDIO_CODINGTYPE eEncoding,
                            OMX_U32 kPortIndexInput, OMX_U32 kPortIndexOutput) {
                            OMX_U32 kPortIndexInput, OMX_U32 kPortIndexOutput,
                            AudioDecHidlTest::standardComp comp) {
    android::hardware::media::omx::V1_0::Status status;
    Message msg;
    int timeOut = TIMEOUT_COUNTER;
@@ -580,7 +581,7 @@ void waitOnInputConsumption(sp<IOmxNode> omxNode, sp<CodecObserver> observer,
        if (status == android::hardware::media::omx::V1_0::Status::OK) {
            EXPECT_EQ(msg.type, Message::Type::EVENT);
            portReconfiguration(omxNode, observer, iBuffer, oBuffer, eEncoding,
                                kPortIndexInput, kPortIndexOutput, msg);
                                kPortIndexInput, kPortIndexOutput, msg, comp);
        }
        // status == TIMED_OUT, it could be due to process time being large
        // than DEFAULT_TIMEOUT or component needs output buffers to start
@@ -789,7 +790,7 @@ TEST_F(AudioDecHidlTest, DecodeTest) {
                  (int)Info.size(), compName);
    eleStream.close();
    waitOnInputConsumption(omxNode, observer, &iBuffer, &oBuffer, eEncoding,
                           kPortIndexInput, kPortIndexOutput);
                           kPortIndexInput, kPortIndexOutput, compName);
    testEOS(omxNode, observer, &iBuffer, &oBuffer, false, eosFlag);
    EXPECT_EQ(timestampUslist.empty(), true);
    // set state to idle
@@ -933,7 +934,7 @@ TEST_F(AudioDecHidlTest, ThumbnailTest) {
                  compName);
    eleStream.close();
    waitOnInputConsumption(omxNode, observer, &iBuffer, &oBuffer, eEncoding,
                           kPortIndexInput, kPortIndexOutput);
                           kPortIndexInput, kPortIndexOutput, compName);
    testEOS(omxNode, observer, &iBuffer, &oBuffer, false, eosFlag);
    flushPorts(omxNode, observer, &iBuffer, &oBuffer, kPortIndexInput,
               kPortIndexOutput);
@@ -949,7 +950,7 @@ TEST_F(AudioDecHidlTest, ThumbnailTest) {
                  compName, false);
    eleStream.close();
    waitOnInputConsumption(omxNode, observer, &iBuffer, &oBuffer, eEncoding,
                           kPortIndexInput, kPortIndexOutput);
                           kPortIndexInput, kPortIndexOutput, compName);
    testEOS(omxNode, observer, &iBuffer, &oBuffer, true, eosFlag);
    flushPorts(omxNode, observer, &iBuffer, &oBuffer, kPortIndexInput,
               kPortIndexOutput);
@@ -1034,7 +1035,7 @@ TEST_F(AudioDecHidlTest, SimpleEOSTest) {
                  (int)Info.size(), compName, false);
    eleStream.close();
    waitOnInputConsumption(omxNode, observer, &iBuffer, &oBuffer, eEncoding,
                           kPortIndexInput, kPortIndexOutput);
                           kPortIndexInput, kPortIndexOutput, compName);
    testEOS(omxNode, observer, &iBuffer, &oBuffer, true, eosFlag);
    flushPorts(omxNode, observer, &iBuffer, &oBuffer, kPortIndexInput,
               kPortIndexOutput);
Loading