diff options
| author | 2021-11-09 23:03:14 +0000 | |
|---|---|---|
| committer | 2021-11-09 23:03:14 +0000 | |
| commit | 294e7b87e3221d73d294293f184d2eaba39f1e8b (patch) | |
| tree | 4f9c6cd95d64d5ab30bed9e14a1f43a24e981367 /libs/gui/LayerState.cpp | |
| parent | d668098e4714025b41052207c9332de86dc3936a (diff) | |
| parent | 41f48c7b10132c94822ab109de99978ee65cc743 (diff) | |
Merge changes from topic "trusted_overlay_backport" into rvc-dev
* changes:
DO NOT MERGE Initialize DrawingState::trustedOverlay to false in constructor
Add mechanism for a task's windows to be trusted overlays (SF)
Change InputWindowInfo::isTrustedOverlay() to be permission and flag based.
Diffstat (limited to 'libs/gui/LayerState.cpp')
| -rw-r--r-- | libs/gui/LayerState.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libs/gui/LayerState.cpp b/libs/gui/LayerState.cpp index e43446ac8c..a897d1025f 100644 --- a/libs/gui/LayerState.cpp +++ b/libs/gui/LayerState.cpp @@ -117,6 +117,8 @@ status_t layer_state_t::write(Parcel& output) const output.writeFloat(frameRate); output.writeByte(frameRateCompatibility); output.writeUint32(fixedTransformHint); + output.writeBool(isTrustedOverlay); + return NO_ERROR; } @@ -200,6 +202,8 @@ status_t layer_state_t::read(const Parcel& input) frameRate = input.readFloat(); frameRateCompatibility = input.readByte(); fixedTransformHint = static_cast<ui::Transform::RotationFlags>(input.readUint32()); + isTrustedOverlay = input.readBool(); + return NO_ERROR; } @@ -439,6 +443,10 @@ void layer_state_t::merge(const layer_state_t& other) { what |= eFixedTransformHintChanged; fixedTransformHint = other.fixedTransformHint; } + if (other.what & eTrustedOverlayChanged) { + what |= eTrustedOverlayChanged; + isTrustedOverlay = other.isTrustedOverlay; + } if ((other.what & what) != other.what) { ALOGE("Unmerged SurfaceComposer Transaction properties. LayerState::merge needs updating? " "other.what=0x%" PRIu64 " what=0x%" PRIu64, |