Merge "Updated permission for layer trace proto file."
diff --git a/services/surfaceflinger/SurfaceTracing.cpp b/services/surfaceflinger/SurfaceTracing.cpp
index 6fd4e46..eb5c7de 100644
--- a/services/surfaceflinger/SurfaceTracing.cpp
+++ b/services/surfaceflinger/SurfaceTracing.cpp
@@ -188,8 +188,11 @@
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;
}