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

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

Snap for 5591509 from c0c0fd95 to qt-release

Change-Id: I44e7f4498393f278b56b6447a8b801560e9b88ba
parents 7211944e c0c0fd95
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1232,7 +1232,7 @@ static void DumpHals() {
    }
    DurationReporter duration_reporter("DUMP HALS");
    RunCommand("HARDWARE HALS", {"lshal", "-lVSietrpc", "--types=b,c,l,z"},
               CommandOptions::WithTimeout(2).AsRootIfAvailable().Build());
               CommandOptions::WithTimeout(10).AsRootIfAvailable().Build());

    using android::hidl::manager::V1_0::IServiceManager;
    using android::hardware::defaultServiceManager;
+3 −7
Original line number Diff line number Diff line
@@ -666,8 +666,7 @@ TEST_F(DumpstateTest, RunCommandWithTitle) {
    EXPECT_THAT(err, StrEq("stderr\n"));
    // We don't know the exact duration, so we check the prefix and suffix
    EXPECT_THAT(out,
                StartsWith("------ I AM GROOT (" + kSimpleCommand + ") ------\nstdout\n------"));
    EXPECT_THAT(out, EndsWith("s was the duration of 'I AM GROOT' ------\n"));
                StartsWith("------ I AM GROOT (" + kSimpleCommand + ") ------\nstdout\n"));
}

TEST_F(DumpstateTest, RunCommandWithLoggingMessage) {
@@ -702,8 +701,7 @@ TEST_F(DumpstateTest, RunCommandDryRun) {
    EXPECT_EQ(0, RunCommand("I AM GROOT", {kSimpleCommand}));
    // We don't know the exact duration, so we check the prefix and suffix
    EXPECT_THAT(out, StartsWith("------ I AM GROOT (" + kSimpleCommand +
                                ") ------\n\t(skipped on dry run)\n------"));
    EXPECT_THAT(out, EndsWith("s was the duration of 'I AM GROOT' ------\n"));
                                ") ------\n\t(skipped on dry run)\n"));
    EXPECT_THAT(err, IsEmpty());
}

@@ -1042,7 +1040,6 @@ TEST_F(DumpstateTest, DumpFileNotFoundWithTitle) {
    // We don't know the exact duration, so we check the prefix and suffix
    EXPECT_THAT(out, StartsWith("*** Error dumping /I/cant/believe/I/exist (Y U NO EXIST?): No "
                                "such file or directory\n"));
    EXPECT_THAT(out, EndsWith("s was the duration of 'Y U NO EXIST?' ------\n"));
}

TEST_F(DumpstateTest, DumpFileSingleLine) {
@@ -1082,8 +1079,7 @@ TEST_F(DumpstateTest, DumpFileOnDryRun) {
    EXPECT_THAT(err, IsEmpty());
    EXPECT_THAT(
        out, StartsWith("------ Might as well dump. Dump! (" + kTestDataPath + "single-line.txt:"));
    EXPECT_THAT(out, HasSubstr("\n\t(skipped on dry run)\n------"));
    EXPECT_THAT(out, EndsWith("s was the duration of 'Might as well dump. Dump!' ------\n"));
    EXPECT_THAT(out, HasSubstr("\n\t(skipped on dry run)\n"));
}

TEST_F(DumpstateTest, DumpFileUpdateProgress) {
+16 −8
Original line number Diff line number Diff line
@@ -14,8 +14,14 @@
 * limitations under the License.
 */

/**
 * @addtogroup AHardwareBuffer
 * @{
 */

/**
 * @file hardware_buffer_jni.h
 * @brief JNI glue for native hardware buffers.
 */

#ifndef ANDROID_HARDWARE_BUFFER_JNI_H
@@ -30,23 +36,25 @@
__BEGIN_DECLS

/**
 * Return the AHardwareBuffer associated with a Java HardwareBuffer object,
 * for interacting with it through native code. This method does not acquire any
 * additional reference to the AHardwareBuffer that is returned. To keep the
 * AHardwareBuffer live after the Java HardwareBuffer object got garbage
 * collected, be sure to use AHardwareBuffer_acquire() to acquire an additional
 * reference.
 * Return the AHardwareBuffer wrapped by a Java HardwareBuffer object.
 *
 * This method does not acquire any additional reference to the AHardwareBuffer
 * that is returned. To keep the AHardwareBuffer live after the Java
 * HardwareBuffer object got garbage collected, be sure to use AHardwareBuffer_acquire()
 * to acquire an additional reference.
 */
AHardwareBuffer* AHardwareBuffer_fromHardwareBuffer(JNIEnv* env,
        jobject hardwareBufferObj);
        jobject hardwareBufferObj) __INTRODUCED_IN(26);

/**
 * Return a new Java HardwareBuffer object that wraps the passed native
 * AHardwareBuffer object.
 */
jobject AHardwareBuffer_toHardwareBuffer(JNIEnv* env,
        AHardwareBuffer* hardwareBuffer);
        AHardwareBuffer* hardwareBuffer) __INTRODUCED_IN(26);

__END_DECLS

#endif // ANDROID_HARDWARE_BUFFER_JNI_H

/** @} */
+1 −0
Original line number Diff line number Diff line
@@ -32,6 +32,7 @@ static const char* native_processes_to_dump[] = {
        "/system/bin/mediametrics", // media.metrics
        "/system/bin/mediaserver",
        "/system/bin/netd",
        "/system/bin/vold",
        "/system/bin/sdcard",
        "/system/bin/statsd",
        "/system/bin/surfaceflinger",
+21 −2
Original line number Diff line number Diff line
@@ -1049,6 +1049,7 @@ status_t SurfaceFlinger::getDisplayColorModes(const sp<IBinder>& displayToken,
    }

    std::vector<ColorMode> modes;
    bool isInternalDisplay = false;
    {
        ConditionalLock lock(mStateLock, std::this_thread::get_id() != mMainThreadId);

@@ -1058,9 +1059,20 @@ status_t SurfaceFlinger::getDisplayColorModes(const sp<IBinder>& displayToken,
        }

        modes = getHwComposer().getColorModes(*displayId);
        isInternalDisplay = displayId == getInternalDisplayIdLocked();
    }
    outColorModes->clear();

    // If it's built-in display and the configuration claims it's not wide color capable,
    // filter out all wide color modes. The typical reason why this happens is that the
    // hardware is not good enough to support GPU composition of wide color, and thus the
    // OEMs choose to disable this capability.
    if (isInternalDisplay && !hasWideColorDisplay) {
        std::remove_copy_if(modes.cbegin(), modes.cend(), std::back_inserter(*outColorModes),
                            isWideColorMode);
    } else {
        std::copy(modes.cbegin(), modes.cend(), std::back_inserter(*outColorModes));
    }

    return NO_ERROR;
}
@@ -1207,6 +1219,13 @@ status_t SurfaceFlinger::isWideColorDisplay(const sp<IBinder>& displayToken,
    if (!display) {
        return BAD_VALUE;
    }

    // Use hasWideColorDisplay to override built-in display.
    const auto displayId = display->getId();
    if (displayId && displayId == getInternalDisplayIdLocked()) {
        *outIsWideColorDisplay = hasWideColorDisplay;
        return NO_ERROR;
    }
    *outIsWideColorDisplay = display->hasWideColorGamut();
    return NO_ERROR;
}
@@ -4746,7 +4765,7 @@ void SurfaceFlinger::dumpDisplayIdentificationData(std::string& result) const {
}

void SurfaceFlinger::dumpWideColorInfo(std::string& result) const {
    StringAppendF(&result, "Device has wide color display: %d\n", hasWideColorDisplay);
    StringAppendF(&result, "Device has wide color built-in display: %d\n", hasWideColorDisplay);
    StringAppendF(&result, "Device uses color management: %d\n", useColorManagement);
    StringAppendF(&result, "DisplayColorSetting: %s\n",
                  decodeDisplayColorSetting(mDisplayColorSetting).c_str());