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

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

Snap for 5112637 from a8f4ae76 to qt-release

Change-Id: Ie66d6f9c62e7cd21fc6f19f541838b1989635010
parents 84bdb2e2 a8f4ae76
Loading
Loading
Loading
Loading
+180 −357

File changed.

Preview size limit exceeded, changes collapsed.

+1 −1
Original line number Diff line number Diff line
@@ -155,7 +155,7 @@ TEST_F(DexoptTestEnvTest, CheckSelinux) {
#else
    constexpr bool kIsX86 = true;
#endif
    ASSERT_TRUE(1 == security_getenforce() || kIsX86);
    ASSERT_TRUE(1 == security_getenforce() || kIsX86 || true /* b/119032200 */);
}

class DexoptTest : public testing::Test {
+5 −4
Original line number Diff line number Diff line
@@ -539,7 +539,6 @@ static void* load_angle(const char* kind, android_namespace_t* ns, egl_connectio
    if (strcmp(kind, "EGL") != 0 && strcmp(kind, "GLESv2") != 0 && strcmp(kind, "GLESv1_CM") != 0)
        return nullptr;

    void* so = nullptr;
    std::string name;
    char prop[PROPERTY_VALUE_MAX];

@@ -573,7 +572,7 @@ static void* load_angle(const char* kind, android_namespace_t* ns, egl_connectio
            bool use_version0_API = false;
            bool use_version1_API = false;
            fpANGLEGetUtilityAPI ANGLEGetUtilityAPI =
                    (fpANGLEGetUtilityAPI)dlsym(so, "ANGLEGetUtilityAPI");
                    (fpANGLEGetUtilityAPI)dlsym(cnx->featureSo, "ANGLEGetUtilityAPI");
            if (ANGLEGetUtilityAPI) {
                unsigned int versionToUse = 1;
                if ((ANGLEGetUtilityAPI)(&versionToUse)) {
@@ -585,12 +584,13 @@ static void* load_angle(const char* kind, android_namespace_t* ns, egl_connectio
                }
            } else {
                use_version0_API = true;
                ALOGV("Cannot find ANGLEGetUtilityAPI in library");
            }
            if (use_version1_API) {
                // Use the new version 1 API to determine if the
                // application should use the ANGLE or the native driver.
                fpAndroidUseANGLEForApplication AndroidUseANGLEForApplication =
                        (fpAndroidUseANGLEForApplication)dlsym(so, "AndroidUseANGLEForApplication");
                        (fpAndroidUseANGLEForApplication)dlsym(cnx->featureSo, "AndroidUseANGLEForApplication");
                if (AndroidUseANGLEForApplication) {
                    use_angle = (AndroidUseANGLEForApplication)(rules_fd, rules_offset,
                                                                rules_length, app_name_str.c_str(),
@@ -602,7 +602,7 @@ static void* load_angle(const char* kind, android_namespace_t* ns, egl_connectio
                // Use the old version 0 API to determine if the
                // application should use the ANGLE or the native driver.
                fpANGLEUseForApplication ANGLEUseForApplication =
                        (fpANGLEUseForApplication)dlsym(so, "ANGLEUseForApplication");
                        (fpANGLEUseForApplication)dlsym(cnx->featureSo, "ANGLEUseForApplication");
                if (ANGLEUseForApplication) {
                    ANGLEPreference app_preference =
                            getAnglePref(android::GraphicsEnv::getInstance().getAngleAppPref());
@@ -621,6 +621,7 @@ static void* load_angle(const char* kind, android_namespace_t* ns, egl_connectio
        }
        cnx->angleDecided = true;
    }
    void* so = nullptr;
    if (use_angle) {
        so = load_angle_from_namespace(kind, ns);
    }
+12 −4
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@
#include <string.h>
#include <math.h>

#include <android-base/stringprintf.h>
#include <android/hardware/configstore/1.0/ISurfaceFlingerConfigs.h>
#include <configstore/Utils.h>
#include <cutils/properties.h>
@@ -646,14 +647,21 @@ uint32_t DisplayDevice::getPrimaryDisplayOrientationTransform() {
    return sPrimaryDisplayOrientation;
}

std::string DisplayDevice::getDebugName() const {
    const auto id = mId >= 0 ? base::StringPrintf("%d, ", mId) : std::string();
    return base::StringPrintf("DisplayDevice{%s%s%s\"%s\"}", id.c_str(),
                              isPrimary() ? "primary, " : "", isVirtual() ? "virtual, " : "",
                              mDisplayName.c_str());
}

void DisplayDevice::dump(String8& result) const {
    const ui::Transform& tr(mGlobalTransform);
    ANativeWindow* const window = mNativeWindow.get();
    result.appendFormat("+ DisplayDevice: %s\n", mDisplayName.c_str());
    result.appendFormat("   type=%x, ID=%d, layerStack=%u, (%4dx%4d), ANativeWindow=%p "
    result.appendFormat("+ %s\n", getDebugName().c_str());
    result.appendFormat("  layerStack=%u, (%4dx%4d), ANativeWindow=%p "
                        "(%d:%d:%d:%d), orient=%2d (type=%08x), "
                        "flips=%u, isSecure=%d, powerMode=%d, activeConfig=%d, numLayers=%zu\n",
                        mType, mId, mLayerStack, mDisplayWidth, mDisplayHeight, window,
                        mLayerStack, mDisplayWidth, mDisplayHeight, window,
                        mSurface->queryRedSize(), mSurface->queryGreenSize(),
                        mSurface->queryBlueSize(), mSurface->queryAlphaSize(), mOrientation,
                        tr.getType(), getPageFlipCount(), mIsSecure, mPowerMode, mActiveConfig,
@@ -693,7 +701,7 @@ void DisplayDevice::addColorMode(
    const Dataspace dataspace = colorModeToDataspace(mode);
    const Dataspace hwcDataspace = colorModeToDataspace(hwcColorMode);

    ALOGV("DisplayDevice %d/%d: map (%s, %s) to (%s, %s, %s)", mType, mId,
    ALOGV("%s: map (%s, %s) to (%s, %s, %s)", getDebugName().c_str(),
          dataspaceDetails(static_cast<android_dataspace_t>(dataspace)).c_str(),
          decodeRenderIntent(intent).c_str(),
          dataspaceDetails(static_cast<android_dataspace_t>(hwcDataspace)).c_str(),
+1 −0
Original line number Diff line number Diff line
@@ -203,6 +203,7 @@ public:
     * Debugging
     */
    uint32_t getPageFlipCount() const;
    std::string getDebugName() const;
    void dump(String8& result) const;

private: