From e14b877832637d904ca2b4e16cc0d84a8bba30aa Mon Sep 17 00:00:00 2001 From: Roman Birg Date: Tue, 3 Mar 2015 15:21:54 -0800 Subject: Settings: always allow profile app groups to be linked/unlinked Change-Id: I271d409f925805d26c918d156e8ae41253cc08b1 Signed-off-by: Roman Birg --- src/com/android/settings/profiles/SetupActionsFragment.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/com/android/settings/profiles') diff --git a/src/com/android/settings/profiles/SetupActionsFragment.java b/src/com/android/settings/profiles/SetupActionsFragment.java index 0402a7d..599180c 100644 --- a/src/com/android/settings/profiles/SetupActionsFragment.java +++ b/src/com/android/settings/profiles/SetupActionsFragment.java @@ -281,11 +281,11 @@ public class SetupActionsFragment extends SettingsPreferenceFragment mProfile.getDefaultGroup().getUuid()))); } } - if (groupsAdded > 0) { - // add dummy "add/remove app groups" entry + if (mProfileManager.getNotificationGroups().length > 0) { + // if there are notification groups available, allow them to be configured mItems.add(new AppGroupItem()); - } else { - // remove the header since there are no options + } else if (groupsAdded == 0) { + // no notification groups available at all, nothing to add/remove mItems.remove(mItems.get(mItems.size() - 1)); } -- cgit v1.1