summaryrefslogtreecommitdiff
path: root/libs/gui/DisplayEventDispatcher.cpp
diff options
context:
space:
mode:
author Anton Ivanov <aii@google.com> 2025-02-13 22:57:24 -0800
committer Anton Ivanov <aii@google.com> 2025-02-17 17:52:19 -0800
commit81793808b9347a52dd979e4b3d5d9d10fc8c4915 (patch)
tree51529ad19b47e374dcfe15cab26f910a6c4f5319 /libs/gui/DisplayEventDispatcher.cpp
parentf6dc8535293c1614e9c08e6416fe67a3514ed0e8 (diff)
Harden construction sites of android::StrongPointer.
Bug: 393217449 Test: presubmit Flag: EXEMPT_refactor Change-Id: Icf703aed608531e9b302b299481af00a52074731
Diffstat (limited to 'libs/gui/DisplayEventDispatcher.cpp')
-rw-r--r--libs/gui/DisplayEventDispatcher.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/libs/gui/DisplayEventDispatcher.cpp b/libs/gui/DisplayEventDispatcher.cpp
index 68f10f4d80..67ca39c99e 100644
--- a/libs/gui/DisplayEventDispatcher.cpp
+++ b/libs/gui/DisplayEventDispatcher.cpp
@@ -59,7 +59,8 @@ status_t DisplayEventDispatcher::initialize() {
}
if (mLooper != nullptr) {
- int rc = mLooper->addFd(mReceiver.getFd(), 0, Looper::EVENT_INPUT, this, NULL);
+ int rc = mLooper->addFd(mReceiver.getFd(), 0, Looper::EVENT_INPUT,
+ sp<LooperCallback>::fromExisting(this), NULL);
if (rc < 0) {
return UNKNOWN_ERROR;
}