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

Commit 70d2ce93 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 12580585 from 114851e8 to 25Q1-release

Change-Id: I05a64298462ca0fd53f4522aea0f838e06315350
parents deb75f8d 114851e8
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -51,6 +51,9 @@
    <!-- Feature to specify if the device supports adding device admins. -->
    <feature name="android.software.device_admin" />

    <!-- Feature to specify if the device support managed users. -->
    <feature name="android.software.managed_users" />

    <!-- Devices with all optimizations required to support VR Mode and
         pass all CDD requirements for this feature may include
         android.hardware.vr.high_performance -->
+4 −0
Original line number Diff line number Diff line
@@ -871,6 +871,10 @@ cc_library {
        symbol_file: "libbinder_rpc_unstable.map.txt",
    },

    header_abi_checker: {
        enabled: false,
    },

    // This library is intentionally limited to these targets, and it will be removed later.
    // Do not expand the visibility.
    visibility: [
+15 −6
Original line number Diff line number Diff line
@@ -294,12 +294,7 @@ void BLASTBufferQueue::update(const sp<SurfaceControl>& surface, uint32_t width,
    SurfaceComposerClient::Transaction t;
    if (surfaceControlChanged) {
#if COM_ANDROID_GRAPHICS_LIBGUI_FLAGS(BUFFER_RELEASE_CHANNEL)
        // SELinux policy may prevent this process from sending the BufferReleaseChannel's file
        // descriptor to SurfaceFlinger, causing the entire transaction to be dropped. This
        // transaction is applied separately to ensure we don't lose the other updates.
        t.setApplyToken(mApplyToken)
                .setBufferReleaseChannel(mSurfaceControl, mBufferReleaseProducer)
                .apply(false /* synchronous */, true /* oneWay */);
        updateBufferReleaseProducer();
#endif
        t.setFlags(mSurfaceControl, layer_state_t::eEnableBackpressure,
                   layer_state_t::eEnableBackpressure);
@@ -1335,6 +1330,20 @@ void BLASTBufferQueue::setApplyToken(sp<IBinder> applyToken) {

#if COM_ANDROID_GRAPHICS_LIBGUI_FLAGS(BUFFER_RELEASE_CHANNEL)

void BLASTBufferQueue::updateBufferReleaseProducer() {
    // SELinux policy may prevent this process from sending the BufferReleaseChannel's file
    // descriptor to SurfaceFlinger, causing the entire transaction to be dropped. We send this
    // transaction independently of any other updates to ensure those updates aren't lost.
    SurfaceComposerClient::Transaction t;
    status_t status = t.setApplyToken(mApplyToken)
                              .setBufferReleaseChannel(mSurfaceControl, mBufferReleaseProducer)
                              .apply(false /* synchronous */, true /* oneWay */);
    if (status != OK) {
        ALOGW("[%s] %s - failed to set buffer release channel on %s", mName.c_str(),
              statusToString(status).c_str(), mSurfaceControl->getName().c_str());
    }
}

void BLASTBufferQueue::drainBufferReleaseConsumer() {
    ATRACE_CALL();
    while (true) {
+11 −7
Original line number Diff line number Diff line
@@ -57,6 +57,7 @@
#include <ui/DisplayMode.h>
#include <ui/DisplayState.h>
#include <ui/DynamicDisplayInfo.h>
#include <ui/FrameRateCategoryRate.h>

#include <android-base/thread_annotations.h>
#include <gui/LayerStatePermissions.h>
@@ -1347,21 +1348,22 @@ status_t SurfaceComposerClient::Transaction::apply(bool synchronous, bool oneWay
    sp<IBinder> applyToken = mApplyToken ? mApplyToken : getDefaultApplyToken();

    sp<ISurfaceComposer> sf(ComposerService::getComposerService());
    sf->setTransactionState(mFrameTimelineInfo, composerStates, displayStates, flags, applyToken,
                            mInputWindowCommands, mDesiredPresentTime, mIsAutoTimestamp,
                            mUncacheBuffers, hasListenerCallbacks, listenerCallbacks, mId,
                            mMergedTransactionIds);
    status_t binderStatus =
            sf->setTransactionState(mFrameTimelineInfo, composerStates, displayStates, flags,
                                    applyToken, mInputWindowCommands, mDesiredPresentTime,
                                    mIsAutoTimestamp, mUncacheBuffers, hasListenerCallbacks,
                                    listenerCallbacks, mId, mMergedTransactionIds);
    mId = generateId();

    // Clear the current states and flags
    clear();

    if (synchronous) {
    if (synchronous && binderStatus == OK) {
        syncCallback->wait();
    }

    mStatus = NO_ERROR;
    return NO_ERROR;
    return binderStatus;
}

sp<IBinder> SurfaceComposerClient::Transaction::sApplyToken = new BBinder();
@@ -1375,7 +1377,7 @@ sp<IBinder> SurfaceComposerClient::Transaction::getDefaultApplyToken() {

void SurfaceComposerClient::Transaction::setDefaultApplyToken(sp<IBinder> applyToken) {
    std::scoped_lock lock{sApplyTokenMutex};
    sApplyToken = applyToken;
    sApplyToken = std::move(applyToken);
}

status_t SurfaceComposerClient::Transaction::sendSurfaceFlushJankDataTransaction(
@@ -2813,6 +2815,8 @@ void SurfaceComposerClient::getDynamicDisplayInfoInternal(gui::DynamicDisplayInf
    outInfo->gameContentTypeSupported = ginfo.gameContentTypeSupported;
    outInfo->preferredBootDisplayMode = ginfo.preferredBootDisplayMode;
    outInfo->hasArrSupport = ginfo.hasArrSupport;
    outInfo->frameRateCategoryRate = ui::FrameRateCategoryRate(ginfo.frameRateCategoryRate.normal,
                                                               ginfo.frameRateCategoryRate.high);
}

status_t SurfaceComposerClient::getDynamicDisplayInfoFromId(int64_t displayId,
+4 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package android.gui;

import android.gui.DisplayMode;
import android.gui.FrameRateCategoryRate;
import android.gui.HdrCapabilities;

// Information about a physical display which may change on hotplug reconnect.
@@ -46,4 +47,7 @@ parcelable DynamicDisplayInfo {

    // Represents whether display supports ARR.
    boolean hasArrSupport;

    // Represents frame rate for FrameRateCategory Normal and High.
    FrameRateCategoryRate frameRateCategoryRate;
}
Loading