Fix the bottom padding of the category and wallpaper pages are gone in SUW.

It's because we applied windowInsets to the category and wallpaper pages in SUW and it overrides their bottom padding.
We should apply windowInsets to their container instead.

Screenshots:
https://screenshot.googleplex.com/aNKmAZeorjY.png
https://screenshot.googleplex.com/0JTLAESLSDT.png

Bug: 159520768
Change-Id: I244a14b1884f189ceff4e29edf5179dc1d300e18
diff --git a/src/com/android/wallpaper/picker/CategoryFragment.java b/src/com/android/wallpaper/picker/CategoryFragment.java
index ce7845c..dabffdb 100755
--- a/src/com/android/wallpaper/picker/CategoryFragment.java
+++ b/src/com/android/wallpaper/picker/CategoryFragment.java
@@ -280,15 +280,10 @@
                                     getActivity(), mLockscreenPreview.getMeasuredWidth()));
                 }
             }});
-        fragmentContainer.setOnHierarchyChangeListener(new ViewGroup.OnHierarchyChangeListener() {
-            @Override
-            public void onChildViewAdded(View parent, View child) {
-                child.requestApplyInsets();
-            }
-
-            @Override
-            public void onChildViewRemoved(View parent, View child) {
-            }
+        fragmentContainer.setOnApplyWindowInsetsListener((v, windowInsets) -> {
+            v.setPadding(v.getPaddingLeft(), v.getPaddingTop(), v.getPaddingRight(),
+                    windowInsets.getSystemWindowInsetBottom());
+            return windowInsets;
         });
 
         setUpToolbar(view);
diff --git a/src/com/android/wallpaper/picker/CategorySelectorFragment.java b/src/com/android/wallpaper/picker/CategorySelectorFragment.java
index 0121c4f..8d8d82a 100644
--- a/src/com/android/wallpaper/picker/CategorySelectorFragment.java
+++ b/src/com/android/wallpaper/picker/CategorySelectorFragment.java
@@ -116,11 +116,6 @@
 
         GridLayoutManager gridLayoutManager = new GridLayoutManager(getActivity(), getNumColumns());
         mImageGrid.setLayoutManager(gridLayoutManager);
-        mImageGrid.setOnApplyWindowInsetsListener((v, windowInsets) -> {
-            v.setPadding(v.getPaddingLeft(), v.getPaddingTop(), v.getPaddingRight(),
-                    windowInsets.getSystemWindowInsetBottom());
-            return windowInsets;
-        });
         mImageGrid.setAccessibilityDelegateCompat(
                 new WallpaperPickerRecyclerViewAccessibilityDelegate(
                         mImageGrid, (BottomSheetHost) getParentFragment(), getNumColumns()));
diff --git a/src/com/android/wallpaper/picker/individual/IndividualPickerFragment.java b/src/com/android/wallpaper/picker/individual/IndividualPickerFragment.java
index 88c9966..80136a1 100755
--- a/src/com/android/wallpaper/picker/individual/IndividualPickerFragment.java
+++ b/src/com/android/wallpaper/picker/individual/IndividualPickerFragment.java
@@ -445,12 +445,6 @@
         }
         mImageGrid.addItemDecoration(new GridPaddingDecoration(
                 getResources().getDimensionPixelSize(R.dimen.grid_padding)));
-        mImageGrid.setOnApplyWindowInsetsListener((v, windowInsets) -> {
-            v.setPadding(v.getPaddingLeft(), v.getPaddingTop(), v.getPaddingRight(),
-                    windowInsets.getSystemWindowInsetBottom());
-            return windowInsets;
-        });
-
         mImageGrid.setAccessibilityDelegateCompat(
                 new WallpaperPickerRecyclerViewAccessibilityDelegate(
                         mImageGrid, (BottomSheetHost) getParentFragment(), getNumColumns()));