Loading graphics/composer/aidl/include/android/hardware/graphics/composer3/ComposerClientWriter.h +3 −2 Original line number Diff line number Diff line Loading @@ -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, Loading graphics/composer/aidl/vts/VtsHalGraphicsComposer3_ReadbackTest.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -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()); Loading graphics/composer/aidl/vts/VtsHalGraphicsComposer3_TargetTest.cpp +7 −7 Original line number Diff line number Diff line Loading @@ -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()); Loading @@ -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(); Loading @@ -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(); Loading keymaster/4.0/vts/functional/keymaster_hidl_hal_test.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -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 { Loading security/keymint/aidl/android/hardware/security/keymint/IKeyMintOperation.aidl +2 −1 Original line number Diff line number Diff line Loading @@ -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 Loading
graphics/composer/aidl/include/android/hardware/graphics/composer3/ComposerClientWriter.h +3 −2 Original line number Diff line number Diff line Loading @@ -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, Loading
graphics/composer/aidl/vts/VtsHalGraphicsComposer3_ReadbackTest.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -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()); Loading
graphics/composer/aidl/vts/VtsHalGraphicsComposer3_TargetTest.cpp +7 −7 Original line number Diff line number Diff line Loading @@ -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()); Loading @@ -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(); Loading @@ -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(); Loading
keymaster/4.0/vts/functional/keymaster_hidl_hal_test.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -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 { Loading
security/keymint/aidl/android/hardware/security/keymint/IKeyMintOperation.aidl +2 −1 Original line number Diff line number Diff line Loading @@ -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