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

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

Snap for 8352742 from bf9cc042 to tm-release

Change-Id: Icafc4fe6e369b4b7435a98f9eeddae5b8db23543
parents 8dc9182c bf9cc042
Loading
Loading
Loading
Loading
+14 −5
Original line number Original line Diff line number Diff line
@@ -118,6 +118,12 @@ static constexpr const char* kMntFuse = "/mnt/pass_through/0/";


static std::atomic<bool> sAppDataIsolationEnabled(false);
static std::atomic<bool> sAppDataIsolationEnabled(false);


/**
 * Flag to control if project ids are supported for internal storage
 */
static std::atomic<bool> sUsingProjectIdsFlag(false);
static std::once_flag flag;

namespace {
namespace {


constexpr const char* kDump = "android.permission.DUMP";
constexpr const char* kDump = "android.permission.DUMP";
@@ -460,11 +466,14 @@ done:
}
}
static bool internal_storage_has_project_id() {
static bool internal_storage_has_project_id() {
    // The following path is populated in setFirstBoot, so if this file is present
    // The following path is populated in setFirstBoot, so if this file is present
    // then project ids can be used.
    // then project ids can be used. Using call once to cache the result of this check

    // to avoid having to check the file presence again and again.
    std::call_once(flag, []() {
        auto using_project_ids =
        auto using_project_ids =
                StringPrintf("%smisc/installd/using_project_ids", android_data_dir.c_str());
                StringPrintf("%smisc/installd/using_project_ids", android_data_dir.c_str());
    return access(using_project_ids.c_str(), F_OK) == 0;
        sUsingProjectIdsFlag = access(using_project_ids.c_str(), F_OK) == 0;
    });
    return sUsingProjectIdsFlag;
}
}


static int prepare_app_dir(const std::string& path, mode_t target_mode, uid_t uid, gid_t gid,
static int prepare_app_dir(const std::string& path, mode_t target_mode, uid_t uid, gid_t gid,
+1 −0
Original line number Original line Diff line number Diff line
@@ -70,6 +70,7 @@ SurfaceControl::SurfaceControl(const sp<SurfaceControl>& other) {
    mLayerId = other->mLayerId;
    mLayerId = other->mLayerId;
    mWidth = other->mWidth;
    mWidth = other->mWidth;
    mHeight = other->mHeight;
    mHeight = other->mHeight;
    mFormat = other->mFormat;
    mCreateFlags = other->mCreateFlags;
    mCreateFlags = other->mCreateFlags;
}
}


+6 −6
Original line number Original line Diff line number Diff line
@@ -121,12 +121,12 @@ private:
    mutable sp<Surface>         mSurfaceData;
    mutable sp<Surface>         mSurfaceData;
    mutable sp<BLASTBufferQueue> mBbq;
    mutable sp<BLASTBufferQueue> mBbq;
    mutable sp<SurfaceControl> mBbqChild;
    mutable sp<SurfaceControl> mBbqChild;
    int32_t mLayerId;
    int32_t mLayerId = 0;
    uint32_t mTransformHint;
    uint32_t mTransformHint = 0;
    uint32_t mWidth;
    uint32_t mWidth = 0;
    uint32_t mHeight;
    uint32_t mHeight = 0;
    PixelFormat mFormat;
    PixelFormat mFormat = PIXEL_FORMAT_NONE;
    uint32_t mCreateFlags;
    uint32_t mCreateFlags = 0;
    uint64_t mFallbackFrameNumber = 100;
    uint64_t mFallbackFrameNumber = 100;
};
};


+0 −15
Original line number Original line Diff line number Diff line
@@ -995,21 +995,6 @@ TEST_F(InputSurfacesTest, drop_input_policy) {
    EXPECT_EQ(surface->consumeEvent(100), nullptr);
    EXPECT_EQ(surface->consumeEvent(100), nullptr);
}
}


TEST_F(InputSurfacesTest, layer_with_empty_crop_cannot_be_focused) {
    std::unique_ptr<InputSurface> bufferSurface =
            InputSurface::makeBufferInputSurface(mComposerClient, 100, 100);

    bufferSurface->showAt(50, 50, Rect::EMPTY_RECT);

    bufferSurface->requestFocus();
    EXPECT_EQ(bufferSurface->consumeEvent(100), nullptr);

    bufferSurface->showAt(50, 50, Rect::INVALID_RECT);

    bufferSurface->requestFocus();
    EXPECT_EQ(bufferSurface->consumeEvent(100), nullptr);
}

TEST_F(InputSurfacesTest, layer_with_valid_crop_can_be_focused) {
TEST_F(InputSurfacesTest, layer_with_valid_crop_can_be_focused) {
    std::unique_ptr<InputSurface> bufferSurface =
    std::unique_ptr<InputSurface> bufferSurface =
            InputSurface::makeBufferInputSurface(mComposerClient, 100, 100);
            InputSurface::makeBufferInputSurface(mComposerClient, 100, 100);
+15 −12
Original line number Original line Diff line number Diff line
@@ -872,8 +872,10 @@ void SkiaGLRenderEngine::drawLayersInternal(
            // save a snapshot of the activeSurface to use as input to the blur shaders
            // save a snapshot of the activeSurface to use as input to the blur shaders
            blurInput = activeSurface->makeImageSnapshot();
            blurInput = activeSurface->makeImageSnapshot();


            // TODO we could skip this step if we know the blur will cover the entire image
            // blit the offscreen framebuffer into the destination AHB, but only
            //  blit the offscreen framebuffer into the destination AHB
            // if there are blur regions. backgroundBlurRadius blurs the entire
            // image below, so it can skip this step.
            if (layer.blurRegions.size()) {
                SkPaint paint;
                SkPaint paint;
                paint.setBlendMode(SkBlendMode::kSrc);
                paint.setBlendMode(SkBlendMode::kSrc);
                if (CC_UNLIKELY(mCapture->isCaptureRunning())) {
                if (CC_UNLIKELY(mCapture->isCaptureRunning())) {
@@ -885,6 +887,7 @@ void SkiaGLRenderEngine::drawLayersInternal(
                } else {
                } else {
                    activeSurface->draw(dstCanvas, 0, 0, SkSamplingOptions(), &paint);
                    activeSurface->draw(dstCanvas, 0, 0, SkSamplingOptions(), &paint);
                }
                }
            }


            // assign dstCanvas to canvas and ensure that the canvas state is up to date
            // assign dstCanvas to canvas and ensure that the canvas state is up to date
            canvas = dstCanvas;
            canvas = dstCanvas;
Loading