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

Commit 570d8fc9 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 4722539 from 4610a203 to pi-release

Change-Id: Ieecafd73743b7bbcedae4ff453e59f912139d60d
parents 638c09b1 4610a203
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -356,8 +356,8 @@ static int prepare_app_dir(const std::string& path, mode_t target_mode, uid_t ui
 * Ensure that we have a hard-limit quota to protect against abusive apps;
 * they should never use more than 90% of blocks or 50% of inodes.
 */
static int prepare_app_quota(const std::unique_ptr<std::string>& uuid, const std::string& device,
        uid_t uid) {
static int prepare_app_quota(const std::unique_ptr<std::string>& uuid ATTRIBUTE_UNUSED,
        const std::string& device, uid_t uid) {
    // Skip when reserved blocks are protecting us against abusive apps
    if (android::base::GetBoolProperty(kPropHasReserved, false)) return 0;
    // Skip when device no quotas present
+1 −1
Original line number Diff line number Diff line
@@ -36,7 +36,7 @@
#define BYPASS_QUOTA 0
#define BYPASS_SDCARDFS 0

#define APPLY_HARD_QUOTAS 1
#define APPLY_HARD_QUOTAS 0

namespace android {
namespace installd {
+2 −1
Original line number Diff line number Diff line
@@ -287,7 +287,8 @@ public:
                              rotation) {}
    DisplayRenderArea(const sp<const DisplayDevice> device, Rect sourceCrop, uint32_t reqHeight,
                      uint32_t reqWidth, ISurfaceComposer::Rotation rotation)
          : RenderArea(reqHeight, reqWidth, rotation), mDevice(device), mSourceCrop(sourceCrop) {}
          : RenderArea(reqHeight, reqWidth, CaptureFill::OPAQUE, rotation), mDevice(device),
                              mSourceCrop(sourceCrop) {}

    const Transform& getTransform() const override { return mDevice->getTransform(); }
    Rect getBounds() const override { return mDevice->getBounds(); }
+9 −0
Original line number Diff line number Diff line
@@ -2,6 +2,15 @@

namespace android {

float RenderArea::getCaptureFillValue(CaptureFill captureFill) {
    switch(captureFill) {
        case CaptureFill::CLEAR:
            return 0.0f;
        case CaptureFill::OPAQUE:
        default:
            return 1.0f;
    }
}
/*
 * Checks that the requested width and height are valid and updates them to the render area
 * dimensions if they are set to 0
+10 −2
Original line number Diff line number Diff line
@@ -9,10 +9,15 @@
namespace android {

class RenderArea {

public:
    RenderArea(uint32_t reqHeight, uint32_t reqWidth,
    enum class CaptureFill {CLEAR, OPAQUE};

    static float getCaptureFillValue(CaptureFill captureFill);

    RenderArea(uint32_t reqHeight, uint32_t reqWidth, CaptureFill captureFill,
               ISurfaceComposer::Rotation rotation = ISurfaceComposer::eRotateNone)
          : mReqHeight(reqHeight), mReqWidth(reqWidth) {
          : mReqHeight(reqHeight), mReqWidth(reqWidth), mCaptureFill(captureFill) {
        mRotationFlags = Transform::fromRotation(rotation);
    }

@@ -35,10 +40,13 @@ public:
    Transform::orientation_flags getRotationFlags() const { return mRotationFlags; };
    status_t updateDimensions();

    CaptureFill getCaptureFill() const { return mCaptureFill; };

private:
    uint32_t mReqHeight;
    uint32_t mReqWidth;
    Transform::orientation_flags mRotationFlags;
    CaptureFill mCaptureFill;
};

} // namespace android
Loading