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

Commit 91fd88a5 authored by Chaohui Wang's avatar Chaohui Wang
Browse files

Fix first item not a11y focusable in SimListDialog

The root cause is there is a logic to get LayoutParams from parent, but
set to child, which cause some chaos.

This dialog can be started with
`adb shell am start -n com.android.settings/.sim.SimDialogActivity --ei
dialog_type 0`

Bug: 227418839
Test: manual test when Talkback enabled
Change-Id: Ia1014dea49cb5cf372afe5bb50972277309c7f63
parent 8f463f5c
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -38,6 +38,8 @@
            android:background="@drawable/sim_confirm_dialog_rounded_bg"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="@dimen/sims_select_margin_top"
            android:layout_marginBottom="@dimen/sims_select_margin_bottom"
            android:visibility="gone"/>

        <LinearLayout
+0 −10
Original line number Diff line number Diff line
@@ -216,16 +216,6 @@ public class SimListDialogFragment extends SimDialogFragment {
            final TextView title = convertView.findViewById(R.id.title);
            final TextView summary = convertView.findViewById(R.id.summary);

            ViewGroup.MarginLayoutParams lp =
                    (ViewGroup.MarginLayoutParams) parent.getLayoutParams();
            if (lp != null) {
                lp.setMargins(0, mContext.getResources().getDimensionPixelSize(
                        R.dimen.sims_select_margin_top), 0,
                        mContext.getResources().getDimensionPixelSize(
                                R.dimen.sims_select_margin_bottom));
                convertView.setLayoutParams(lp);
            }

            if (sub == null) {
                if (position == 0) {
                    title.setText(R.string.sim_calls_ask_first_prefs_title);