summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Sandler <dsandler@android.com>2013-10-18 12:05:04 -0400
committerThe Android Automerger <android-build@google.com>2013-10-18 14:48:56 -0700
commit9c4f5904afc14b91786c4882912141da58398401 (patch)
treee16193c32a9febada818e00a7f4dd8ae822e0533
parent413100d247ec9674b63b2175ecbafecb90a2df14 (diff)
downloadbase-9c4f5904afc14b91786c4882912141da58398401.tar.gz
Relayout the immersive cling in the correct thread.
Bug: 11266364 Change-Id: Ia629262ff0c362a5a45b6c5822be080cefcb8c56
-rw-r--r--policy/src/com/android/internal/policy/impl/ImmersiveModeConfirmation.java13
1 files changed, 10 insertions, 3 deletions
diff --git a/policy/src/com/android/internal/policy/impl/ImmersiveModeConfirmation.java b/policy/src/com/android/internal/policy/impl/ImmersiveModeConfirmation.java
index dfdcdad5874b..3e57a77807c4 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);
}
}
};