diff --git a/src/com/android/customization/model/color/ColorSectionController.java b/src/com/android/customization/model/color/ColorSectionController.java
index c31f01e..be051ac 100644
--- a/src/com/android/customization/model/color/ColorSectionController.java
+++ b/src/com/android/customization/model/color/ColorSectionController.java
@@ -41,7 +41,6 @@
 import androidx.annotation.Nullable;
 import androidx.lifecycle.LifecycleOwner;
 import androidx.recyclerview.widget.RecyclerView;
-import androidx.viewpager2.widget.MarginPageTransformer;
 import androidx.viewpager2.widget.ViewPager2;
 
 import com.android.customization.model.CustomizationManager;
@@ -54,7 +53,6 @@
 import com.android.wallpaper.model.CustomizationSectionController;
 import com.android.wallpaper.model.WallpaperColorsViewModel;
 import com.android.wallpaper.module.InjectorProvider;
-import com.android.wallpaper.module.LargeScreenMultiPanesChecker;
 import com.android.wallpaper.widget.PageIndicator;
 import com.android.wallpaper.widget.SeparatedTabLayout;
 
@@ -104,7 +102,6 @@
             new Optional[]{Optional.empty(), Optional.empty()};
     private long mLastColorApplyingTime = 0L;
     private ColorSectionView mColorSectionView;
-    private boolean mIsMultiPane;
 
     private static int getNumPages(int optionsPerPage, int totalOptions) {
         return (int) Math.ceil((float) totalOptions / optionsPerPage);
@@ -118,7 +115,6 @@
                 new OverlayManagerCompat(activity));
         mWallpaperColorsViewModel = viewModel;
         mLifecycleOwner = lifecycleOwner;
-        mIsMultiPane = new LargeScreenMultiPanesChecker().isMultiPanesEnabled(activity);
 
         if (savedInstanceState != null) {
             if (savedInstanceState.containsKey(KEY_COLOR_TAB_POSITION)) {
@@ -326,10 +322,8 @@
             subOptions = colorOptions;
         }
 
-        final int padding = container.getContext().getResources().getDimensionPixelSize(
-                R.dimen.section_horizontal_padding);
         OptionSelectorController<ColorOption> adaptiveController = new OptionSelectorController<>(
-                container, subOptions, /* useGrid= */ true, CENTER, padding);
+                container, subOptions, /* useGrid= */ true, CENTER);
         adaptiveController.initOptions(mColorManager);
         setUpColorOptionsController(adaptiveController);
     }
@@ -474,16 +468,6 @@
                 mContainer = itemView.findViewById(R.id.color_page_container);
                 // Correct scrolling goes under collapsing toolbar while scrolling oclor options.
                 mContainer.getChildAt(0).setNestedScrollingEnabled(false);
-                /**
-                 * Sets page transformer with margin to separate color pages and
-                 * sets color pages' padding to not scroll to window boundary if multi-pane case
-                 */
-                if (mIsMultiPane) {
-                    final int padding = itemView.getContext().getResources().getDimensionPixelSize(
-                            R.dimen.section_horizontal_padding);
-                    mContainer.setPageTransformer(new MarginPageTransformer(padding * 2));
-                    mContainer.setPadding(0, /* top= */ 0, 0, /* bottom= */ 0);
-                }
                 mPageIndicator = itemView.findViewById(R.id.color_page_indicator);
                 if (ColorProvider.themeStyleEnabled) {
                     mPageIndicator.setVisibility(VISIBLE);
@@ -541,15 +525,13 @@
             ColorOptionViewHolder(View itemView) {
                 super(itemView);
                 mContainer = itemView.findViewById(R.id.color_option_container);
-                // Sets layout with margins for non multi-pane case to separate color options.
-                if (!mIsMultiPane) {
-                    final FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams(
-                            mContainer.getLayoutParams());
-                    final int margin = itemView.getContext().getResources().getDimensionPixelSize(
-                            R.dimen.section_horizontal_padding);
-                    layoutParams.setMargins(margin, /* top= */ 0, margin, /* bottom= */ 0);
-                    mContainer.setLayoutParams(layoutParams);
-                }
+                // Sets layout with margins to separate color options.
+                final FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams(
+                        mContainer.getLayoutParams());
+                final int margin = itemView.getContext().getResources().getDimensionPixelSize(
+                        R.dimen.section_horizontal_padding);
+                layoutParams.setMargins(margin, /* top= */ 0, margin, /* bottom= */ 0);
+                mContainer.setLayoutParams(layoutParams);
             }
         }
     }
diff --git a/src/com/android/customization/picker/clock/ui/fragment/ClockSettingsFragment.kt b/src/com/android/customization/picker/clock/ui/fragment/ClockSettingsFragment.kt
index ef1a5ef..c5cde53 100644
--- a/src/com/android/customization/picker/clock/ui/fragment/ClockSettingsFragment.kt
+++ b/src/com/android/customization/picker/clock/ui/fragment/ClockSettingsFragment.kt
@@ -108,7 +108,7 @@
                         },
                     ),
                 lifecycleOwner = this,
-                offsetToStart = displayUtils.isOnWallpaperDisplay(activity),
+                offsetToStart = displayUtils.isSingleDisplayOrUnfoldedHorizontalHinge(activity),
             )
             .show()
 
diff --git a/src/com/android/customization/picker/color/ui/fragment/ColorPickerFragment.kt b/src/com/android/customization/picker/color/ui/fragment/ColorPickerFragment.kt
index ef68a4e..c6b2023 100644
--- a/src/com/android/customization/picker/color/ui/fragment/ColorPickerFragment.kt
+++ b/src/com/android/customization/picker/color/ui/fragment/ColorPickerFragment.kt
@@ -105,7 +105,8 @@
                     },
                 ),
             lifecycleOwner = this,
-            offsetToStart = displayUtils.isOnWallpaperDisplay(requireActivity()),
+            offsetToStart =
+                displayUtils.isSingleDisplayOrUnfoldedHorizontalHinge(requireActivity()),
         )
         ScreenPreviewBinder.bind(
             activity = requireActivity(),
@@ -136,7 +137,8 @@
                     },
                 ),
             lifecycleOwner = this,
-            offsetToStart = displayUtils.isOnWallpaperDisplay(requireActivity()),
+            offsetToStart =
+                displayUtils.isSingleDisplayOrUnfoldedHorizontalHinge(requireActivity()),
         )
         val darkModeToggleContainerView: FrameLayout =
             view.requireViewById(R.id.dark_mode_toggle_container)
diff --git a/src/com/android/customization/picker/grid/GridFragment.java b/src/com/android/customization/picker/grid/GridFragment.java
index 00ae21b..b5ed7ee 100644
--- a/src/com/android/customization/picker/grid/GridFragment.java
+++ b/src/com/android/customization/picker/grid/GridFragment.java
@@ -218,7 +218,7 @@
                 mLoading.hide();
                 mOptionsController = new OptionSelectorController<>(
                         mOptionsContainer, options, /* useGrid= */ false,
-                        CheckmarkStyle.CENTER_CHANGE_COLOR_WHEN_NOT_SELECTED, 0);
+                        CheckmarkStyle.CENTER_CHANGE_COLOR_WHEN_NOT_SELECTED);
                 mOptionsController.initOptions(mGridManager);
                 GridOption previouslySelectedOption = findEquivalent(options,
                         mGridOptionViewModel.getSelectedOption());
diff --git a/src/com/android/customization/picker/quickaffordance/ui/fragment/KeyguardQuickAffordancePickerFragment.kt b/src/com/android/customization/picker/quickaffordance/ui/fragment/KeyguardQuickAffordancePickerFragment.kt
index f956598..d5f0d33 100644
--- a/src/com/android/customization/picker/quickaffordance/ui/fragment/KeyguardQuickAffordancePickerFragment.kt
+++ b/src/com/android/customization/picker/quickaffordance/ui/fragment/KeyguardQuickAffordancePickerFragment.kt
@@ -68,7 +68,9 @@
             viewModel = viewModel,
             lifecycleOwner = this,
             offsetToStart =
-                injector.getDisplayUtils(requireActivity()).isOnWallpaperDisplay(requireActivity())
+                requireActivity().let {
+                    injector.getDisplayUtils(it).isSingleDisplayOrUnfoldedHorizontalHinge(it)
+                }
         )
         KeyguardQuickAffordancePickerBinder.bind(
             view = view,
diff --git a/src/com/android/customization/picker/theme/CustomThemeComponentFragment.java b/src/com/android/customization/picker/theme/CustomThemeComponentFragment.java
index 83d5e69..a1e9967 100644
--- a/src/com/android/customization/picker/theme/CustomThemeComponentFragment.java
+++ b/src/com/android/customization/picker/theme/CustomThemeComponentFragment.java
@@ -95,7 +95,7 @@
     private void setUpOptions() {
         mProvider.fetch(options -> {
             mOptionsController = new OptionSelectorController(
-                    mOptionsContainer, options, mUseGridLayout, CheckmarkStyle.NONE, 0);
+                    mOptionsContainer, options, mUseGridLayout, CheckmarkStyle.NONE);
 
             mOptionsController.addListener(selected -> {
                 mSelectedOption = (ThemeComponentOption) selected;
diff --git a/src/com/android/customization/picker/theme/ThemeFragment.java b/src/com/android/customization/picker/theme/ThemeFragment.java
index 493213d..3a9a56f 100644
--- a/src/com/android/customization/picker/theme/ThemeFragment.java
+++ b/src/com/android/customization/picker/theme/ThemeFragment.java
@@ -258,7 +258,7 @@
         mThemeManager.fetchOptions(new OptionsFetchedListener<ThemeBundle>() {
             @Override
             public void onOptionsLoaded(List<ThemeBundle> options) {
-                mOptionsController = new OptionSelectorController<>(mOptionsContainer, options, 0);
+                mOptionsController = new OptionSelectorController<>(mOptionsContainer, options);
                 mOptionsController.initOptions(mThemeManager);
 
                 // Find out the selected theme option.
diff --git a/src/com/android/customization/widget/OptionSelectorController.java b/src/com/android/customization/widget/OptionSelectorController.java
index 6ca13be..8c7af00 100644
--- a/src/com/android/customization/widget/OptionSelectorController.java
+++ b/src/com/android/customization/widget/OptionSelectorController.java
@@ -85,19 +85,18 @@
     private final boolean mUseGrid;
     @CheckmarkStyle
     private final int mCheckmarkStyle;
-    private final int mContainerInset;
 
     private final Set<OptionSelectedListener> mListeners = new HashSet<>();
     private RecyclerView.Adapter<TileViewHolder> mAdapter;
     private T mSelectedOption;
     private T mAppliedOption;
 
-    public OptionSelectorController(RecyclerView container, List<T> options, int containerInset) {
-        this(container, options, true, CheckmarkStyle.CORNER, containerInset);
+    public OptionSelectorController(RecyclerView container, List<T> options) {
+        this(container, options, true, CheckmarkStyle.CORNER);
     }
 
     public OptionSelectorController(RecyclerView container, List<T> options,
-            boolean useGrid, @CheckmarkStyle int checkmarkStyle, int containerInset) {
+            boolean useGrid, @CheckmarkStyle int checkmarkStyle) {
         mContainer = container;
         mOptions = options;
         mUseGrid = useGrid;
@@ -106,7 +105,6 @@
         mContainer.getResources().getValue(R.dimen.linear_layout_horizontal_display_options_max,
                 typedValue, true);
         mLinearLayoutHorizontalDisplayOptionsMax = typedValue.getFloat();
-        mContainerInset = containerInset;
     }
 
     public void addListener(OptionSelectedListener listener) {
@@ -304,9 +302,6 @@
             int numColumns = res.getInteger(R.integer.options_grid_num_columns);
             GridLayoutManager gridLayoutManager = new GridLayoutManager(mContainer.getContext(),
                     numColumns);
-            if (mContainerInset != 0) {
-                mContainer.setPadding(mContainerInset, 0, mContainerInset, 0);
-            }
             mContainer.setLayoutManager(gridLayoutManager);
         } else {
             final int padding = res.getDimensionPixelSize(
