Relayout the immersive cling in the correct thread.
Bug: 11266364 Change-Id: Ia629262ff0c362a5a45b6c5822be080cefcb8c56
This commit is contained in:
@ -201,13 +201,20 @@ public class ImmersiveModeConfirmation {
|
|||||||
private ValueAnimator mColorAnim;
|
private ValueAnimator mColorAnim;
|
||||||
private ViewGroup mClingLayout;
|
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() {
|
private BroadcastReceiver mReceiver = new BroadcastReceiver() {
|
||||||
@Override
|
@Override
|
||||||
public void onReceive(Context context, Intent intent) {
|
public void onReceive(Context context, Intent intent) {
|
||||||
if (intent.getAction().equals(Intent.ACTION_CONFIGURATION_CHANGED)) {
|
if (intent.getAction().equals(Intent.ACTION_CONFIGURATION_CHANGED)) {
|
||||||
if (mClingLayout != null && mClingLayout.getParent() != null) {
|
post(mUpdateLayoutRunnable);
|
||||||
mClingLayout.setLayoutParams(getBubbleLayoutParams());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user