Remove scalable layout

Test: Manually
Bug: 151287994
Change-Id: Ib8da70e9e96533f76e10dee4f719159eeb195198
diff --git a/res/layout/fragment_clock_scalable_picker.xml b/res/layout/fragment_clock_scalable_picker.xml
deleted file mode 100644
index db31dc5..0000000
--- a/res/layout/fragment_clock_scalable_picker.xml
+++ /dev/null
@@ -1,119 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-     Copyright (C) 2020 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-
-          http://www.apache.org/licenses/LICENSE-2.0
-
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-<androidx.coordinatorlayout.widget.CoordinatorLayout
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:app="http://schemas.android.com/apk/res-auto"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:background="?android:colorPrimary"
-    android:orientation="vertical">
-
-    <include layout="@layout/section_header" />
-
-    <FrameLayout
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        app:layout_behavior="@string/scalable_container_behavior">
-
-        <com.android.wallpaper.widget.PreviewPager
-            android:id="@+id/clock_preview_pager"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:background="@color/preview_pager_background" />
-    </FrameLayout>
-
-    <FrameLayout
-        android:id="@+id/scalable_content_container"
-        android:layout_width="wrap_content"
-        android:layout_height="@dimen/content_container_maximum_height"
-        app:behavior_peekHeight="@dimen/content_container_minimum_height"
-        app:layout_behavior="@string/bottom_sheet_behavior">
-
-        <androidx.constraintlayout.widget.ConstraintLayout
-            android:id="@+id/content_section"
-            android:layout_width="match_parent"
-            android:layout_height="match_parent">
-
-            <androidx.recyclerview.widget.RecyclerView
-                android:id="@+id/options_container"
-                android:layout_width="match_parent"
-                android:layout_height="@dimen/options_container_height"
-                android:layout_gravity="center_horizontal"
-                android:layout_marginTop="10dp"
-                app:layout_constraintBottom_toTopOf="@id/placeholder"
-                app:layout_constraintEnd_toEndOf="parent"
-                app:layout_constraintStart_toStartOf="parent"
-                app:layout_constraintTop_toTopOf="parent"
-                app:layout_constraintVertical_bias="1.0" />
-
-            <Space
-                android:id="@+id/placeholder"
-                android:layout_width="match_parent"
-                android:layout_height="@dimen/min_taptarget_height"
-                app:layout_constraintBottom_toTopOf="@id/apply_button"
-                app:layout_constraintEnd_toEndOf="parent"
-                app:layout_constraintHeight_min="@dimen/min_taptarget_height"
-                app:layout_constraintHorizontal_bias="0.0"
-                app:layout_constraintStart_toStartOf="parent"
-                app:layout_constraintTop_toBottomOf="@id/options_container"
-                app:layout_constraintVertical_bias="1.0" />
-
-            <Button
-                android:id="@+id/apply_button"
-                style="@style/ActionPrimaryButton"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_gravity="end"
-                android:layout_marginVertical="10dp"
-                android:layout_marginEnd="10dp"
-                android:layout_weight="1"
-                android:text="@string/apply_theme_btn"
-                app:layout_constraintBottom_toBottomOf="parent"
-                app:layout_constraintEnd_toEndOf="parent" />
-        </androidx.constraintlayout.widget.ConstraintLayout>
-    </FrameLayout>
-
-    <FrameLayout
-        android:layout_width="match_parent"
-        android:layout_height="match_parent">
-
-        <androidx.core.widget.ContentLoadingProgressBar
-            android:id="@+id/loading_indicator"
-            style="@android:style/Widget.DeviceDefault.ProgressBar"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_gravity="center_horizontal|top"
-            android:layout_marginTop="200dp"
-            android:indeterminate="true" />
-
-        <FrameLayout
-            android:id="@+id/error_section"
-            android:layout_width="match_parent"
-            android:layout_height="match_parent"
-            android:visibility="gone">
-
-            <TextView
-                android:id="@+id/error_message"
-                style="@style/TitleTextAppearance"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_gravity="center"
-                android:gravity="center"
-                android:text="@string/something_went_wrong" />
-        </FrameLayout>
-    </FrameLayout>
-</androidx.coordinatorlayout.widget.CoordinatorLayout>
diff --git a/res/layout/fragment_grid_scalable_picker.xml b/res/layout/fragment_grid_scalable_picker.xml
deleted file mode 100644
index 6a3a77a..0000000
--- a/res/layout/fragment_grid_scalable_picker.xml
+++ /dev/null
@@ -1,101 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-     Copyright (C) 2020 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-
-          http://www.apache.org/licenses/LICENSE-2.0
-
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-<androidx.coordinatorlayout.widget.CoordinatorLayout
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:app="http://schemas.android.com/apk/res-auto"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:background="?android:colorPrimary"
-    android:orientation="vertical">
-
-    <include layout="@layout/section_header" />
-
-    <FrameLayout
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        app:layout_behavior="@string/scalable_container_behavior">
-
-        <com.android.wallpaper.widget.PreviewPager
-            android:id="@+id/grid_preview_pager"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:background="@color/preview_pager_background"
-            app:card_style="screen_aspect_ratio" />
-    </FrameLayout>
-
-    <FrameLayout
-        android:id="@+id/scalable_content_container"
-        android:layout_width="wrap_content"
-        android:layout_height="@dimen/content_container_maximum_height"
-        app:behavior_peekHeight="@dimen/content_container_minimum_height"
-        app:layout_behavior="@string/bottom_sheet_behavior">
-
-        <LinearLayout
-            android:id="@+id/content_section"
-            android:layout_width="match_parent"
-            android:layout_height="match_parent"
-            android:orientation="vertical">
-
-            <TextView
-                android:id="@+id/options_title"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:gravity="center"
-                android:paddingVertical="18dp"
-                android:lineHeight="24dp"
-                android:singleLine="true"
-                android:text="@string/grid_options_title"
-                android:textAppearance="@style/TitleTextAppearance"/>
-
-            <androidx.recyclerview.widget.RecyclerView
-                android:id="@+id/options_container"
-                android:layout_width="match_parent"
-                android:layout_height="@dimen/options_container_height"
-                android:layout_gravity="center_horizontal"/>
-        </LinearLayout>
-    </FrameLayout>
-
-    <FrameLayout
-        android:layout_width="match_parent"
-        android:layout_height="match_parent">
-
-        <androidx.core.widget.ContentLoadingProgressBar
-            android:id="@+id/loading_indicator"
-            style="@android:style/Widget.DeviceDefault.ProgressBar"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_gravity="center_horizontal|top"
-            android:layout_marginTop="200dp"
-            android:indeterminate="true" />
-
-        <FrameLayout
-            android:id="@+id/error_section"
-            android:layout_width="match_parent"
-            android:layout_height="match_parent"
-            android:visibility="gone">
-
-            <TextView
-                android:id="@+id/error_message"
-                style="@style/TitleTextAppearance"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_gravity="center"
-                android:gravity="center"
-                android:text="@string/something_went_wrong" />
-        </FrameLayout>
-    </FrameLayout>
-</androidx.coordinatorlayout.widget.CoordinatorLayout>
diff --git a/res/layout/fragment_theme_scalable_picker.xml b/res/layout/fragment_theme_scalable_picker.xml
deleted file mode 100644
index ae147c2..0000000
--- a/res/layout/fragment_theme_scalable_picker.xml
+++ /dev/null
@@ -1,106 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-     Copyright (C) 2020 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-
-          http://www.apache.org/licenses/LICENSE-2.0
-
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-<androidx.coordinatorlayout.widget.CoordinatorLayout
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:app="http://schemas.android.com/apk/res-auto"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:background="?android:colorPrimary"
-    android:orientation="vertical">
-
-    <include layout="@layout/section_header" />
-
-    <FrameLayout
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        app:layout_behavior="@string/scalable_container_behavior">
-
-        <com.android.wallpaper.widget.PreviewPager
-            android:id="@+id/theme_preview_pager"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:background="@color/preview_pager_background" />
-    </FrameLayout>
-
-    <FrameLayout
-        android:id="@+id/scalable_content_container"
-        android:layout_width="wrap_content"
-        android:layout_height="@dimen/content_container_maximum_height"
-        app:behavior_peekHeight="@dimen/content_container_minimum_height"
-        app:layout_behavior="@string/bottom_sheet_behavior">
-
-        <androidx.constraintlayout.widget.ConstraintLayout
-            android:id="@+id/content_section"
-            android:layout_width="match_parent"
-            android:layout_height="match_parent">
-
-            <androidx.recyclerview.widget.RecyclerView
-                android:id="@+id/options_container"
-                android:layout_width="match_parent"
-                android:layout_height="@dimen/options_container_height"
-                android:layout_gravity="bottom|center_horizontal"
-                android:layout_marginTop="10dp"
-                android:layout_weight="1"
-                app:layout_constraintEnd_toEndOf="parent"
-                app:layout_constraintStart_toStartOf="parent"
-                app:layout_constraintTop_toTopOf="parent"
-                app:layout_constraintVertical_bias="1.0" />
-
-            <Button
-                android:id="@+id/apply_button"
-                style="@style/ActionPrimaryButton"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_gravity="end"
-                android:layout_marginEnd="10dp"
-                android:layout_marginBottom="10dp"
-                android:text="@string/apply_theme_btn"
-                app:layout_constraintBottom_toBottomOf="parent"
-                app:layout_constraintEnd_toEndOf="parent" />
-        </androidx.constraintlayout.widget.ConstraintLayout>
-    </FrameLayout>
-
-    <FrameLayout
-        android:layout_width="match_parent"
-        android:layout_height="match_parent">
-
-        <androidx.core.widget.ContentLoadingProgressBar
-            android:id="@+id/loading_indicator"
-            style="@android:style/Widget.DeviceDefault.ProgressBar"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_gravity="center_horizontal|top"
-            android:layout_marginTop="200dp"
-            android:indeterminate="true" />
-
-        <FrameLayout
-            android:id="@+id/error_section"
-            android:layout_width="match_parent"
-            android:layout_height="match_parent"
-            android:visibility="gone">
-
-            <TextView
-                android:id="@+id/error_message"
-                style="@style/TitleTextAppearance"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_gravity="center"
-                android:gravity="center"
-                android:text="@string/something_went_wrong" />
-        </FrameLayout>
-    </FrameLayout>
-</androidx.coordinatorlayout.widget.CoordinatorLayout>
diff --git a/src/com/android/customization/picker/clock/ClockFragment.java b/src/com/android/customization/picker/clock/ClockFragment.java
index 47fad5f..f7b9f70 100644
--- a/src/com/android/customization/picker/clock/ClockFragment.java
+++ b/src/com/android/customization/picker/clock/ClockFragment.java
@@ -15,8 +15,6 @@
  */
 package com.android.customization.picker.clock;
 
-import static android.content.res.Configuration.ORIENTATION_LANDSCAPE;
-
 import android.content.Context;
 import android.content.res.Resources;
 import android.os.Bundle;
@@ -90,20 +88,8 @@
     @Override
     public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,
             @Nullable Bundle savedInstanceState) {
-        View view;
-        if (ADD_SCALABLE_HEADER) {
-            // TODO(b/147780560): Once the temporary flag (ADD_SCALABLE_HEADER) is removed,
-            // we should have a layout with the same name for portrait and landscape.
-            int orientation = getResources().getConfiguration().orientation;
-            view = inflater.inflate(
-                    orientation == ORIENTATION_LANDSCAPE
-                            ? R.layout.fragment_clock_picker
-                            : R.layout.fragment_clock_scalable_picker,
-                    container, /* attachToRoot */ false);
-        } else {
-            view = inflater.inflate(
-                    R.layout.fragment_clock_picker, container, /* attachToRoot */ false);
-        }
+        View view = inflater.inflate(
+                R.layout.fragment_clock_picker, container, /* attachToRoot */ false);
         setUpToolbar(view);
         mContent = view.findViewById(R.id.content_section);
         mPreviewPager = view.findViewById(R.id.clock_preview_pager);
diff --git a/src/com/android/customization/picker/grid/GridFragment.java b/src/com/android/customization/picker/grid/GridFragment.java
index 43eb82f..85ef5c1 100644
--- a/src/com/android/customization/picker/grid/GridFragment.java
+++ b/src/com/android/customization/picker/grid/GridFragment.java
@@ -15,8 +15,6 @@
  */
 package com.android.customization.picker.grid;
 
-import static android.content.res.Configuration.ORIENTATION_LANDSCAPE;
-
 import static com.android.wallpaper.widget.BottomActionBar.BottomAction.APPLY;
 
 import android.app.Activity;
@@ -154,20 +152,8 @@
     @Override
     public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,
             @Nullable Bundle savedInstanceState) {
-        View view;
-        if (ADD_SCALABLE_HEADER) {
-            // TODO(b/147780560): Once the temporary flag (ADD_SCALABLE_HEADER) is removed,
-            // we should have a layout with the same name for portrait and landscape.
-            int orientation = getResources().getConfiguration().orientation;
-            view = inflater.inflate(
-                    orientation == ORIENTATION_LANDSCAPE
-                            ? R.layout.fragment_grid_picker
-                            : R.layout.fragment_grid_scalable_picker,
-                    container, /* attachToRoot */ false);
-        } else {
-            view = inflater.inflate(
-                    R.layout.fragment_grid_picker, container, /* attachToRoot */ false);
-        }
+        View view = inflater.inflate(
+                R.layout.fragment_grid_picker, container, /* attachToRoot */ false);
         setUpToolbar(view);
         mContent = view.findViewById(R.id.content_section);
         mPreviewPager = view.findViewById(R.id.grid_preview_pager);
diff --git a/src/com/android/customization/picker/theme/ThemeFragment.java b/src/com/android/customization/picker/theme/ThemeFragment.java
index b56c402..e04d8d2 100644
--- a/src/com/android/customization/picker/theme/ThemeFragment.java
+++ b/src/com/android/customization/picker/theme/ThemeFragment.java
@@ -15,8 +15,6 @@
  */
 package com.android.customization.picker.theme;
 
-import static android.content.res.Configuration.ORIENTATION_LANDSCAPE;
-
 import android.app.Activity;
 import android.app.WallpaperColors;
 import android.content.Context;
@@ -119,20 +117,8 @@
     @Override
     public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,
             @Nullable Bundle savedInstanceState) {
-        View view;
-        if (ADD_SCALABLE_HEADER) {
-            // TODO(b/147780560): Once the temporary flag (ADD_SCALABLE_HEADER) is removed,
-            // we should have a layout with the same name for portrait and landscape.
-            int orientation = getResources().getConfiguration().orientation;
-            view = inflater.inflate(
-                    orientation == ORIENTATION_LANDSCAPE
-                            ? R.layout.fragment_theme_picker
-                            : R.layout.fragment_theme_scalable_picker,
-                    container, /* attachToRoot */ false);
-        } else {
-            view = inflater.inflate(
-                    R.layout.fragment_theme_picker, container, /* attachToRoot */ false);
-        }
+        View view = inflater.inflate(
+                R.layout.fragment_theme_picker, container, /* attachToRoot */ false);
         setUpToolbar(view);
 
         mContent = view.findViewById(R.id.content_section);