Add flag to AccountType for ability to edit group membership

- Needed for the group editor feature (upcoming CL)
- Only Google and Exchange group membership lists can be edited,
all other groups from other sources are not editable (for ICS at
least)

Change-Id: I8f2ab08a6ff0cebcce0b182e4793dfbc645a5412
diff --git a/src/com/android/contacts/model/AccountType.java b/src/com/android/contacts/model/AccountType.java
index 462f7ad..563658a 100644
--- a/src/com/android/contacts/model/AccountType.java
+++ b/src/com/android/contacts/model/AccountType.java
@@ -114,6 +114,11 @@
         }
     }
 
+    /**
+     * Whether or not groups created under this account type have editable membership lists.
+     */
+    abstract public boolean isGroupMembershipEditable();
+
     abstract public int getHeaderColor(Context context);
 
     abstract public int getSideBarColor(Context context);
diff --git a/src/com/android/contacts/model/BaseAccountType.java b/src/com/android/contacts/model/BaseAccountType.java
index fd8f914..5c3e245 100644
--- a/src/com/android/contacts/model/BaseAccountType.java
+++ b/src/com/android/contacts/model/BaseAccountType.java
@@ -663,4 +663,9 @@
     public int getSideBarColor(Context context) {
         return 0xffbdc7b8;
     }
+
+    @Override
+    public boolean isGroupMembershipEditable() {
+        return false;
+    }
 }
diff --git a/src/com/android/contacts/model/ExchangeAccountType.java b/src/com/android/contacts/model/ExchangeAccountType.java
index 22a2ba2..8db4a7b 100644
--- a/src/com/android/contacts/model/ExchangeAccountType.java
+++ b/src/com/android/contacts/model/ExchangeAccountType.java
@@ -335,4 +335,9 @@
     public int getSideBarColor(Context context) {
         return 0xffb58e59;
     }
+
+    @Override
+    public boolean isGroupMembershipEditable() {
+        return true;
+    }
 }
diff --git a/src/com/android/contacts/model/GoogleAccountType.java b/src/com/android/contacts/model/GoogleAccountType.java
index bd445b1..982cf79 100644
--- a/src/com/android/contacts/model/GoogleAccountType.java
+++ b/src/com/android/contacts/model/GoogleAccountType.java
@@ -170,4 +170,9 @@
     public int getSideBarColor(Context context) {
         return 0xff5bb4b4;
     }
+
+    @Override
+    public boolean isGroupMembershipEditable() {
+        return true;
+    }
 }
diff --git a/tests/src/com/android/contacts/EntityModifierTests.java b/tests/src/com/android/contacts/EntityModifierTests.java
index 63dd84d..b36465b 100644
--- a/tests/src/com/android/contacts/EntityModifierTests.java
+++ b/tests/src/com/android/contacts/EntityModifierTests.java
@@ -148,6 +148,11 @@
         public int getSideBarColor(Context context) {
             return 0xffffff;
         }
+
+        @Override
+        public boolean isGroupMembershipEditable() {
+            return false;
+        }
     }
 
     /**