Add work profile footer in work tab

Screenshot(work mode is on): https://hsv.googleplex.com/6279751685636096
Screenshot (work mode is off): https://hsv.googleplex.com/6279751685636096

TODO:
It is just the UX bit, once the platform change is in, we should then
consume the new API to
1. Turn on / off work mode
2. Get the organization name and set the textview accordingly.

BUG=69905244

Change-Id: Id94ae57625d6b629dac89c1c28f8d65f395fff6c
diff --git a/res/drawable/ic_corp.xml b/res/drawable/ic_corp.xml
new file mode 100644
index 0000000..48f5007
--- /dev/null
+++ b/res/drawable/ic_corp.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2017 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.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:width="24dp"
+    android:height="24dp"
+    android:viewportWidth="24.0"
+    android:viewportHeight="24.0">
+    <path
+        android:pathData="M20,6h-4V4c0,-1.11 -0.89,-2 -2,-2h-4C8.89,2 8,2.89 8,4v2H4C2.89,6 2.01,6.89 2.01,8L2,19c0,1.11 0.89,2 2,2h16c1.11,0 2,-0.89 2,-2V8C22,6.89 21.11,6 20,6zM12,15c-1.1,0 -2,-0.9 -2,-2s0.9,-2 2,-2s2,0.9 2,2S13.1,15 12,15zM14,6h-4V4h4V6z"
+        android:fillColor="?android:attr/textColorHint"/>
+</vector>
\ No newline at end of file
diff --git a/res/layout/work_tab_footer.xml b/res/layout/work_tab_footer.xml
new file mode 100644
index 0000000..48578d7
--- /dev/null
+++ b/res/layout/work_tab_footer.xml
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2017 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.
+-->
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+      android:layout_width="match_parent"
+      android:layout_height="wrap_content"
+      android:orientation="vertical"
+      android:paddingBottom="@dimen/all_apps_work_profile_tab_footer_bottom_padding"
+      android:paddingLeft="@dimen/dynamic_grid_cell_padding_x"
+      android:paddingRight="@dimen/dynamic_grid_cell_padding_x"
+      android:paddingTop="@dimen/all_apps_work_profile_tab_footer_top_padding">
+
+    <RelativeLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content">
+
+        <Switch
+            android:id="@+id/work_mode_toggle"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_alignParentRight="true"
+            android:theme="@style/WorkModeSwitchTheme"/>
+
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_alignBaseline="@id/work_mode_toggle"
+            android:layout_alignParentLeft="true"
+            android:ellipsize="end"
+            android:fontFamily="roboto-regular"
+            android:lines="1"
+            android:text="@string/work_profile_toggle_label"
+            android:textColor="?android:attr/textColorTertiary"
+            android:textSize="16sp"/>
+
+    </RelativeLayout>
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="horizontal"
+        android:paddingTop="8dp">
+
+        <ImageView
+            android:layout_width="24dp"
+            android:layout_height="24dp"
+            android:src="@drawable/ic_corp"/>
+
+        <TextView
+            android:id="@+id/managed_by_label"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_gravity="center_vertical"
+            android:ellipsize="end"
+            android:lines="1"
+            android:paddingLeft="12dp"
+            android:textColor="?android:attr/textColorHint"
+            android:textSize="13sp"/>
+    </LinearLayout>
+</LinearLayout>
\ No newline at end of file
diff --git a/res/values/colors.xml b/res/values/colors.xml
index b44a31e..42fee80 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -40,4 +40,6 @@
 
     <color name="all_apps_bg_hand_fill">#E5E5E5</color>
     <color name="all_apps_bg_hand_fill_dark">#9AA0A6</color>
+
+    <color name="work_profile_color">#FF6D00</color>
 </resources>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 266e0b0..e7f45c2 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -94,6 +94,8 @@
     <dimen name="all_apps_tabs_indicator_height">2dp</dimen>
     <dimen name="all_apps_header_top_padding">36dp</dimen>
     <dimen name="all_apps_prediction_row_divider_height">17dp</dimen>
+    <dimen name="all_apps_work_profile_tab_footer_top_padding">16dp</dimen>
+    <dimen name="all_apps_work_profile_tab_footer_bottom_padding">20dp</dimen>
 
 <!-- Search bar in All Apps -->
     <dimen name="all_apps_header_max_elevation">3dp</dimen>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index fdd4d8d..cbba9a2 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -324,4 +324,7 @@
     <!-- Label of tab to indicate work apps -->
     <string name="all_apps_work_tab">Work</string>
 
+    <!-- Label of the work mode toggle -->
+    <string name="work_profile_toggle_label">Work profile</string>
+
 </resources>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 8cc4743..c714841 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -168,4 +168,8 @@
         <item name="android:colorControlHighlight">#DFE1E5</item>
         <item name="android:colorForeground">@color/all_apps_bg_hand_fill_dark</item>
     </style>
+
+    <style name="WorkModeSwitchTheme" parent="@style/LauncherTheme">
+        <item name="android:colorAccent">@color/work_profile_color</item>
+    </style>
 </resources>