Use main looper to post start animation commands
This is a workaround till we find a better solution. Posting start() on mail looper will make sure the animation starts but animation can stop randomly when the list gets refreshed which happens for example any time the user interacts with the list by check/uncheking boxes. This is because the list rebuilds itself and views gets detached/attached which binds to a new view. The long term solution is to switch to the new animator framework but for now posting on main looper will be consistent with GB behavior. Bug: 3426585 Change-Id: I77f15873bb47ad05113dc914a5d3d6d8af27e2e8
This commit is contained in:
@@ -20,6 +20,7 @@ import com.android.settings.R;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.drawable.AnimationDrawable;
|
||||
import android.os.Handler;
|
||||
import android.preference.CheckBoxPreference;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.View;
|
||||
@@ -67,7 +68,7 @@ public class SyncStateCheckBoxPreference extends CheckBoxPreference {
|
||||
boolean showError;
|
||||
boolean showPending;
|
||||
if (mIsActive) {
|
||||
syncActiveView.post(new Runnable() {
|
||||
new Handler(getContext().getMainLooper()).post(new Runnable() {
|
||||
public void run() {
|
||||
anim.start();
|
||||
}
|
||||
|
Reference in New Issue
Block a user