diff options
| author | 2022-02-07 23:22:23 +0000 | |
|---|---|---|
| committer | 2022-02-07 23:22:23 +0000 | |
| commit | 4c3009bfb6664eec119e9e3eb4e7c28909d30788 (patch) | |
| tree | 5a604a2a1d36969108eb300ee5d471cd1035cc40 /libs/gui/LayerState.cpp | |
| parent | ec7e4d9a5cc4dfc2937bb80d51cdb85193f5d72f (diff) | |
| parent | 9b0d13dc443a102358ad740549ade0b83fe7e522 (diff) | |
Merge changes from topic "toast-security-fix-sc-dev" into sc-dev
* changes:
SurfaceFlinger: Implement drop input modes
InputFlinger: Add DROP_INPUT feature flags
SurfaceControl: Add setDropInputMode api
Diffstat (limited to 'libs/gui/LayerState.cpp')
| -rw-r--r-- | libs/gui/LayerState.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/libs/gui/LayerState.cpp b/libs/gui/LayerState.cpp index 076c90dd23..2f31fbbb68 100644 --- a/libs/gui/LayerState.cpp +++ b/libs/gui/LayerState.cpp @@ -65,6 +65,7 @@ layer_state_t::layer_state_t() frameNumber(0), autoRefresh(false), isTrustedOverlay(false), + dropInputMode(gui::DropInputMode::NONE), bufferCrop(Rect::INVALID_RECT), destinationFrame(Rect::INVALID_RECT), releaseBufferListener(nullptr) { @@ -172,7 +173,7 @@ status_t layer_state_t::write(Parcel& output) const SAFE_PARCEL(output.write, bufferCrop); SAFE_PARCEL(output.write, destinationFrame); SAFE_PARCEL(output.writeBool, isTrustedOverlay); - + output.writeUint32(static_cast<uint32_t>(dropInputMode)); return NO_ERROR; } @@ -304,6 +305,9 @@ status_t layer_state_t::read(const Parcel& input) SAFE_PARCEL(input.read, destinationFrame); SAFE_PARCEL(input.readBool, &isTrustedOverlay); + uint32_t mode; + mode = input.readUint32(); + dropInputMode = static_cast<gui::DropInputMode>(mode); return NO_ERROR; } @@ -539,6 +543,10 @@ void layer_state_t::merge(const layer_state_t& other) { what |= eTrustedOverlayChanged; isTrustedOverlay = other.isTrustedOverlay; } + if (other.what & eDropInputModeChanged) { + what |= eDropInputModeChanged; + dropInputMode = other.dropInputMode; + } if (other.what & eReleaseBufferListenerChanged) { if (releaseBufferListener) { ALOGW("Overriding releaseBufferListener"); |