Make labels view have grey app bar (1/2)

- Set toolbar and status color programmatically
- Create GroupActivityTheme and override colorPrimaryDark
  so that status bar color doesn't turn blue on drawer opened.

Bug: 30416708

Test: manual - open a label

Change-Id: Ic3cb97fa5f64748b99b334875226afddfd4aa7b5
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 7d7579d..0782890 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -268,7 +268,7 @@
 
         <!-- Displays the members of a group in a list -->
         <activity android:name=".activities.GroupMembersActivity"
-            android:theme="@style/PeopleActivityTheme">
+            android:theme="@style/GroupActivityTheme">
 
             <intent-filter>
                 <action android:name="android.intent.action.VIEW" />
diff --git a/res/values/colors.xml b/res/values/colors.xml
index 355a4e8..e8d1f54 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -28,7 +28,6 @@
     <color name="action_bar_button_text_color">#FFFFFF</color>
 
     <color name="actionbar_background_color">@color/primary_color</color>
-    <color name="actionbar_background_color_dark">@color/primary_color_dark</color>
 
     <color name="contextual_selection_bar_color">#f6f6f6</color>
     <!-- Color of the status bar above the contextual selection bar. -->
@@ -37,6 +36,9 @@
     <color name="primary_color_dark">#0277bd</color>
     <color name="primary_color">#0288d1</color>
 
+    <color name="group_primary_color_dark">#546E7A</color>
+    <color name="group_primary_color">#607D8B</color>
+
     <!-- Color of the selected tab underline -->
     <color name="contacts_accent_color">#FFFFFF</color>
 
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 8ebe761..432f0a8 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -103,6 +103,11 @@
         <item name="android:listSelector">?android:attr/listChoiceBackgroundIndicator</item>
     </style>
 
+    <style name="GroupActivityTheme" parent="@style/PeopleActivityTheme">
+        <item name="android:colorPrimaryDark">@color/group_primary_color_dark</item>
+        <item name="colorPrimaryDark">@color/group_primary_color_dark</item>
+    </style>
+
     <style name="PeopleThemeAppCompat" parent="Theme.AppCompat.Light">
         <!-- Styles that require AppCompat compatibility, remember to update both sets -->
         <item name="android:actionBarStyle">@style/ContactsActionBarStyleAppCompat</item>
diff --git a/src/com/android/contacts/activities/ActionBarAdapter.java b/src/com/android/contacts/activities/ActionBarAdapter.java
index 9d7907d..e046e71 100644
--- a/src/com/android/contacts/activities/ActionBarAdapter.java
+++ b/src/com/android/contacts/activities/ActionBarAdapter.java
@@ -584,8 +584,9 @@
                     mActivity, R.color.contextual_selection_bar_status_bar_color);
             runStatusBarAnimation(/* colorTo */ cabStatusBarColor);
         } else {
-            final int normalStatusBarColor = ContextCompat.getColor(
-                    mActivity, R.color.primary_color_dark);
+            final int normalStatusBarColor = mActivity instanceof GroupMembersActivity
+                    ? ContextCompat.getColor(mActivity, R.color.group_primary_color_dark)
+                    : ContextCompat.getColor(mActivity, R.color.primary_color_dark);
             if (shouldAnimate) {
                 runStatusBarAnimation(/* colorTo */ normalStatusBarColor);
             } else {
diff --git a/src/com/android/contacts/activities/GroupMembersActivity.java b/src/com/android/contacts/activities/GroupMembersActivity.java
index 000cae4..758481e 100644
--- a/src/com/android/contacts/activities/GroupMembersActivity.java
+++ b/src/com/android/contacts/activities/GroupMembersActivity.java
@@ -20,20 +20,22 @@
 import android.content.Context;
 import android.content.Intent;
 import android.database.Cursor;
+import android.graphics.drawable.ColorDrawable;
 import android.net.Uri;
 import android.os.AsyncTask;
 import android.os.Bundle;
 import android.provider.ContactsContract.RawContacts;
+import android.support.v4.content.ContextCompat;
 import android.support.v4.view.GravityCompat;
 import android.util.Log;
 import android.view.Menu;
 import android.view.MenuItem;
+import android.widget.FrameLayout;
 import android.widget.Toast;
 
 import com.android.contacts.ContactSaveService;
 import com.android.contacts.ContactsDrawerActivity;
 import com.android.contacts.R;
-import com.android.contacts.common.GroupMetaData;
 import com.android.contacts.common.logging.ListEvent;
 import com.android.contacts.common.logging.Logger;
 import com.android.contacts.common.logging.ScreenEvent.ScreenType;
@@ -196,6 +198,9 @@
         // Set up the view
         setContentView(R.layout.group_members_activity);
 
+        findViewById(R.id.toolbar_frame).setBackgroundColor(
+                ContextCompat.getColor(this, R.color.group_primary_color));
+
         // Set up the action bar
         mActionBarAdapter = new ActionBarAdapter(this, this, getSupportActionBar(),
                 /* portraitTabs */ null, /* landscapeTabs */ null, mToolbar,