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

Commit 0c0df794 authored by Jason Monk's avatar Jason Monk
Browse files

QS Edit: Fix auto-selecting add location

We depend on a layout listener for when we ask for focus, but layout
sometimes doesn't happen.  Make it always happen.

Change-Id: I7c805470c6ce9863bf7eac627f59d49191ce8946
Fixes: 29126464
parent a3453b8b
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -37,6 +37,7 @@ import android.view.ViewGroup;
import android.view.accessibility.AccessibilityManager;
import android.widget.FrameLayout;
import android.widget.TextView;

import com.android.internal.logging.MetricsLogger;
import com.android.internal.logging.MetricsProto;
import com.android.systemui.R;
@@ -227,6 +228,8 @@ public class TileAdapter extends RecyclerView.Adapter<Holder> implements TileSta
            });
            if (mNeedsFocus) {
                // Wait for this to get laid out then set its focus.
                // Ensure that tile gets laid out so we get the callback.
                holder.mTileView.requestLayout();
                holder.mTileView.addOnLayoutChangeListener(new OnLayoutChangeListener() {
                    @Override
                    public void onLayoutChange(View v, int left, int top, int right, int bottom,