From 352e9f0b7a60e9f8ee9a8adc767bca1a944a12c2 Mon Sep 17 00:00:00 2001 From: John Reck Date: Thu, 14 Feb 2019 16:26:08 -0800 Subject: [PATCH] Add missing Looper::setForThread Unlike the Java Looper the native one requires manually setting of the looper for a particular thread. So... do that. Fixes: 124467483 Test: really good guess Change-Id: Iac9b4a052e79228aea5760262996729d8dadb1b8 --- libs/hwui/thread/ThreadBase.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libs/hwui/thread/ThreadBase.h b/libs/hwui/thread/ThreadBase.h index 8cdcc46b97fb4..0289d3fd2ef79 100644 --- a/libs/hwui/thread/ThreadBase.h +++ b/libs/hwui/thread/ThreadBase.h @@ -68,10 +68,12 @@ protected: void processQueue() { mQueue.process(); } virtual bool threadLoop() override { + Looper::setForThread(mLooper); while (!exitPending()) { waitForWork(); processQueue(); } + Looper::setForThread(nullptr); return false; }