Merge "Refactor BufferHubBuffer to use hwbinder"
diff --git a/services/displayservice/include/displayservice/DisplayEventReceiver.h b/services/displayservice/include/displayservice/DisplayEventReceiver.h
index 5d569b6..042a054 100644
--- a/services/displayservice/include/displayservice/DisplayEventReceiver.h
+++ b/services/displayservice/include/displayservice/DisplayEventReceiver.h
@@ -45,7 +45,7 @@
using FwkReceiver = ::android::DisplayEventReceiver;
struct AttachedEvent : LooperCallback {
- AttachedEvent(const sp<IEventCallback> &callback);
+ explicit AttachedEvent(const sp<IEventCallback> &callback);
~AttachedEvent();
bool detach();
diff --git a/services/inputflinger/InputDispatcher.cpp b/services/inputflinger/InputDispatcher.cpp
index 0bde5fd..72b7969 100644
--- a/services/inputflinger/InputDispatcher.cpp
+++ b/services/inputflinger/InputDispatcher.cpp
@@ -3374,11 +3374,6 @@
mLooper->wake();
}
-bool InputDispatcher::transferTouchFocus(const sp<InputChannel>& fromChannel,
- const sp<InputChannel>& toChannel) {
- return transferTouchFocus(fromChannel->getToken(), toChannel->getToken());
-}
-
bool InputDispatcher::transferTouchFocus(const sp<IBinder>& fromToken, const sp<IBinder>& toToken) {
if (fromToken == toToken) {
#if DEBUG_FOCUS
@@ -3392,14 +3387,14 @@
sp<InputWindowHandle> fromWindowHandle = getWindowHandleLocked(fromToken);
sp<InputWindowHandle> toWindowHandle = getWindowHandleLocked(toToken);
-#if DEBUG_FOCUS
- ALOGD("transferTouchFocus: fromWindowHandle=%s, toWindowHandle=%s",
- fromWindowHandle->getName().c_str(), toWindowHandle->getName().c_str());
-#endif
if (fromWindowHandle == nullptr || toWindowHandle == nullptr) {
ALOGW("Cannot transfer focus because from or to window not found.");
return false;
}
+#if DEBUG_FOCUS
+ ALOGD("transferTouchFocus: fromWindowHandle=%s, toWindowHandle=%s",
+ fromWindowHandle->getName().c_str(), toWindowHandle->getName().c_str());
+#endif
if (fromWindowHandle->getInfo()->displayId != toWindowHandle->getInfo()->displayId) {
#if DEBUG_FOCUS
ALOGD("Cannot transfer focus because windows are on different displays.");
diff --git a/services/inputflinger/InputDispatcher.h b/services/inputflinger/InputDispatcher.h
index ecd5cb9..00390a7 100644
--- a/services/inputflinger/InputDispatcher.h
+++ b/services/inputflinger/InputDispatcher.h
@@ -349,9 +349,6 @@
*/
virtual bool transferTouchFocus(const sp<IBinder>& fromToken, const sp<IBinder>& toToken) = 0;
- virtual bool transferTouchFocus(const sp<InputChannel>& fromChannel,
- const sp<InputChannel>& toChannel) = 0;
-
/* Registers input channels that may be used as targets for input events.
* If inputWindowHandle is null, and displayId is not ADISPLAY_ID_NONE,
* the channel will receive a copy of all input events form the specific displayId.
@@ -416,8 +413,6 @@
virtual void setInputFilterEnabled(bool enabled);
virtual bool transferTouchFocus(const sp<IBinder>& fromToken, const sp<IBinder>& toToken);
- virtual bool transferTouchFocus(const sp<InputChannel>& fromChannel,
- const sp<InputChannel>& toChannel);
virtual status_t registerInputChannel(const sp<InputChannel>& inputChannel,
int32_t displayId);