diff options
| author | 2022-04-05 22:14:21 +0000 | |
|---|---|---|
| committer | 2022-04-05 22:14:21 +0000 | |
| commit | 04caf0c75b97edb1ae161eecaa01c7ac0e8da5c8 (patch) | |
| tree | 8657a3a5937490d93308c5c8e2928559919c82c7 /libs/gui/SurfaceComposerClient.cpp | |
| parent | f2a0e26203d0d5ab63b308f50a0f0fdad8651d46 (diff) | |
| parent | 1ff38ab351a617c4870eec236b70932ff2c4473b (diff) | |
Merge "DO NOT MERGE: SurfaceFlinger: Add Transaction#sanitize" into sc-dev
Diffstat (limited to 'libs/gui/SurfaceComposerClient.cpp')
| -rw-r--r-- | libs/gui/SurfaceComposerClient.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libs/gui/SurfaceComposerClient.cpp b/libs/gui/SurfaceComposerClient.cpp index 6ffd25d227..3f1277ed57 100644 --- a/libs/gui/SurfaceComposerClient.cpp +++ b/libs/gui/SurfaceComposerClient.cpp @@ -527,6 +527,13 @@ SurfaceComposerClient::Transaction::Transaction(const Transaction& other) mListenerCallbacks = other.mListenerCallbacks; } +void SurfaceComposerClient::Transaction::sanitize() { + for (auto & [handle, composerState] : mComposerStates) { + composerState.state.sanitize(0 /* permissionMask */); + } + mInputWindowCommands.clear(); +} + std::unique_ptr<SurfaceComposerClient::Transaction> SurfaceComposerClient::Transaction::createFromParcel(const Parcel* parcel) { auto transaction = std::make_unique<Transaction>(); @@ -611,7 +618,6 @@ status_t SurfaceComposerClient::Transaction::readFromParcel(const Parcel* parcel if (composerState.read(*parcel) == BAD_VALUE) { return BAD_VALUE; } - composerStates[surfaceControlHandle] = composerState; } |