Merge "Ensure onDarkIntensity is called on the proper thread." into qt-dev

This commit is contained in:
TreeHugger Robot
2019-06-14 19:16:44 +00:00
committed by Android (Google) Code Review

View File

@@ -768,6 +768,10 @@ public class ScreenDecorations extends SystemUI implements Tunable,
@Override
public void onDarkIntensity(float darkIntensity) {
if (!mHandler.getLooper().isCurrentThread()) {
mHandler.post(() -> onDarkIntensity(darkIntensity));
return;
}
if (mOverlay != null) {
CornerHandleView assistHintTopLeft = mOverlay.findViewById(R.id.assist_hint_left);
CornerHandleView assistHintTopRight = mOverlay.findViewById(R.id.assist_hint_right);