Remove odd spacing after the divider

Two strategies for this UI problem

- If "PreferenceCategory" is an anchor for loading dynamical preferences,
we keep this preference category and then assign a no spacing layout to
it.

- If the cases only want to have a divider, we remove this preference category.
And then use allowDividerBelow or allowDividerAbove attribute.

Test: visual
Fixes: 130246959

Change-Id: I227fef20f5255159e4ab9a5add43a04b94e9b19a
diff --git a/res/xml/app_and_notification.xml b/res/xml/app_and_notification.xml
index cdeb35e..5368f33 100644
--- a/res/xml/app_and_notification.xml
+++ b/res/xml/app_and_notification.xml
@@ -43,6 +43,7 @@
     <!-- Empty category to draw divider -->
     <PreferenceCategory
         android:key="recent_apps_divider"
+        android:layout="@layout/preference_category_no_label"
         android:order="-997"/>
 
     <!-- Notifications (appears before manage_perms), default apps (appears after) -->
diff --git a/res/xml/location_settings.xml b/res/xml/location_settings.xml
index 2f43ce8..9ab80a7 100644
--- a/res/xml/location_settings.xml
+++ b/res/xml/location_settings.xml
@@ -28,6 +28,7 @@
 
         <PreferenceCategory
             android:key="location_advanced_settings"
+            android:layout="@layout/preference_category_no_label"
             settings:initialExpandedChildrenCount="2">
 
             <!-- This preference category gets removed if new_recent_location_ui is disabled -->
@@ -54,7 +55,8 @@
                 android:selectable="true" />
 
             <PreferenceCategory
-                android:key="location_services" />
+                android:key="location_services"
+                android:layout="@layout/preference_category_no_label"/>
 
             <!-- This preference gets removed if there is no managed profile -->
             <PreferenceCategory
@@ -65,5 +67,6 @@
 
         <PreferenceCategory
             android:key="location_footer"
+            android:layout="@layout/preference_category_no_label"
             settings:allowDividerAbove="false"/>
 </PreferenceScreen>
diff --git a/res/xml/privacy_dashboard_settings.xml b/res/xml/privacy_dashboard_settings.xml
index 45b9d19..aa789b9 100644
--- a/res/xml/privacy_dashboard_settings.xml
+++ b/res/xml/privacy_dashboard_settings.xml
@@ -64,7 +64,8 @@
 
     <!-- Privacy Service -->
     <PreferenceCategory
-        android:key="privacy_services"/>
+        android:key="privacy_services"
+        android:layout="@layout/preference_category_no_label"/>
 
     <PreferenceCategory
         android:key="dashboard_tile_placeholder"/>
diff --git a/res/xml/security_dashboard_settings.xml b/res/xml/security_dashboard_settings.xml
index 9fe3d5b..6a896ce 100644
--- a/res/xml/security_dashboard_settings.xml
+++ b/res/xml/security_dashboard_settings.xml
@@ -96,7 +96,8 @@
 
     <PreferenceCategory
         android:order="40"
-        android:key="security_settings_device_admin_category">
+        android:key="security_settings_device_admin_category"
+        android:layout="@layout/preference_category_no_label">
 
         <Preference
             android:key="manage_device_admin"