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

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

Snap for 8437770 from da91f729 to tm-release

Change-Id: Ia076d98cb19ab471619ba3838dd20666c0465b11
parents 197e08bb da91f729
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -80,8 +80,9 @@ class ComposerClientWriter {
        getDisplayCommand(display).colorTransformMatrix.emplace(std::move(matVec));
    }

    void setDisplayBrightness(int64_t display, float brightness) {
        getDisplayCommand(display).brightness.emplace(DisplayBrightness{.brightness = brightness});
    void setDisplayBrightness(int64_t display, float brightness, float brightnessNits) {
        getDisplayCommand(display).brightness.emplace(
                DisplayBrightness{.brightness = brightness, .brightnessNits = brightnessNits});
    }

    void setClientTarget(int64_t display, uint32_t slot, const native_handle_t* target,
+1 −1
Original line number Diff line number Diff line
@@ -974,7 +974,7 @@ TEST_P(GraphicsCompositionTest, SetLayerBrightnessDims) {
    // Preconditions to successfully run are knowing the max brightness and successfully applying
    // the max brightness
    ASSERT_GT(maxBrightnessNits, 0.f);
    mWriter.setDisplayBrightness(getPrimaryDisplayId(), /*brightness*/ 1.f);
    mWriter.setDisplayBrightness(getPrimaryDisplayId(), /*brightness*/ 1.f, maxBrightnessNits);
    execute();
    ASSERT_TRUE(mReader.takeErrors().empty());

+7 −7
Original line number Diff line number Diff line
@@ -1374,7 +1374,7 @@ TEST_P(GraphicsComposerAidlCommandTest, SetDisplayBrightness) {
    bool brightnessSupport = std::find(capabilities.begin(), capabilities.end(),
                                       DisplayCapability::BRIGHTNESS) != capabilities.end();
    if (!brightnessSupport) {
        mWriter.setDisplayBrightness(getPrimaryDisplayId(), /*brightness*/ 0.5f);
        mWriter.setDisplayBrightness(getPrimaryDisplayId(), /*brightness*/ 0.5f, -1.f);
        execute();
        const auto errors = mReader.takeErrors();
        EXPECT_EQ(1, errors.size());
@@ -1383,23 +1383,23 @@ TEST_P(GraphicsComposerAidlCommandTest, SetDisplayBrightness) {
        return;
    }

    mWriter.setDisplayBrightness(getPrimaryDisplayId(), /*brightness*/ 0.0f);
    mWriter.setDisplayBrightness(getPrimaryDisplayId(), /*brightness*/ 0.0f, -1.f);
    execute();
    EXPECT_TRUE(mReader.takeErrors().empty());

    mWriter.setDisplayBrightness(getPrimaryDisplayId(), /*brightness*/ 0.5f);
    mWriter.setDisplayBrightness(getPrimaryDisplayId(), /*brightness*/ 0.5f, -1.f);
    execute();
    EXPECT_TRUE(mReader.takeErrors().empty());

    mWriter.setDisplayBrightness(getPrimaryDisplayId(), /*brightness*/ 1.0f);
    mWriter.setDisplayBrightness(getPrimaryDisplayId(), /*brightness*/ 1.0f, -1.f);
    execute();
    EXPECT_TRUE(mReader.takeErrors().empty());

    mWriter.setDisplayBrightness(getPrimaryDisplayId(), /*brightness*/ -1.0f);
    mWriter.setDisplayBrightness(getPrimaryDisplayId(), /*brightness*/ -1.0f, -1.f);
    execute();
    EXPECT_TRUE(mReader.takeErrors().empty());

    mWriter.setDisplayBrightness(getPrimaryDisplayId(), /*brightness*/ 2.0f);
    mWriter.setDisplayBrightness(getPrimaryDisplayId(), /*brightness*/ 2.0f, -1.f);
    execute();
    {
        const auto errors = mReader.takeErrors();
@@ -1407,7 +1407,7 @@ TEST_P(GraphicsComposerAidlCommandTest, SetDisplayBrightness) {
        EXPECT_EQ(IComposerClient::EX_BAD_PARAMETER, errors[0].errorCode);
    }

    mWriter.setDisplayBrightness(getPrimaryDisplayId(), /*brightness*/ -2.0f);
    mWriter.setDisplayBrightness(getPrimaryDisplayId(), /*brightness*/ -2.0f, -1.f);
    execute();
    {
        const auto errors = mReader.takeErrors();
+2 −2
Original line number Diff line number Diff line
@@ -2866,8 +2866,8 @@ TEST_P(EncryptionOperationsTest, AesEcbPkcs7PaddingCorrupted) {

        EXPECT_EQ(ErrorCode::OK, Begin(KeyPurpose::DECRYPT, params));
        string plaintext;
        ErrorCode error = Finish(message, &plaintext);
        if (error == ErrorCode::INVALID_INPUT_LENGTH) {
        ErrorCode error = Finish(ciphertext, &plaintext);
        if (error == ErrorCode::INVALID_ARGUMENT) {
            // This is the expected error, we can exit the test now.
            return;
        } else {
+2 −1
Original line number Diff line number Diff line
@@ -242,7 +242,8 @@ interface IKeyMintOperation {
     *   not a multiple of the AES block size, finish() must return
     *   ErrorCode::INVALID_INPUT_LENGTH.  If padding is PaddingMode::PKCS7, pad the data per the
     *   PKCS#7 specification, including adding an additional padding block if the data is a
     *   multiple of the block length.
     *   multiple of the block length.  If padding is PaddingMode::PKCS7 and decryption does not
     *   result in valid padding, return ErrorCode::INVALID_ARGUMENT.
     *
     * o BlockMode::GCM.  During encryption, after processing all plaintext, compute the tag
     *   (Tag::MAC_LENGTH bytes) and append it to the returned ciphertext.  During decryption,
Loading