From da35dded4d7882567eab913b25a7cf2f456d2543 Mon Sep 17 00:00:00 2001 From: Daniel Sandler Date: Fri, 18 Oct 2013 12:05:04 -0400 Subject: Relayout the immersive cling in the correct thread. Bug: 11266364 Change-Id: Ia629262ff0c362a5a45b6c5822be080cefcb8c56 --- .../internal/policy/impl/ImmersiveModeConfirmation.java | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'policy/src') diff --git a/policy/src/com/android/internal/policy/impl/ImmersiveModeConfirmation.java b/policy/src/com/android/internal/policy/impl/ImmersiveModeConfirmation.java index dfdcdad5..3e57a77 100644 --- a/policy/src/com/android/internal/policy/impl/ImmersiveModeConfirmation.java +++ b/policy/src/com/android/internal/policy/impl/ImmersiveModeConfirmation.java @@ -201,13 +201,20 @@ public class ImmersiveModeConfirmation { private ValueAnimator mColorAnim; private ViewGroup mClingLayout; + private Runnable mUpdateLayoutRunnable = new Runnable() { + @Override + public void run() { + if (mClingLayout != null && mClingLayout.getParent() != null) { + mClingLayout.setLayoutParams(getBubbleLayoutParams()); + } + } + }; + private BroadcastReceiver mReceiver = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { if (intent.getAction().equals(Intent.ACTION_CONFIGURATION_CHANGED)) { - if (mClingLayout != null && mClingLayout.getParent() != null) { - mClingLayout.setLayoutParams(getBubbleLayoutParams()); - } + post(mUpdateLayoutRunnable); } } }; -- cgit v1.1