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

Commit d1759e0a authored by chaviw's avatar chaviw
Browse files

Updated permission for layer trace proto file.

The layer trace proto file wasn't getting added to the bugreport because
it was missing the other read permission. Added the other read
permission and removed the user execute since it's not needed.

Test: File is added to bugreport
Change-Id: Iacf5455f0f552d2a866d5695a3182a1abe1371a8
parent 329f126b
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -188,8 +188,11 @@ void SurfaceTracing::writeProtoFileLocked() {
        ALOGE("Could not save the proto file! Permission denied");
        mLastErr = PERMISSION_DENIED;
    }
    if (!android::base::WriteStringToFile(output, kDefaultFileName, S_IRWXU | S_IRGRP, getuid(),
                                          getgid(), true)) {

    // -rw-r--r--
    const mode_t mode = S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH;
    if (!android::base::WriteStringToFile(output, kDefaultFileName, mode, getuid(), getgid(),
                                          true)) {
        ALOGE("Could not save the proto file! There are missing fields");
        mLastErr = PERMISSION_DENIED;
    }