diff options
author | 2021-09-21 01:45:19 +0000 | |
---|---|---|
committer | 2021-09-21 01:45:19 +0000 | |
commit | bbed4ebd98e3c2901070fb1d28e3ca82d320ba8c (patch) | |
tree | 1b793c4bb238a5a9935df5298714c7a6fbff0054 /libs/gui/SurfaceComposerClient.cpp | |
parent | 397ccc9217936fbd36a2d420b9b42741b7bda02b (diff) | |
parent | 4f2ea10357be90b703c1e459fe3a0d346cd0c97d (diff) |
Merge "SurfaceControl: Add setDropInputMode api" into sc-v2-dev-plus-aosp
Diffstat (limited to 'libs/gui/SurfaceComposerClient.cpp')
-rw-r--r-- | libs/gui/SurfaceComposerClient.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libs/gui/SurfaceComposerClient.cpp b/libs/gui/SurfaceComposerClient.cpp index a2037ac614..843e2ffe4a 100644 --- a/libs/gui/SurfaceComposerClient.cpp +++ b/libs/gui/SurfaceComposerClient.cpp @@ -1739,6 +1739,21 @@ SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::setDesti return *this; } +SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::setDropInputMode( + const sp<SurfaceControl>& sc, gui::DropInputMode mode) { + layer_state_t* s = getLayerState(sc); + if (!s) { + mStatus = BAD_INDEX; + return *this; + } + + s->what |= layer_state_t::eDropInputModeChanged; + s->dropInputMode = mode; + + registerSurfaceControlForCallback(sc); + return *this; +} + // --------------------------------------------------------------------------- DisplayState& SurfaceComposerClient::Transaction::getDisplayState(const sp<IBinder>& token) { |