Loading data/etc/go_handheld_core_hardware.xml +3 −0 Original line number Diff line number Diff line Loading @@ -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 --> Loading libs/binder/Android.bp +4 −0 Original line number Diff line number Diff line Loading @@ -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: [ Loading libs/gui/BLASTBufferQueue.cpp +15 −6 Original line number Diff line number Diff line Loading @@ -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); Loading Loading @@ -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) { Loading libs/gui/SurfaceComposerClient.cpp +11 −7 Original line number Diff line number Diff line Loading @@ -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> Loading Loading @@ -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(); Loading @@ -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( Loading Loading @@ -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, Loading libs/gui/aidl/android/gui/DynamicDisplayInfo.aidl +4 −0 Original line number Diff line number Diff line Loading @@ -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. Loading Loading @@ -46,4 +47,7 @@ parcelable DynamicDisplayInfo { // Represents whether display supports ARR. boolean hasArrSupport; // Represents frame rate for FrameRateCategory Normal and High. FrameRateCategoryRate frameRateCategoryRate; } Loading
data/etc/go_handheld_core_hardware.xml +3 −0 Original line number Diff line number Diff line Loading @@ -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 --> Loading
libs/binder/Android.bp +4 −0 Original line number Diff line number Diff line Loading @@ -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: [ Loading
libs/gui/BLASTBufferQueue.cpp +15 −6 Original line number Diff line number Diff line Loading @@ -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); Loading Loading @@ -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) { Loading
libs/gui/SurfaceComposerClient.cpp +11 −7 Original line number Diff line number Diff line Loading @@ -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> Loading Loading @@ -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(); Loading @@ -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( Loading Loading @@ -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, Loading
libs/gui/aidl/android/gui/DynamicDisplayInfo.aidl +4 −0 Original line number Diff line number Diff line Loading @@ -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. Loading Loading @@ -46,4 +47,7 @@ parcelable DynamicDisplayInfo { // Represents whether display supports ARR. boolean hasArrSupport; // Represents frame rate for FrameRateCategory Normal and High. FrameRateCategoryRate frameRateCategoryRate; }