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

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

Snap for 5533229 from 6902bb6c to qt-release

Change-Id: I12a166a8fba11031634f934de1086661fd2f5d1d
parents c5c2face 6902bb6c
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -2697,7 +2697,15 @@ Dumpstate::RunStatus Dumpstate::RunInternal(int32_t calling_uid,
            MYLOGI(
                "Did not receive user consent yet."
                " Will not copy the bugreport artifacts to caller.\n");
            // TODO(b/111441001): cancel outstanding requests
            const String16 incidentcompanion("incidentcompanion");
            sp<android::IBinder> ics(defaultServiceManager()->getService(incidentcompanion));
            if (ics != nullptr) {
                MYLOGD("Canceling user consent request via incidentcompanion service\n");
                android::interface_cast<android::os::IIncidentCompanion>(ics)->cancelAuthorization(
                        consent_callback_.get());
            } else {
                MYLOGD("Unable to cancel user consent; incidentcompanion service unavailable\n");
            }
        }
    }

+7 −0
Original line number Diff line number Diff line
@@ -74,4 +74,11 @@ interface IPackageManagerNative {
     * LOCATION_PRODUCT: getApplicationInfo(packageName).isProduct()
     */
    int getLocationFlags(in @utf8InCpp String packageName);

    /**
     * Returns the target SDK version for the given package.
     * Unknown packages will cause the call to fail. The caller must check the
     * returned Status before using the result of this function.
     */
    int getTargetSdkVersionForPackage(in String packageName);
}
+13 −86
Original line number Diff line number Diff line
@@ -25,50 +25,19 @@ cc_library_shared {
    },
    double_loadable: true,

    clang: true,
    cflags: [
        "-Wall",
        "-Werror",
    ],
    cppflags: [
        "-Wextra",
        "-DDEBUG_ONLY_CODE=0",
    ],

    product_variables: {
        eng: {
            cppflags: [
                "-UDEBUG_ONLY_CODE",
                "-DDEBUG_ONLY_CODE=1",
            ],
        },
    },
    defaults: ["libgui_bufferqueue-defaults"],

    srcs: [
        "BitTube.cpp",
        "BufferHubConsumer.cpp",
        "BufferHubProducer.cpp",
        "BufferItem.cpp",
        "BufferItemConsumer.cpp",
        "BufferQueue.cpp",
        "BufferQueueConsumer.cpp",
        "BufferQueueCore.cpp",
        "BufferQueueProducer.cpp",
        "BufferQueueThreadState.cpp",
        "BufferSlot.cpp",
        "ConsumerBase.cpp",
        "CpuConsumer.cpp",
        "DisplayEventReceiver.cpp",
        "FrameTimestamps.cpp",
        "GLConsumer.cpp",
        "GLConsumerUtils.cpp",
        "GuiConfig.cpp",
        "HdrMetadata.cpp",
        "IDisplayEventConnection.cpp",
        "IConsumerListener.cpp",
        "IGraphicBufferConsumer.cpp",
        "IGraphicBufferProducer.cpp",
        "IProducerListener.cpp",
        "IRegionSamplingListener.cpp",
        "ISurfaceComposer.cpp",
        "ISurfaceComposerClient.cpp",
@@ -76,50 +45,20 @@ cc_library_shared {
        "LayerDebugInfo.cpp",
        "LayerMetadata.cpp",
        "LayerState.cpp",
        "OccupancyTracker.cpp",
        "StreamSplitter.cpp",
        "Surface.cpp",
        "SurfaceControl.cpp",
        "SurfaceComposerClient.cpp",
        "SyncFeatures.cpp",
        "view/Surface.cpp",
        "bufferqueue/1.0/B2HProducerListener.cpp",
        "bufferqueue/1.0/Conversion.cpp",
        "bufferqueue/1.0/H2BGraphicBufferProducer.cpp",
        "bufferqueue/1.0/H2BProducerListener.cpp",
        "bufferqueue/1.0/WProducerListener.cpp",
        "bufferqueue/2.0/B2HGraphicBufferProducer.cpp",
        "bufferqueue/2.0/B2HProducerListener.cpp",
        "bufferqueue/2.0/H2BGraphicBufferProducer.cpp",
        "bufferqueue/2.0/H2BProducerListener.cpp",
        "bufferqueue/2.0/types.cpp",
    ],

    shared_libs: [
        "android.frameworks.bufferhub@1.0",
        "android.hardware.graphics.bufferqueue@1.0",
        "android.hardware.graphics.bufferqueue@2.0",
        "android.hardware.graphics.common@1.1",
        "android.hardware.graphics.common@1.2",
        "android.hidl.token@1.0-utils",
        "libbase",
        "libbinder",
        "libbufferhub",
        "libbufferhubqueue", // TODO(b/70046255): Remove this once BufferHub is integrated into libgui.
        "libcutils",
        "libEGL",
        "libGLESv2",
        "libhidlbase",
        "libhidltransport",
        "libhwbinder",
        "libinput",
        "liblog",
        "libnativewindow",
        "libpdx_default_transport",
        "libsync",
        "libui",
        "libutils",
        "libvndksupport",
    ],

    // bufferhub is not used when building libgui for vendors
@@ -145,30 +84,8 @@ cc_library_shared {

    header_libs: [
        "libdvr_headers",
        "libgui_headers",
        "libnativebase_headers",
        "libpdx_headers",
    ],

    export_shared_lib_headers: [
        "libbinder",
        "libEGL",
        "libnativewindow",
        "libui",
        "android.hardware.graphics.bufferqueue@1.0",
        "android.hardware.graphics.bufferqueue@2.0",
        "android.hardware.graphics.common@1.1",
        "android.hardware.graphics.common@1.2",
        "android.hidl.token@1.0-utils",
    ],

    export_header_lib_headers: [
        "libgui_headers",
    ],

    export_include_dirs: [
        "include",
    ],
}

// Used by media codec services exclusively as a static lib for
@@ -177,11 +94,21 @@ cc_library_static {
    name: "libgui_bufferqueue_static",
    vendor_available: true,

    cflags: [
        "-DNO_BUFFERHUB",
    ],

    defaults: ["libgui_bufferqueue-defaults"],
}

// Common build config shared by libgui and libgui_bufferqueue_static.
cc_defaults {
    name: "libgui_bufferqueue-defaults",

    clang: true,
    cflags: [
        "-Wall",
        "-Werror",
        "-DNO_BUFFERHUB",
    ],

    cppflags: [
+0 −15
Original line number Diff line number Diff line
@@ -271,13 +271,6 @@ std::unique_ptr<GLESRenderEngine> GLESRenderEngine::create(int hwcFormat, uint32
    extensions.initWithGLStrings(glGetString(GL_VENDOR), glGetString(GL_RENDERER),
                                 glGetString(GL_VERSION), glGetString(GL_EXTENSIONS));

    // In order to have protected contents in GPU composition, the OpenGL ES extension
    // GL_EXT_protected_textures must be supported. If it's not supported, reset
    // protected context to EGL_NO_CONTEXT to indicate that protected contents is not supported.
    if (!extensions.hasProtectedTexture()) {
        protectedContext = EGL_NO_CONTEXT;
    }

    EGLSurface protectedDummy = EGL_NO_SURFACE;
    if (protectedContext != EGL_NO_CONTEXT && !extensions.hasSurfacelessContext()) {
        protectedDummy =
@@ -616,10 +609,6 @@ void GLESRenderEngine::bindExternalTextureImage(uint32_t texName, const Image& i
    const GLenum target = GL_TEXTURE_EXTERNAL_OES;

    glBindTexture(target, texName);
    if (supportsProtectedContent()) {
        glTexParameteri(target, GL_TEXTURE_PROTECTED_EXT,
                        glImage.isProtected() ? GL_TRUE : GL_FALSE);
    }
    if (glImage.getEGLImage() != EGL_NO_IMAGE_KHR) {
        glEGLImageTargetTexture2DOES(target, static_cast<GLeglImageOES>(glImage.getEGLImage()));
    }
@@ -799,10 +788,6 @@ status_t GLESRenderEngine::bindFrameBuffer(Framebuffer* framebuffer) {

    // Bind the texture and turn our EGLImage into a texture
    glBindTexture(GL_TEXTURE_2D, textureName);
    if (supportsProtectedContent()) {
        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_PROTECTED_EXT,
                        mInProtectedContext ? GL_TRUE : GL_FALSE);
    }
    glEGLImageTargetTexture2DOES(GL_TEXTURE_2D, (GLeglImageOES)eglImage);

    // Bind the Framebuffer to render into
+20 −5
Original line number Diff line number Diff line
@@ -22,6 +22,13 @@
#include <binder/IPermissionController.h>
#include <binder/IServiceManager.h>

/*
 * The permission to use for activity recognition sensors (like step counter).
 * See sensor types for more details on what sensors should require this
 * permission.
 */
#define SENSOR_PERMISSION_ACTIVITY_RECOGNITION "android.permission.ACTIVITY_RECOGNITION"

// ----------------------------------------------------------------------------
namespace android {
// ----------------------------------------------------------------------------
@@ -116,7 +123,7 @@ Sensor::Sensor(struct sensor_t const& hwSensor, const uuid_t& uuid, int halVersi
        mStringType = SENSOR_STRING_TYPE_HEART_RATE;
        mRequiredPermission = SENSOR_PERMISSION_BODY_SENSORS;
        AppOpsManager appOps;
        mRequiredAppOp = appOps.permissionToOpCode(String16(SENSOR_PERMISSION_BODY_SENSORS));
        mRequiredAppOp = appOps.permissionToOpCode(String16(mRequiredPermission));
        mFlags |= SENSOR_FLAG_ON_CHANGE_MODE;
        } break;
    case SENSOR_TYPE_LIGHT:
@@ -165,14 +172,22 @@ Sensor::Sensor(struct sensor_t const& hwSensor, const uuid_t& uuid, int halVersi
            mFlags |= SENSOR_FLAG_WAKE_UP;
        }
        break;
    case SENSOR_TYPE_STEP_COUNTER:
    case SENSOR_TYPE_STEP_COUNTER: {
        mStringType = SENSOR_STRING_TYPE_STEP_COUNTER;
        mRequiredPermission = SENSOR_PERMISSION_ACTIVITY_RECOGNITION;
        AppOpsManager appOps;
        mRequiredAppOp =
                appOps.permissionToOpCode(String16(mRequiredPermission));
        mFlags |= SENSOR_FLAG_ON_CHANGE_MODE;
        break;
    case SENSOR_TYPE_STEP_DETECTOR:
        } break;
    case SENSOR_TYPE_STEP_DETECTOR: {
        mStringType = SENSOR_STRING_TYPE_STEP_DETECTOR;
        mRequiredPermission = SENSOR_PERMISSION_ACTIVITY_RECOGNITION;
        AppOpsManager appOps;
        mRequiredAppOp =
                appOps.permissionToOpCode(String16(mRequiredPermission));
        mFlags |= SENSOR_FLAG_SPECIAL_REPORTING_MODE;
        break;
        } break;
    case SENSOR_TYPE_TEMPERATURE:
        mStringType = SENSOR_STRING_TYPE_TEMPERATURE;
        mFlags |= SENSOR_FLAG_ON_CHANGE_MODE;
Loading