From 918b90108b850904c4c2e194c2419529586250d8 Mon Sep 17 00:00:00 2001 From: Adam Powell Date: Mon, 19 Oct 2015 16:25:08 -0700 Subject: DO NOT MERGE Fix jank when intent resolver/chooser windows animate in An old optimization in ViewRoot prevents updating a window surface while a window animation is playing. SystemUI and other small system components that blend these animations disable this for a smoother experience. Disable it in ResolverActivity as well. Bug 24989381 Change-Id: Iac7d1c7b1101ed8d2bc4c3557277a773ce871beb --- core/java/com/android/internal/app/ResolverActivity.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/core/java/com/android/internal/app/ResolverActivity.java b/core/java/com/android/internal/app/ResolverActivity.java index ba0912a5536a..4ba678cfbeec 100644 --- a/core/java/com/android/internal/app/ResolverActivity.java +++ b/core/java/com/android/internal/app/ResolverActivity.java @@ -26,6 +26,7 @@ import android.os.AsyncTask; import android.provider.Settings; import android.text.TextUtils; import android.util.Slog; +import android.view.View.OnAttachStateChangeListener; import android.widget.AbsListView; import com.android.internal.R; import com.android.internal.content.PackageMonitor; @@ -331,6 +332,18 @@ public class ResolverActivity extends Activity { if (isVoiceInteraction()) { onSetupVoiceInteraction(); } + + getWindow().getDecorView().addOnAttachStateChangeListener( + new OnAttachStateChangeListener() { + @Override + public void onViewAttachedToWindow(View v) { + v.getViewRootImpl().setDrawDuringWindowsAnimating(true); + } + + @Override + public void onViewDetachedFromWindow(View v) { + } + }); } /** -- cgit v1.2.3-59-g8ed1b