From 308ddba68bc59234fba9a509d81cc2708d195c3a Mon Sep 17 00:00:00 2001 From: chaviw Date: Tue, 11 Aug 2020 16:23:51 -0700 Subject: Check status for every ISurfaceComposer Parcel Add macro to check for the status when parceling and return the error if failed. Also log the error when it occurs. Updated all callers in ISurfaceComposer for transactions and screen capture to use the SAFE_PARCEL call. Also updated all parceling in LayerState. Test: Boots Fixes: 162604027 Fixes: 162604029 Fixes: 162247502 Fixes: 162246713 Change-Id: I30f1588a6b6d89d31a0a112681702ecf0cb5d845 --- services/surfaceflinger/SurfaceFlinger.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'services/surfaceflinger/SurfaceFlinger.cpp') diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp index f6028d5227..b12158c6f0 100644 --- a/services/surfaceflinger/SurfaceFlinger.cpp +++ b/services/surfaceflinger/SurfaceFlinger.cpp @@ -3356,7 +3356,7 @@ bool SurfaceFlinger::transactionIsReadyToBeApplied(int64_t desiredPresentTime, return true; } -void SurfaceFlinger::setTransactionState( +status_t SurfaceFlinger::setTransactionState( const Vector& states, const Vector& displays, uint32_t flags, const sp& applyToken, const InputWindowCommands& inputWindowCommands, int64_t desiredPresentTime, const client_cache_t& uncacheBuffer, bool hasListenerCallbacks, @@ -3402,12 +3402,13 @@ void SurfaceFlinger::setTransactionState( hasListenerCallbacks, listenerCallbacks, originPID, originUID); setTransactionFlags(eTransactionFlushNeeded); - return; + return NO_ERROR; } applyTransactionState(states, displays, flags, inputWindowCommands, desiredPresentTime, uncacheBuffer, postTime, privileged, hasListenerCallbacks, listenerCallbacks, originPID, originUID, /*isMainThread*/ false); + return NO_ERROR; } void SurfaceFlinger::applyTransactionState( -- cgit v1.2.3-59-g8ed1b