Layout improvements for notification pages

Changes for upcoming theming changes in Settings:
- replacing some margins with padding
- merging some (switch pref + info pref) combos into a single preference.
I flagged the one that was already launched, but changed the other directly
- added some section headers (unflagged)
- moved all app wide notification settings to a single section (unflagged)
- changed two plain text prefs into TopIntroPreference, the dedicated pref
type for that sort of UI
- fixed some UI issues with 'Show more categories' appearing too often
- removed a duplicate notifcation channel label (unflagged)
- replaced a button layout preference with ButtonPreference (unflagged)

Test: manual review with is_expressive_design_enabled on and off
Test: atest com.android.settings.notification.app
Flag: EXEMPT this feature is not using aconfig for flagging
Bug: 349652992
Change-Id: I2acd7b2eb9dbcf6929143bfde99cd67163f1f95d
This commit is contained in:
Julia Reynolds
2024-11-20 10:32:59 -05:00
parent b7e1cc472e
commit 41896428ea
30 changed files with 261 additions and 215 deletions

View File

@@ -91,6 +91,14 @@ public class ChannelListPreferenceControllerTest {
assertEquals("zeroCategories", mGroupList.getPreference(0).getKey());
}
// Test the case with no groups but hidden channels
inGroups = new ArrayList<>();
mController.mChannelCount = 1;
mController.updateFullList(mGroupList, inGroups);
{
assertEquals(0, mGroupList.getPreferenceCount());
}
// Test that adding a group clears the zero category and adds everything
NotificationChannelGroup inGroup1 = new NotificationChannelGroup("group1", "Group 1");
inGroup1.addChannel(new NotificationChannel("ch1a", "Channel 1A", IMPORTANCE_DEFAULT));
@@ -250,6 +258,7 @@ public class ChannelListPreferenceControllerTest {
}
// Test that we go back to the empty state when clearing all groups and channels.
mController.mChannelCount = 0;
inGroups.clear();
mController.updateFullList(mGroupList, inGroups);
{