Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 918b9010 authored by Adam Powell's avatar Adam Powell
Browse files

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
parent 7ba59c35
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -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) {
            }
        });
    }

    /**