summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/profiles/actions/item/AppGroupItem.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/settings/profiles/actions/item/AppGroupItem.java')
-rw-r--r--src/com/android/settings/profiles/actions/item/AppGroupItem.java21
1 files changed, 10 insertions, 11 deletions
diff --git a/src/com/android/settings/profiles/actions/item/AppGroupItem.java b/src/com/android/settings/profiles/actions/item/AppGroupItem.java
index 8befd38..5558900 100644
--- a/src/com/android/settings/profiles/actions/item/AppGroupItem.java
+++ b/src/com/android/settings/profiles/actions/item/AppGroupItem.java
@@ -16,14 +16,16 @@
package com.android.settings.profiles.actions.item;
import android.app.NotificationGroup;
-import android.app.Profile;
-import android.app.ProfileGroup;
-import android.app.ProfileManager;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
+
+import cyanogenmod.app.Profile;
+import cyanogenmod.app.ProfileGroup;
+import cyanogenmod.app.ProfileManager;
+
import com.android.settings.R;
import com.android.settings.profiles.actions.ItemListAdapter;
@@ -32,17 +34,19 @@ import java.util.UUID;
public class AppGroupItem implements Item {
Profile mProfile;
ProfileGroup mGroup;
+ NotificationGroup mNotifGroup;
public AppGroupItem() {
// empty app group will act as a "Add/remove app groups" item
}
- public AppGroupItem(Profile profile, ProfileGroup group) {
+ public AppGroupItem(Profile profile, ProfileGroup group, NotificationGroup nGroup) {
mProfile = profile;
if (group == null) {
throw new UnsupportedOperationException("profile group can't be null");
}
mGroup = group;
+ mNotifGroup = nGroup;
}
@Override
@@ -70,17 +74,12 @@ public class AppGroupItem implements Item {
} else {
view = convertView;
}
-
- ProfileManager profileManager = (ProfileManager) parent.getContext()
- .getSystemService(Context.PROFILE_SERVICE);
-
TextView text = (TextView) view.findViewById(R.id.title);
TextView desc = (TextView) view.findViewById(R.id.summary);
if (mGroup != null) {
- NotificationGroup notifGroup = profileManager.getNotificationGroup(mGroup.getUuid());
- if (notifGroup != null) {
- text.setText(notifGroup.getName());
+ if (mNotifGroup != null) {
+ text.setText(mNotifGroup.getName());
} else {
text.setText("<unknown>");
}