blob: e6cdd02d710c0d4f7fadfd6250decbb0f169a43e [file] [log] [blame]
Lloyd Pique24b0a482018-03-09 18:52:26 -08001/*
2 * Copyright (C) 2018 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#undef LOG_TAG
18#define LOG_TAG "LibSurfaceFlingerUnittests"
19
20#include <gmock/gmock.h>
21#include <gtest/gtest.h>
22
23#include <log/log.h>
24
25#include <utils/Errors.h>
26
27#include "AsyncCallRecorder.h"
Ana Krulecfefcb582018-08-07 14:22:37 -070028#include "Scheduler/EventThread.h"
Lloyd Pique24b0a482018-03-09 18:52:26 -080029
30using namespace std::chrono_literals;
31using namespace std::placeholders;
32
33using testing::_;
34using testing::Invoke;
35
36namespace android {
37namespace {
38
39class MockVSyncSource : public VSyncSource {
40public:
41 MOCK_METHOD1(setVSyncEnabled, void(bool));
42 MOCK_METHOD1(setCallback, void(VSyncSource::Callback*));
43 MOCK_METHOD1(setPhaseOffset, void(nsecs_t));
44};
45
46} // namespace
47
48class EventThreadTest : public testing::Test {
49protected:
Dominik Laskowskif654d572018-12-20 11:03:06 -080050 class MockEventThreadConnection : public EventThreadConnection {
Lloyd Pique24b0a482018-03-09 18:52:26 -080051 public:
Dominik Laskowskif654d572018-12-20 11:03:06 -080052 MockEventThreadConnection(android::impl::EventThread* eventThread,
53 ResyncCallback&& resyncCallback)
54 : EventThreadConnection(eventThread, std::move(resyncCallback)) {}
Lloyd Pique24b0a482018-03-09 18:52:26 -080055 MOCK_METHOD1(postEvent, status_t(const DisplayEventReceiver::Event& event));
56 };
57
58 using ConnectionEventRecorder =
59 AsyncCallRecorderWithCannedReturn<status_t (*)(const DisplayEventReceiver::Event&)>;
60
61 EventThreadTest();
62 ~EventThreadTest() override;
63
64 void createThread();
65 sp<MockEventThreadConnection> createConnection(ConnectionEventRecorder& recorder);
66
67 void expectVSyncSetEnabledCallReceived(bool expectedState);
68 void expectVSyncSetPhaseOffsetCallReceived(nsecs_t expectedPhaseOffset);
69 VSyncSource::Callback* expectVSyncSetCallbackCallReceived();
70 void expectInterceptCallReceived(nsecs_t expectedTimestamp);
71 void expectVsyncEventReceivedByConnection(const char* name,
72 ConnectionEventRecorder& connectionEventRecorder,
73 nsecs_t expectedTimestamp, unsigned expectedCount);
74 void expectVsyncEventReceivedByConnection(nsecs_t expectedTimestamp, unsigned expectedCount);
Dominik Laskowski00a6fa22018-06-06 16:42:02 -070075 void expectHotplugEventReceivedByConnection(EventThread::DisplayType expectedDisplayType,
76 bool expectedConnected);
Lloyd Pique24b0a482018-03-09 18:52:26 -080077
78 AsyncCallRecorder<void (*)(bool)> mVSyncSetEnabledCallRecorder;
79 AsyncCallRecorder<void (*)(VSyncSource::Callback*)> mVSyncSetCallbackCallRecorder;
80 AsyncCallRecorder<void (*)(nsecs_t)> mVSyncSetPhaseOffsetCallRecorder;
81 AsyncCallRecorder<void (*)()> mResyncCallRecorder;
82 AsyncCallRecorder<void (*)(nsecs_t)> mInterceptVSyncCallRecorder;
83 ConnectionEventRecorder mConnectionEventCallRecorder{0};
84
85 MockVSyncSource mVSyncSource;
Dominik Laskowski029cc122019-01-23 19:52:06 -080086 VSyncSource::Callback* mCallback = nullptr;
Lloyd Pique24b0a482018-03-09 18:52:26 -080087 std::unique_ptr<android::impl::EventThread> mThread;
88 sp<MockEventThreadConnection> mConnection;
89};
90
91EventThreadTest::EventThreadTest() {
92 const ::testing::TestInfo* const test_info =
93 ::testing::UnitTest::GetInstance()->current_test_info();
94 ALOGD("**** Setting up for %s.%s\n", test_info->test_case_name(), test_info->name());
95
96 EXPECT_CALL(mVSyncSource, setVSyncEnabled(_))
97 .WillRepeatedly(Invoke(mVSyncSetEnabledCallRecorder.getInvocable()));
98
99 EXPECT_CALL(mVSyncSource, setCallback(_))
100 .WillRepeatedly(Invoke(mVSyncSetCallbackCallRecorder.getInvocable()));
101
102 EXPECT_CALL(mVSyncSource, setPhaseOffset(_))
103 .WillRepeatedly(Invoke(mVSyncSetPhaseOffsetCallRecorder.getInvocable()));
104
105 createThread();
106 mConnection = createConnection(mConnectionEventCallRecorder);
107}
108
109EventThreadTest::~EventThreadTest() {
110 const ::testing::TestInfo* const test_info =
111 ::testing::UnitTest::GetInstance()->current_test_info();
112 ALOGD("**** Tearing down after %s.%s\n", test_info->test_case_name(), test_info->name());
Dominik Laskowski029cc122019-01-23 19:52:06 -0800113
114 // EventThread should unregister itself as VSyncSource callback.
115 EXPECT_FALSE(expectVSyncSetCallbackCallReceived());
Lloyd Pique24b0a482018-03-09 18:52:26 -0800116}
117
118void EventThreadTest::createThread() {
119 mThread =
120 std::make_unique<android::impl::EventThread>(&mVSyncSource,
Lloyd Pique24b0a482018-03-09 18:52:26 -0800121 mInterceptVSyncCallRecorder.getInvocable(),
122 "unit-test-event-thread");
Dominik Laskowski029cc122019-01-23 19:52:06 -0800123
124 // EventThread should register itself as VSyncSource callback.
125 mCallback = expectVSyncSetCallbackCallReceived();
126 ASSERT_TRUE(mCallback);
Lloyd Pique24b0a482018-03-09 18:52:26 -0800127}
128
129sp<EventThreadTest::MockEventThreadConnection> EventThreadTest::createConnection(
130 ConnectionEventRecorder& recorder) {
Dominik Laskowskif654d572018-12-20 11:03:06 -0800131 sp<MockEventThreadConnection> connection =
132 new MockEventThreadConnection(mThread.get(), mResyncCallRecorder.getInvocable());
Lloyd Pique24b0a482018-03-09 18:52:26 -0800133 EXPECT_CALL(*connection, postEvent(_)).WillRepeatedly(Invoke(recorder.getInvocable()));
134 return connection;
135}
136
137void EventThreadTest::expectVSyncSetEnabledCallReceived(bool expectedState) {
138 auto args = mVSyncSetEnabledCallRecorder.waitForCall();
139 ASSERT_TRUE(args.has_value());
140 EXPECT_EQ(expectedState, std::get<0>(args.value()));
141}
142
143void EventThreadTest::expectVSyncSetPhaseOffsetCallReceived(nsecs_t expectedPhaseOffset) {
144 auto args = mVSyncSetPhaseOffsetCallRecorder.waitForCall();
145 ASSERT_TRUE(args.has_value());
146 EXPECT_EQ(expectedPhaseOffset, std::get<0>(args.value()));
147}
148
149VSyncSource::Callback* EventThreadTest::expectVSyncSetCallbackCallReceived() {
150 auto callbackSet = mVSyncSetCallbackCallRecorder.waitForCall();
151 return callbackSet.has_value() ? std::get<0>(callbackSet.value()) : nullptr;
152}
153
154void EventThreadTest::expectInterceptCallReceived(nsecs_t expectedTimestamp) {
155 auto args = mInterceptVSyncCallRecorder.waitForCall();
156 ASSERT_TRUE(args.has_value());
157 EXPECT_EQ(expectedTimestamp, std::get<0>(args.value()));
158}
159
160void EventThreadTest::expectVsyncEventReceivedByConnection(
161 const char* name, ConnectionEventRecorder& connectionEventRecorder,
162 nsecs_t expectedTimestamp, unsigned expectedCount) {
163 auto args = connectionEventRecorder.waitForCall();
164 ASSERT_TRUE(args.has_value()) << name << " did not receive an event for timestamp "
165 << expectedTimestamp;
166 const auto& event = std::get<0>(args.value());
167 EXPECT_EQ(DisplayEventReceiver::DISPLAY_EVENT_VSYNC, event.header.type)
168 << name << " did not get the correct event for timestamp " << expectedTimestamp;
169 EXPECT_EQ(expectedTimestamp, event.header.timestamp)
170 << name << " did not get the expected timestamp for timestamp " << expectedTimestamp;
171 EXPECT_EQ(expectedCount, event.vsync.count)
172 << name << " did not get the expected count for timestamp " << expectedTimestamp;
173}
174
175void EventThreadTest::expectVsyncEventReceivedByConnection(nsecs_t expectedTimestamp,
176 unsigned expectedCount) {
177 expectVsyncEventReceivedByConnection("mConnectionEventCallRecorder",
178 mConnectionEventCallRecorder, expectedTimestamp,
179 expectedCount);
180}
181
Dominik Laskowski00a6fa22018-06-06 16:42:02 -0700182void EventThreadTest::expectHotplugEventReceivedByConnection(
183 EventThread::DisplayType expectedDisplayType, bool expectedConnected) {
184 const uint32_t expectedDisplayId =
185 expectedDisplayType == EventThread::DisplayType::Primary ? 0 : 1;
186
Lloyd Pique24b0a482018-03-09 18:52:26 -0800187 auto args = mConnectionEventCallRecorder.waitForCall();
188 ASSERT_TRUE(args.has_value());
189 const auto& event = std::get<0>(args.value());
190 EXPECT_EQ(DisplayEventReceiver::DISPLAY_EVENT_HOTPLUG, event.header.type);
Dominik Laskowski00a6fa22018-06-06 16:42:02 -0700191 EXPECT_EQ(expectedDisplayId, event.header.id);
Lloyd Pique24b0a482018-03-09 18:52:26 -0800192 EXPECT_EQ(expectedConnected, event.hotplug.connected);
193}
194
195namespace {
196
197/* ------------------------------------------------------------------------
198 * Test cases
199 */
200
201TEST_F(EventThreadTest, canCreateAndDestroyThreadWithNoEventsSent) {
202 EXPECT_FALSE(mVSyncSetEnabledCallRecorder.waitForUnexpectedCall().has_value());
203 EXPECT_FALSE(mVSyncSetCallbackCallRecorder.waitForCall(0us).has_value());
204 EXPECT_FALSE(mVSyncSetPhaseOffsetCallRecorder.waitForCall(0us).has_value());
205 EXPECT_FALSE(mResyncCallRecorder.waitForCall(0us).has_value());
206 EXPECT_FALSE(mInterceptVSyncCallRecorder.waitForCall(0us).has_value());
207 EXPECT_FALSE(mConnectionEventCallRecorder.waitForCall(0us).has_value());
208}
209
210TEST_F(EventThreadTest, requestNextVsyncPostsASingleVSyncEventToTheConnection) {
211 // Signal that we want the next vsync event to be posted to the connection
Ana Krulec7d1d6832018-12-27 11:10:09 -0800212 mThread->requestNextVsync(mConnection, false);
Lloyd Pique24b0a482018-03-09 18:52:26 -0800213
214 // EventThread should immediately request a resync.
215 EXPECT_TRUE(mResyncCallRecorder.waitForCall().has_value());
216
Dominik Laskowski029cc122019-01-23 19:52:06 -0800217 // EventThread should enable vsync callbacks.
Lloyd Pique24b0a482018-03-09 18:52:26 -0800218 expectVSyncSetEnabledCallReceived(true);
Lloyd Pique24b0a482018-03-09 18:52:26 -0800219
220 // Use the received callback to signal a first vsync event.
221 // The interceptor should receive the event, as well as the connection.
Dominik Laskowski029cc122019-01-23 19:52:06 -0800222 mCallback->onVSyncEvent(123);
Lloyd Pique24b0a482018-03-09 18:52:26 -0800223 expectInterceptCallReceived(123);
224 expectVsyncEventReceivedByConnection(123, 1u);
225
226 // Use the received callback to signal a second vsync event.
227 // The interceptor should receive the event, but the the connection should
228 // not as it was only interested in the first.
Dominik Laskowski029cc122019-01-23 19:52:06 -0800229 mCallback->onVSyncEvent(456);
Lloyd Pique24b0a482018-03-09 18:52:26 -0800230 expectInterceptCallReceived(456);
231 EXPECT_FALSE(mConnectionEventCallRecorder.waitForUnexpectedCall().has_value());
232
233 // EventThread should also detect that at this point that it does not need
234 // any more vsync events, and should disable their generation.
235 expectVSyncSetEnabledCallReceived(false);
236}
237
238TEST_F(EventThreadTest, setVsyncRateZeroPostsNoVSyncEventsToThatConnection) {
239 // Create a first connection, register it, and request a vsync rate of zero.
240 ConnectionEventRecorder firstConnectionEventRecorder{0};
241 sp<MockEventThreadConnection> firstConnection = createConnection(firstConnectionEventRecorder);
242 mThread->setVsyncRate(0, firstConnection);
243
244 // By itself, this should not enable vsync events
245 EXPECT_FALSE(mVSyncSetEnabledCallRecorder.waitForUnexpectedCall().has_value());
246 EXPECT_FALSE(mVSyncSetCallbackCallRecorder.waitForCall(0us).has_value());
247
248 // However if there is another connection which wants events at a nonzero rate.....
249 ConnectionEventRecorder secondConnectionEventRecorder{0};
250 sp<MockEventThreadConnection> secondConnection =
251 createConnection(secondConnectionEventRecorder);
252 mThread->setVsyncRate(1, secondConnection);
253
Dominik Laskowski029cc122019-01-23 19:52:06 -0800254 // EventThread should enable vsync callbacks.
Lloyd Pique24b0a482018-03-09 18:52:26 -0800255 expectVSyncSetEnabledCallReceived(true);
Lloyd Pique24b0a482018-03-09 18:52:26 -0800256
257 // Send a vsync event. EventThread should then make a call to the
258 // interceptor, and the second connection. The first connection should not
259 // get the event.
Dominik Laskowski029cc122019-01-23 19:52:06 -0800260 mCallback->onVSyncEvent(123);
Lloyd Pique24b0a482018-03-09 18:52:26 -0800261 expectInterceptCallReceived(123);
262 EXPECT_FALSE(firstConnectionEventRecorder.waitForUnexpectedCall().has_value());
263 expectVsyncEventReceivedByConnection("secondConnection", secondConnectionEventRecorder, 123,
264 1u);
265}
266
267TEST_F(EventThreadTest, setVsyncRateOnePostsAllEventsToThatConnection) {
268 mThread->setVsyncRate(1, mConnection);
269
Dominik Laskowski029cc122019-01-23 19:52:06 -0800270 // EventThread should enable vsync callbacks.
Lloyd Pique24b0a482018-03-09 18:52:26 -0800271 expectVSyncSetEnabledCallReceived(true);
Lloyd Pique24b0a482018-03-09 18:52:26 -0800272
273 // Send a vsync event. EventThread should then make a call to the
274 // interceptor, and the connection.
Dominik Laskowski029cc122019-01-23 19:52:06 -0800275 mCallback->onVSyncEvent(123);
Lloyd Pique24b0a482018-03-09 18:52:26 -0800276 expectInterceptCallReceived(123);
277 expectVsyncEventReceivedByConnection(123, 1u);
278
279 // A second event should go to the same places.
Dominik Laskowski029cc122019-01-23 19:52:06 -0800280 mCallback->onVSyncEvent(456);
Lloyd Pique24b0a482018-03-09 18:52:26 -0800281 expectInterceptCallReceived(456);
282 expectVsyncEventReceivedByConnection(456, 2u);
283
284 // A third event should go to the same places.
Dominik Laskowski029cc122019-01-23 19:52:06 -0800285 mCallback->onVSyncEvent(789);
Lloyd Pique24b0a482018-03-09 18:52:26 -0800286 expectInterceptCallReceived(789);
287 expectVsyncEventReceivedByConnection(789, 3u);
288}
289
290TEST_F(EventThreadTest, setVsyncRateTwoPostsEveryOtherEventToThatConnection) {
291 mThread->setVsyncRate(2, mConnection);
292
Dominik Laskowski029cc122019-01-23 19:52:06 -0800293 // EventThread should enable vsync callbacks.
Lloyd Pique24b0a482018-03-09 18:52:26 -0800294 expectVSyncSetEnabledCallReceived(true);
Lloyd Pique24b0a482018-03-09 18:52:26 -0800295
296 // The first event will be seen by the interceptor, and not the connection.
Dominik Laskowski029cc122019-01-23 19:52:06 -0800297 mCallback->onVSyncEvent(123);
Lloyd Pique24b0a482018-03-09 18:52:26 -0800298 expectInterceptCallReceived(123);
299 EXPECT_FALSE(mConnectionEventCallRecorder.waitForUnexpectedCall().has_value());
300
301 // The second event will be seen by the interceptor and the connection.
Dominik Laskowski029cc122019-01-23 19:52:06 -0800302 mCallback->onVSyncEvent(456);
Lloyd Pique24b0a482018-03-09 18:52:26 -0800303 expectInterceptCallReceived(456);
304 expectVsyncEventReceivedByConnection(456, 2u);
305
306 // The third event will be seen by the interceptor, and not the connection.
Dominik Laskowski029cc122019-01-23 19:52:06 -0800307 mCallback->onVSyncEvent(789);
Lloyd Pique24b0a482018-03-09 18:52:26 -0800308 expectInterceptCallReceived(789);
309 EXPECT_FALSE(mConnectionEventCallRecorder.waitForUnexpectedCall().has_value());
310
311 // The fourth event will be seen by the interceptor and the connection.
Dominik Laskowski029cc122019-01-23 19:52:06 -0800312 mCallback->onVSyncEvent(101112);
Lloyd Pique24b0a482018-03-09 18:52:26 -0800313 expectInterceptCallReceived(101112);
314 expectVsyncEventReceivedByConnection(101112, 4u);
315}
316
317TEST_F(EventThreadTest, connectionsRemovedIfInstanceDestroyed) {
318 mThread->setVsyncRate(1, mConnection);
319
Dominik Laskowski029cc122019-01-23 19:52:06 -0800320 // EventThread should enable vsync callbacks.
Lloyd Pique24b0a482018-03-09 18:52:26 -0800321 expectVSyncSetEnabledCallReceived(true);
Lloyd Pique24b0a482018-03-09 18:52:26 -0800322
323 // Destroy the only (strong) reference to the connection.
324 mConnection = nullptr;
325
326 // The first event will be seen by the interceptor, and not the connection.
Dominik Laskowski029cc122019-01-23 19:52:06 -0800327 mCallback->onVSyncEvent(123);
Lloyd Pique24b0a482018-03-09 18:52:26 -0800328 expectInterceptCallReceived(123);
329 EXPECT_FALSE(mConnectionEventCallRecorder.waitForUnexpectedCall().has_value());
330
331 // EventThread should disable vsync callbacks
332 expectVSyncSetEnabledCallReceived(false);
333}
334
335TEST_F(EventThreadTest, connectionsRemovedIfEventDeliveryError) {
336 ConnectionEventRecorder errorConnectionEventRecorder{NO_MEMORY};
337 sp<MockEventThreadConnection> errorConnection = createConnection(errorConnectionEventRecorder);
338 mThread->setVsyncRate(1, errorConnection);
339
Dominik Laskowski029cc122019-01-23 19:52:06 -0800340 // EventThread should enable vsync callbacks.
Lloyd Pique24b0a482018-03-09 18:52:26 -0800341 expectVSyncSetEnabledCallReceived(true);
Lloyd Pique24b0a482018-03-09 18:52:26 -0800342
343 // The first event will be seen by the interceptor, and by the connection,
344 // which then returns an error.
Dominik Laskowski029cc122019-01-23 19:52:06 -0800345 mCallback->onVSyncEvent(123);
Lloyd Pique24b0a482018-03-09 18:52:26 -0800346 expectInterceptCallReceived(123);
347 expectVsyncEventReceivedByConnection("errorConnection", errorConnectionEventRecorder, 123, 1u);
348
349 // A subsequent event will be seen by the interceptor and not by the
350 // connection.
Dominik Laskowski029cc122019-01-23 19:52:06 -0800351 mCallback->onVSyncEvent(456);
Lloyd Pique24b0a482018-03-09 18:52:26 -0800352 expectInterceptCallReceived(456);
353 EXPECT_FALSE(errorConnectionEventRecorder.waitForUnexpectedCall().has_value());
354
355 // EventThread should disable vsync callbacks with the second event
356 expectVSyncSetEnabledCallReceived(false);
357}
358
359TEST_F(EventThreadTest, eventsDroppedIfNonfatalEventDeliveryError) {
360 ConnectionEventRecorder errorConnectionEventRecorder{WOULD_BLOCK};
361 sp<MockEventThreadConnection> errorConnection = createConnection(errorConnectionEventRecorder);
362 mThread->setVsyncRate(1, errorConnection);
363
Dominik Laskowski029cc122019-01-23 19:52:06 -0800364 // EventThread should enable vsync callbacks.
Lloyd Pique24b0a482018-03-09 18:52:26 -0800365 expectVSyncSetEnabledCallReceived(true);
Lloyd Pique24b0a482018-03-09 18:52:26 -0800366
367 // The first event will be seen by the interceptor, and by the connection,
368 // which then returns an non-fatal error.
Dominik Laskowski029cc122019-01-23 19:52:06 -0800369 mCallback->onVSyncEvent(123);
Lloyd Pique24b0a482018-03-09 18:52:26 -0800370 expectInterceptCallReceived(123);
371 expectVsyncEventReceivedByConnection("errorConnection", errorConnectionEventRecorder, 123, 1u);
372
373 // A subsequent event will be seen by the interceptor, and by the connection,
374 // which still then returns an non-fatal error.
Dominik Laskowski029cc122019-01-23 19:52:06 -0800375 mCallback->onVSyncEvent(456);
Lloyd Pique24b0a482018-03-09 18:52:26 -0800376 expectInterceptCallReceived(456);
377 expectVsyncEventReceivedByConnection("errorConnection", errorConnectionEventRecorder, 456, 2u);
378
379 // EventThread will not disable vsync callbacks as the errors are non-fatal.
380 EXPECT_FALSE(mVSyncSetEnabledCallRecorder.waitForUnexpectedCall().has_value());
381}
382
383TEST_F(EventThreadTest, setPhaseOffsetForwardsToVSyncSource) {
384 mThread->setPhaseOffset(321);
385 expectVSyncSetPhaseOffsetCallReceived(321);
386}
387
388TEST_F(EventThreadTest, postHotplugPrimaryDisconnect) {
Dominik Laskowski00a6fa22018-06-06 16:42:02 -0700389 mThread->onHotplugReceived(EventThread::DisplayType::Primary, false);
390 expectHotplugEventReceivedByConnection(EventThread::DisplayType::Primary, false);
Lloyd Pique24b0a482018-03-09 18:52:26 -0800391}
392
393TEST_F(EventThreadTest, postHotplugPrimaryConnect) {
Dominik Laskowski00a6fa22018-06-06 16:42:02 -0700394 mThread->onHotplugReceived(EventThread::DisplayType::Primary, true);
395 expectHotplugEventReceivedByConnection(EventThread::DisplayType::Primary, true);
Lloyd Pique24b0a482018-03-09 18:52:26 -0800396}
397
398TEST_F(EventThreadTest, postHotplugExternalDisconnect) {
Dominik Laskowski00a6fa22018-06-06 16:42:02 -0700399 mThread->onHotplugReceived(EventThread::DisplayType::External, false);
400 expectHotplugEventReceivedByConnection(EventThread::DisplayType::External, false);
Lloyd Pique24b0a482018-03-09 18:52:26 -0800401}
402
403TEST_F(EventThreadTest, postHotplugExternalConnect) {
Dominik Laskowski00a6fa22018-06-06 16:42:02 -0700404 mThread->onHotplugReceived(EventThread::DisplayType::External, true);
405 expectHotplugEventReceivedByConnection(EventThread::DisplayType::External, true);
Lloyd Pique24b0a482018-03-09 18:52:26 -0800406}
407
408} // namespace
409} // namespace android