SF: build with ANDROID_UTILS_REF_BASE_DISABLE_IMPLICIT_CONSTRUCTION
Change-Id: I347b2cf57f1df426d11d07a84075419597d4a442
Test: presubmit
diff --git a/services/surfaceflinger/FpsReporter.cpp b/services/surfaceflinger/FpsReporter.cpp
index c89c9ff..155cf4d 100644
--- a/services/surfaceflinger/FpsReporter.cpp
+++ b/services/surfaceflinger/FpsReporter.cpp
@@ -63,7 +63,8 @@
for (TrackedListener& listener : localListeners) {
if (listener.taskId == taskId) {
seenTasks.insert(taskId);
- listenersAndLayersToReport.push_back({listener, sp<Layer>(layer)});
+ listenersAndLayersToReport.push_back(
+ {listener, sp<Layer>::fromExisting(layer)});
break;
}
}
@@ -90,7 +91,7 @@
void FpsReporter::addListener(const sp<gui::IFpsListener>& listener, int32_t taskId) {
sp<IBinder> asBinder = IInterface::asBinder(listener);
- asBinder->linkToDeath(this);
+ asBinder->linkToDeath(sp<DeathRecipient>::fromExisting(this));
std::lock_guard lock(mMutex);
mListeners.emplace(wp<IBinder>(asBinder), TrackedListener{listener, taskId});
}