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

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

Snap for 11558480 from 9cc667b4 to 24Q3-release

Change-Id: Iacf6472a9c25b0cd81690fd86734cfd775a6f12d
parents b9d331b0 9cc667b4
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -4197,14 +4197,14 @@ int Dumpstate::DumpFile(const std::string& title, const std::string& path) {
}

int read_file_as_long(const char *path, long int *output) {
    int fd = TEMP_FAILURE_RETRY(open(path, O_RDONLY | O_NONBLOCK | O_CLOEXEC));
    if (fd < 0) {
    android::base::unique_fd fd(TEMP_FAILURE_RETRY(open(path, O_RDONLY | O_NONBLOCK | O_CLOEXEC)));
    if (fd.get() < 0) {
        int err = errno;
        MYLOGE("Error opening file descriptor for %s: %s\n", path, strerror(err));
        return -1;
    }
    char buffer[50];
    ssize_t bytes_read = TEMP_FAILURE_RETRY(read(fd, buffer, sizeof(buffer)));
    ssize_t bytes_read = TEMP_FAILURE_RETRY(read(fd.get(), buffer, sizeof(buffer)));
    if (bytes_read == -1) {
        MYLOGE("Error reading file %s: %s\n", path, strerror(errno));
        return -2;
+1 −1
Original line number Diff line number Diff line
@@ -120,7 +120,7 @@ fn print_device_description(
    fn print_in_8_byte_chunks(
        output: &mut impl Write,
        prefix: &str,
        data: &Vec<u8>,
        data: &[u8],
    ) -> Result<(), io::Error> {
        for (i, byte) in data.iter().enumerate() {
            if i % 8 == 0 {
+4 −0
Original line number Diff line number Diff line
@@ -154,6 +154,10 @@ cc_library_static {
    ],
    generated_sources: ["libinput_cxx_bridge_code"],

    lto: {
        never: true,
    },

    shared_libs: [
        "libbase",
    ],
+0 −1
Original line number Diff line number Diff line
@@ -210,7 +210,6 @@ filegroup {
        "Scheduler/VsyncModulator.cpp",
        "Scheduler/VsyncSchedule.cpp",
        "ScreenCaptureOutput.cpp",
        "StartPropertySetThread.cpp",
        "SurfaceFlinger.cpp",
        "SurfaceFlingerDefaultFactory.cpp",
        "Tracing/LayerDataSource.cpp",
+0 −41
Original line number Diff line number Diff line
/*
 * Copyright (C) 2017 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#include <cutils/properties.h>
#include "StartPropertySetThread.h"

namespace android {

StartPropertySetThread::StartPropertySetThread(bool timestampPropertyValue):
        Thread(false), mTimestampPropertyValue(timestampPropertyValue) {}

status_t StartPropertySetThread::Start() {
    return run("SurfaceFlinger::StartPropertySetThread", PRIORITY_NORMAL);
}

bool StartPropertySetThread::threadLoop() {
    // Set property service.sf.present_timestamp, consumer need check its readiness
    property_set(kTimestampProperty, mTimestampPropertyValue ? "1" : "0");
    // Clear BootAnimation exit flag
    property_set("service.bootanim.exit", "0");
    property_set("service.bootanim.progress", "0");
    // Start BootAnimation if not started
    property_set("ctl.start", "bootanim");
    // Exit immediately
    return false;
}

} // namespace android
Loading