diff options
| author | 2021-07-28 14:46:21 +0000 | |
|---|---|---|
| committer | 2021-07-28 14:46:21 +0000 | |
| commit | 4dea052f15cbce8b34efb038c4277eab32519f87 (patch) | |
| tree | d7d36ff3c4e92f08b9e039eebe733440195b7101 /libs/gui/LayerState.cpp | |
| parent | ee3c8f58e92c8082f4cfa707fb39aace27b0b1a6 (diff) | |
| parent | 5eaa7c313627d872ced846dfd0c83b128a389914 (diff) | |
Merge "Add mechanism for a task's windows to be trusted overlays (SF)" into sc-dev am: 5eaa7c3136
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/15150900
Change-Id: I8578a717172c8245da2c8352cbec14f4b9729628
Diffstat (limited to 'libs/gui/LayerState.cpp')
| -rw-r--r-- | libs/gui/LayerState.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libs/gui/LayerState.cpp b/libs/gui/LayerState.cpp index 17d614eab2..837e5b35f7 100644 --- a/libs/gui/LayerState.cpp +++ b/libs/gui/LayerState.cpp @@ -67,6 +67,7 @@ layer_state_t::layer_state_t() fixedTransformHint(ui::Transform::ROT_INVALID), frameNumber(0), autoRefresh(false), + isTrustedOverlay(false), bufferCrop(Rect::INVALID_RECT), destinationFrame(Rect::INVALID_RECT), releaseBufferListener(nullptr) { @@ -171,6 +172,7 @@ status_t layer_state_t::write(Parcel& output) const SAFE_PARCEL(output.write, stretchEffect); SAFE_PARCEL(output.write, bufferCrop); SAFE_PARCEL(output.write, destinationFrame); + SAFE_PARCEL(output.writeBool, isTrustedOverlay); return NO_ERROR; } @@ -299,6 +301,7 @@ status_t layer_state_t::read(const Parcel& input) SAFE_PARCEL(input.read, stretchEffect); SAFE_PARCEL(input.read, bufferCrop); SAFE_PARCEL(input.read, destinationFrame); + SAFE_PARCEL(input.readBool, &isTrustedOverlay); return NO_ERROR; } @@ -534,6 +537,10 @@ void layer_state_t::merge(const layer_state_t& other) { what |= eAutoRefreshChanged; autoRefresh = other.autoRefresh; } + if (other.what & eTrustedOverlayChanged) { + what |= eTrustedOverlayChanged; + isTrustedOverlay = other.isTrustedOverlay; + } if (other.what & eReleaseBufferListenerChanged) { if (releaseBufferListener) { ALOGW("Overriding releaseBufferListener"); |