Merge "Don't show "more networks" for me profile"
diff --git a/res/drawable-hdpi/btn_star_off_normal_holo_dark.png b/res/drawable-hdpi/btn_star_off_normal_holo_dark.png
new file mode 100644
index 0000000..1ab75f9
--- /dev/null
+++ b/res/drawable-hdpi/btn_star_off_normal_holo_dark.png
Binary files differ
diff --git a/res/drawable-hdpi/btn_star_on_normal_holo_dark.png b/res/drawable-hdpi/btn_star_on_normal_holo_dark.png
new file mode 100644
index 0000000..8cd764a
--- /dev/null
+++ b/res/drawable-hdpi/btn_star_on_normal_holo_dark.png
Binary files differ
diff --git a/res/drawable-mdpi/btn_star_off_normal_holo_dark.png b/res/drawable-mdpi/btn_star_off_normal_holo_dark.png
new file mode 100644
index 0000000..069e1ca
--- /dev/null
+++ b/res/drawable-mdpi/btn_star_off_normal_holo_dark.png
Binary files differ
diff --git a/res/drawable-mdpi/btn_star_on_normal_holo_dark.png b/res/drawable-mdpi/btn_star_on_normal_holo_dark.png
new file mode 100644
index 0000000..d98dc94
--- /dev/null
+++ b/res/drawable-mdpi/btn_star_on_normal_holo_dark.png
Binary files differ
diff --git a/res/drawable-xhdpi/btn_star_off_normal_holo_dark.png b/res/drawable-xhdpi/btn_star_off_normal_holo_dark.png
new file mode 100644
index 0000000..3774545
--- /dev/null
+++ b/res/drawable-xhdpi/btn_star_off_normal_holo_dark.png
Binary files differ
diff --git a/res/drawable-xhdpi/btn_star_on_normal_holo_dark.png b/res/drawable-xhdpi/btn_star_on_normal_holo_dark.png
new file mode 100644
index 0000000..11c557c
--- /dev/null
+++ b/res/drawable-xhdpi/btn_star_on_normal_holo_dark.png
Binary files differ
diff --git a/res/drawable/btn_star_holo_dark.xml b/res/drawable/btn_star_holo_dark.xml
new file mode 100644
index 0000000..2949de9
--- /dev/null
+++ b/res/drawable/btn_star_holo_dark.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2011 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:state_checked="true" android:drawable="@drawable/btn_star_on_normal_holo_dark"/>
+    <item android:drawable="@drawable/btn_star_off_normal_holo_dark"/>
+</selector>
\ No newline at end of file
diff --git a/res/layout/favorites_star.xml b/res/layout/favorites_star.xml
index 4b859b4..5bdc091 100644
--- a/res/layout/favorites_star.xml
+++ b/res/layout/favorites_star.xml
@@ -29,6 +29,5 @@
         android:layout_gravity="center_vertical"
         android:contentDescription="@string/description_star"
         android:visibility="invisible"
-        style="?android:attr/starStyle"/>
-
+        android:button="@drawable/btn_star_holo_dark"/>
 </FrameLayout>
\ No newline at end of file
diff --git a/src/com/android/contacts/editor/ContactEditorFragment.java b/src/com/android/contacts/editor/ContactEditorFragment.java
index 3869c54..2725d1f 100644
--- a/src/com/android/contacts/editor/ContactEditorFragment.java
+++ b/src/com/android/contacts/editor/ContactEditorFragment.java
@@ -1340,6 +1340,9 @@
 
         final RawContactEditorView rawContactView =
                 (RawContactEditorView)getRawContactEditorView(mAggregationSuggestionsRawContactId);
+        if (rawContactView == null) {
+            return; // Raw contact deleted?
+        }
         final View anchorView = rawContactView.findViewById(R.id.anchor_view);
         mAggregationSuggestionPopup = new ListPopupWindow(mContext, null);
         mAggregationSuggestionPopup.setAnchorView(anchorView);
diff --git a/src/com/android/contacts/group/GroupEditorFragment.java b/src/com/android/contacts/group/GroupEditorFragment.java
index 734dbae..4712871 100644
--- a/src/com/android/contacts/group/GroupEditorFragment.java
+++ b/src/com/android/contacts/group/GroupEditorFragment.java
@@ -191,9 +191,9 @@
     private ContentResolver mContentResolver;
     private SuggestedMemberListAdapter mAutoCompleteAdapter;
 
-    private final List<Member> mListMembersToAdd = new ArrayList<Member>();
-    private final List<Member> mListMembersToRemove = new ArrayList<Member>();
-    private final List<Member> mListToDisplay = new ArrayList<Member>();
+    private ArrayList<Member> mListMembersToAdd = new ArrayList<Member>();
+    private ArrayList<Member> mListMembersToRemove = new ArrayList<Member>();
+    private ArrayList<Member> mListToDisplay = new ArrayList<Member>();
 
     public GroupEditorFragment() {
     }
@@ -273,9 +273,9 @@
         outState.putBoolean(KEY_GROUP_NAME_IS_READ_ONLY, mGroupNameIsReadOnly);
         outState.putString(KEY_ORIGINAL_GROUP_NAME, mOriginalGroupName);
 
-        outState.putParcelableArray(KEY_MEMBERS_TO_ADD, Member.toArray(mListMembersToAdd));
-        outState.putParcelableArray(KEY_MEMBERS_TO_REMOVE, Member.toArray(mListMembersToRemove));
-        outState.putParcelableArray(KEY_MEMBERS_TO_DISPLAY, Member.toArray(mListToDisplay));
+        outState.putParcelableArrayList(KEY_MEMBERS_TO_ADD, mListMembersToAdd);
+        outState.putParcelableArrayList(KEY_MEMBERS_TO_REMOVE, mListMembersToRemove);
+        outState.putParcelableArrayList(KEY_MEMBERS_TO_DISPLAY, mListToDisplay);
     }
 
     private void onRestoreInstanceState(Bundle state) {
@@ -291,10 +291,9 @@
         mGroupNameIsReadOnly = state.getBoolean(KEY_GROUP_NAME_IS_READ_ONLY);
         mOriginalGroupName = state.getString(KEY_ORIGINAL_GROUP_NAME);
 
-        Member.toList((Member[]) state.getParcelableArray(KEY_MEMBERS_TO_ADD), mListMembersToAdd);
-        Member.toList((Member[]) state.getParcelableArray(KEY_MEMBERS_TO_REMOVE),
-                mListMembersToRemove);
-        Member.toList((Member[]) state.getParcelableArray(KEY_MEMBERS_TO_DISPLAY), mListToDisplay);
+        mListMembersToAdd = state.getParcelableArrayList(KEY_MEMBERS_TO_ADD);
+        mListMembersToRemove = state.getParcelableArrayList(KEY_MEMBERS_TO_REMOVE);
+        mListToDisplay = state.getParcelableArrayList(KEY_MEMBERS_TO_DISPLAY);
     }
 
     public void setContentResolver(ContentResolver resolver) {
@@ -895,22 +894,6 @@
                 return new Member[size];
             }
         };
-
-        /** Convert to an array */
-        public static Member[] toArray(List<Member> list) {
-            return list.toArray(EMPTY_ARRAY);
-        }
-
-        /**
-         * Convert to a list.  Instead of creating a new one, this method clears the passed list
-         * and adds elements to it.
-         */
-        public static void toList(Member[] array, List<Member> list) {
-            list.clear();
-            for (Member member : array) {
-                list.add(member);
-            }
-        }
     }
 
     /**