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

Commit 0dcd61e9 authored by Roy Chou's avatar Roy Chou Committed by Android (Google) Code Review
Browse files

Merge "fix(accessibility suw): fix unexpected large padding in accessibility...

Merge "fix(accessibility suw): fix unexpected large padding in accessibility suw when force-two-pane mode" into main
parents ae7008c0 f85bca36
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@ import androidx.annotation.StringRes;
import com.google.android.setupcompat.template.FooterBarMixin;
import com.google.android.setupcompat.template.FooterButton;
import com.google.android.setupcompat.template.Mixin;
import com.google.android.setupcompat.util.ForceTwoPaneHelper;
import com.google.android.setupdesign.GlifPreferenceLayout;
import com.google.android.setupdesign.R;
import com.google.android.setupdesign.util.ThemeHelper;
@@ -63,6 +64,16 @@ public class AccessibilitySetupWizardUtils {
        layout.setDividerInsets(Integer.MAX_VALUE, 0);

        if (ThemeHelper.shouldApplyMaterialYouStyle(context)) {
            // For b/323771329#comment26, if the layout is forced-two-pan, we should not adjust the
            // headerLayout horizontal padding to 0, which will make an unexpected large padding on
            // two-pane layout.
            // TODO: This is just a short-term quick workaround for force-two-pane devices padding
            //  issue. The long-term goal here is to remove the header padding adjustment since it
            //  should be handled in setup design lib. (b/331878747)
            if (ForceTwoPaneHelper.shouldForceTwoPane(context)) {
                return;
            }

            final LinearLayout headerLayout = layout.findManagedViewById(R.id.sud_layout_header);
            if (headerLayout != null) {
                headerLayout.setPadding(0, layout.getPaddingTop(), 0,