Merge "Update the VHal emulator protobuf + misc nits"
diff --git a/car-lib/src/android/car/hardware/CarDiagnosticManager.java b/car-lib/src/android/car/hardware/CarDiagnosticManager.java
index 851dd87..0444c14 100644
--- a/car-lib/src/android/car/hardware/CarDiagnosticManager.java
+++ b/car-lib/src/android/car/hardware/CarDiagnosticManager.java
@@ -271,6 +271,72 @@
         return false;
     }
 
+    /**
+     * Returns true if this vehicle supports sending live frame information.
+     * @return
+     * @throws CarNotConnectedException
+     */
+    public boolean isLiveFrameSupported() throws CarNotConnectedException {
+        try {
+            return mService.isLiveFrameSupported();
+        } catch (IllegalStateException e) {
+            CarApiUtil.checkCarNotConnectedExceptionFromCarService(e);
+        } catch (RemoteException e) {
+            throw new CarNotConnectedException();
+        }
+        return false;
+    }
+
+    /**
+     * Returns true if this vehicle supports sending freeze frame information.
+     * @return
+     * @throws CarNotConnectedException
+     */
+    public boolean isFreezeFrameSupported() throws CarNotConnectedException {
+        try {
+            return mService.isFreezeFrameSupported();
+        } catch (IllegalStateException e) {
+            CarApiUtil.checkCarNotConnectedExceptionFromCarService(e);
+        } catch (RemoteException e) {
+            throw new CarNotConnectedException();
+        }
+        return false;
+    }
+
+    /**
+     * Returns true if this vehicle supports retrieving freeze frame timestamps.
+     * This is only meaningful if freeze frame data is also supported.
+     * @return
+     * @throws CarNotConnectedException
+     */
+    public boolean isFreezeFrameTimestampSupported() throws CarNotConnectedException {
+        try {
+            return mService.isFreezeFrameTimestampSupported();
+        } catch (IllegalStateException e) {
+            CarApiUtil.checkCarNotConnectedExceptionFromCarService(e);
+        } catch (RemoteException e) {
+            throw new CarNotConnectedException();
+        }
+        return false;
+    }
+
+    /**
+     * Returns true if this vehicle supports clearing freeze frame timestamps.
+     * This is only meaningful if freeze frame data is also supported.
+     * @return
+     * @throws CarNotConnectedException
+     */
+    public boolean isFreezeFrameClearSupported() throws CarNotConnectedException {
+        try {
+            return mService.isFreezeFrameClearSupported();
+        } catch (IllegalStateException e) {
+            CarApiUtil.checkCarNotConnectedExceptionFromCarService(e);
+        } catch (RemoteException e) {
+            throw new CarNotConnectedException();
+        }
+        return false;
+    }
+
     private static class CarDiagnosticEventListenerToService
             extends ICarDiagnosticEventListener.Stub {
         private final WeakReference<CarDiagnosticManager> mManager;
diff --git a/car-lib/src/android/car/hardware/ICarDiagnostic.aidl b/car-lib/src/android/car/hardware/ICarDiagnostic.aidl
index 098d2d4..3afffc5 100644
--- a/car-lib/src/android/car/hardware/ICarDiagnostic.aidl
+++ b/car-lib/src/android/car/hardware/ICarDiagnostic.aidl
@@ -52,4 +52,24 @@
      */
      void unregisterDiagnosticListener(int frameType,
          in ICarDiagnosticEventListener callback) = 6;
-}
\ No newline at end of file
+
+    /**
+     * Returns whether the underlying HAL supports live frames.
+     */
+     boolean isLiveFrameSupported() = 7;
+
+    /**
+     * Returns whether the underlying HAL supports freeze frames.
+     */
+     boolean isFreezeFrameSupported() = 8;
+
+    /**
+     * Returns whether the underlying HAL supports retrieving freeze frame timestamps.
+     */
+     boolean isFreezeFrameTimestampSupported() = 9;
+
+    /**
+     * Returns whether the underlying HAL supports clearing freeze frames.
+     */
+     boolean isFreezeFrameClearSupported() = 10;
+}
diff --git a/car_product/overlay/frameworks/base/core/res/res/drawable/ic_collapse_notification.xml b/car_product/overlay/frameworks/base/core/res/res/drawable/ic_collapse_notification.xml
new file mode 100644
index 0000000..0252706
--- /dev/null
+++ b/car_product/overlay/frameworks/base/core/res/res/drawable/ic_collapse_notification.xml
@@ -0,0 +1,26 @@
+<?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="56dp"
+        android:height="56dp"
+        android:viewportWidth="56.0"
+        android:viewportHeight="56.0">
+    <path
+        android:pathData="M28,56C12.54,56 0,43.46 0,28C0,12.54 12.54,0 28,0C43.46,0 56,12.54 56,28C56,43.46 43.46,56 28,56ZM35.64,33L38,30.71L28,21L18,30.71L20.36,33L28,25.58L35.64,33Z"
+        android:strokeColor="#00000000"
+        android:fillColor="@android:color/black"
+        android:strokeWidth="1"/>
+</vector>
diff --git a/car_product/overlay/frameworks/base/core/res/res/drawable/ic_expand_notification.xml b/car_product/overlay/frameworks/base/core/res/res/drawable/ic_expand_notification.xml
new file mode 100644
index 0000000..c93390c
--- /dev/null
+++ b/car_product/overlay/frameworks/base/core/res/res/drawable/ic_expand_notification.xml
@@ -0,0 +1,26 @@
+<?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="56dp"
+        android:height="56dp"
+        android:viewportWidth="56.0"
+        android:viewportHeight="56.0">
+    <path
+        android:pathData="M28,0C43.46,0 56,12.54 56,28C56,43.46 43.46,56 28,56C12.54,56 0,43.46 0,28C0,12.54 12.54,0 28,0ZM20.36,23L18,25.29L28,35L38,25.29L35.64,23L28,30.42L20.36,23Z"
+        android:strokeColor="#00000000"
+        android:fillColor="@android:color/black"
+        android:strokeWidth="1"/>
+</vector>
diff --git a/car_product/overlay/frameworks/base/core/res/res/drawable/notification_action_bg.xml b/car_product/overlay/frameworks/base/core/res/res/drawable/notification_action_bg.xml
new file mode 100644
index 0000000..f13b28a
--- /dev/null
+++ b/car_product/overlay/frameworks/base/core/res/res/drawable/notification_action_bg.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2016 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.
+-->
+<shape xmlns:android="http://schemas.android.com/apk/res/android">
+    <solid android:color="#ffeeeeee" />
+    <corners
+        android:bottomRightRadius="16dp"
+        android:bottomLeftRadius="16dp"/>
+</shape>
diff --git a/car_product/overlay/frameworks/base/core/res/res/layout/notification_material_action.xml b/car_product/overlay/frameworks/base/core/res/res/layout/notification_material_action.xml
new file mode 100644
index 0000000..a5a670b
--- /dev/null
+++ b/car_product/overlay/frameworks/base/core/res/res/layout/notification_material_action.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  ~ Copyright (C) 2014 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
+  -->
+
+<Button xmlns:android="http://schemas.android.com/apk/res/android"
+    style="@android:style/Widget.Material.Light.Button.Borderless.Small"
+    android:id="@+id/action0"
+    android:layout_width="wrap_content"
+    android:layout_height="48dp"
+    android:layout_gravity="center"
+    android:gravity="start|center_vertical"
+    android:layout_marginStart="4dp"
+    android:textColor="@color/notification_default_color"
+    android:textSize="24sp"
+    android:singleLine="true"
+    android:ellipsize="end"
+    android:background="@drawable/notification_material_action_background"
+    />
diff --git a/car_product/overlay/frameworks/base/core/res/res/layout/notification_material_action_emphasized.xml b/car_product/overlay/frameworks/base/core/res/res/layout/notification_material_action_emphasized.xml
new file mode 100644
index 0000000..f4a0e12
--- /dev/null
+++ b/car_product/overlay/frameworks/base/core/res/res/layout/notification_material_action_emphasized.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  ~ Copyright (C) 2016 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
+  -->
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/button_holder"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:layout_weight="1"
+    android:background="#ff000000">
+    <Button
+        style="@android:style/Widget.Material.Light.Button.Borderless.Small"
+        android:id="@+id/action0"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:gravity="center"
+        android:textColor="@color/notification_default_color"
+        android:textSize="24sp"
+        android:singleLine="true"
+        android:ellipsize="end"
+        android:background="@drawable/notification_material_action_background"
+        />
+</FrameLayout>
diff --git a/car_product/overlay/frameworks/base/core/res/res/layout/notification_material_action_list.xml b/car_product/overlay/frameworks/base/core/res/res/layout/notification_material_action_list.xml
new file mode 100644
index 0000000..5488c43
--- /dev/null
+++ b/car_product/overlay/frameworks/base/core/res/res/layout/notification_material_action_list.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2016 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.
+-->
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+        android:id="@+id/actions_container"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_gravity="bottom">
+    <com.android.internal.widget.NotificationActionListLayout
+            android:id="@+id/actions"
+            android:layout_width="match_parent"
+            android:layout_height="@dimen/notification_action_list_height"
+            android:paddingEnd="4dp"
+            android:orientation="horizontal"
+            android:gravity="center_vertical"
+            android:visibility="gone"
+            android:background="@drawable/notification_action_bg"
+            >
+        <!-- actions will be added here -->
+    </com.android.internal.widget.NotificationActionListLayout>
+</FrameLayout>
diff --git a/car_product/overlay/frameworks/base/core/res/res/layout/notification_material_action_tombstone.xml b/car_product/overlay/frameworks/base/core/res/res/layout/notification_material_action_tombstone.xml
new file mode 100644
index 0000000..ea184ef
--- /dev/null
+++ b/car_product/overlay/frameworks/base/core/res/res/layout/notification_material_action_tombstone.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  ~ Copyright (C) 2014 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
+  -->
+
+<Button xmlns:android="http://schemas.android.com/apk/res/android"
+    style="@android:style/Widget.Material.Light.Button.Borderless.Small"
+    android:id="@+id/action0"
+    android:layout_width="wrap_content"
+    android:layout_height="48dp"
+    android:layout_marginStart="4dp"
+    android:layout_gravity="center"
+    android:gravity="start|center_vertical"
+    android:textColor="#555555"
+    android:textSize="24sp"
+    android:singleLine="true"
+    android:ellipsize="end"
+    android:alpha="0.5"
+    android:enabled="false"
+    android:background="@drawable/notification_material_action_background"
+    />
diff --git a/car_product/overlay/frameworks/base/core/res/res/layout/notification_template_right_icon.xml b/car_product/overlay/frameworks/base/core/res/res/layout/notification_template_right_icon.xml
new file mode 100644
index 0000000..068e8b6
--- /dev/null
+++ b/car_product/overlay/frameworks/base/core/res/res/layout/notification_template_right_icon.xml
@@ -0,0 +1,27 @@
+<?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
+  -->
+
+<ImageView
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/right_icon"
+    android:layout_width="64dp"
+    android:layout_height="64dp"
+    android:layout_marginEnd="@dimen/notification_content_margin_end"
+    android:layout_marginTop="76dp"
+    android:layout_marginBottom="76dp"
+    android:layout_gravity="center_vertical|end"
+    android:scaleType="centerCrop" />
diff --git a/car_product/overlay/frameworks/base/core/res/res/values-h600dp/dimens.xml b/car_product/overlay/frameworks/base/core/res/res/values-h600dp/dimens.xml
new file mode 100644
index 0000000..b10cb31
--- /dev/null
+++ b/car_product/overlay/frameworks/base/core/res/res/values-h600dp/dimens.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2016 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.
+-->
+<resources>
+    <!-- Size of notification text titles (see TextAppearance.StatusBar.EventContent.Title) -->
+    <dimen name="notification_title_text_size">40sp</dimen>
+
+    <!-- Size of notification text (see TextAppearance.StatusBar.EventContent) -->
+    <dimen name="notification_text_size">32sp</dimen>
+
+    <!-- The absolute size of the application icon in the notification header. -->
+    <dimen name="notification_header_icon_size">32dp</dimen>
+
+    <!-- The height of the header of a notification. -->
+    <dimen name="notification_header_height">76dp</dimen>
+
+    <!-- Top margin to accommodate for the header before the notification content. This value
+         is smaller than the notification_header_height to bring the text closer. Otherwise,
+         spacing in the font itself makes the space look too large. -->
+    <dimen name="notification_content_margin_top">68dp</dimen>
+</resources>
diff --git a/car_product/overlay/frameworks/base/core/res/res/values-w840dp/dimens.xml b/car_product/overlay/frameworks/base/core/res/res/values-w840dp/dimens.xml
new file mode 100644
index 0000000..ea826b4
--- /dev/null
+++ b/car_product/overlay/frameworks/base/core/res/res/values-w840dp/dimens.xml
@@ -0,0 +1,23 @@
+<?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.
+-->
+<resources>
+    <!-- The margin on the start of the content view. This value should match card keyline1. -->
+    <dimen name="notification_content_margin_start">32dp</dimen>
+
+    <!-- The margin on the end of the content view with a picture. This value is the size of
+         the right icon (64dp) + notification_content_margin_end + 16dp. -->
+    <dimen name="notification_content_picture_margin">112dp</dimen>
+</resources>
diff --git a/car_product/overlay/frameworks/base/core/res/res/values/config.xml b/car_product/overlay/frameworks/base/core/res/res/values/config.xml
index 2a97f64..a9fb0e7 100644
--- a/car_product/overlay/frameworks/base/core/res/res/values/config.xml
+++ b/car_product/overlay/frameworks/base/core/res/res/values/config.xml
@@ -48,7 +48,16 @@
     <integer name="config_jobSchedulerIdleWindowSlop">0</integer>
 
     <bool name="config_supportsMultiWindow">false</bool>
+
     <!-- Automotive Bluetooth pairing option -->
     <bool name="enable_pbap_pce_profile">true</bool>
 
+    <!-- Component name of a custom ResolverActivity (Intent resolver) to be used instead of
+         the default framework version. -->
+    <string name="config_customResolverActivity" translatable="false">com.android.support.car.lenspicker/.LensResolverActivity</string>
+
+    <!-- Flag indicating that the entire notification header can be clicked to expand the
+         notification. If false, then the expand icon has to be clicked in order for the expand
+         to occur. -->
+    <bool name="config_notificationHeaderClickableForExpand">true</bool>
 </resources>
diff --git a/car_product/overlay/frameworks/base/core/res/res/values/dimens.xml b/car_product/overlay/frameworks/base/core/res/res/values/dimens.xml
index 136ca80..553c890 100644
--- a/car_product/overlay/frameworks/base/core/res/res/values/dimens.xml
+++ b/car_product/overlay/frameworks/base/core/res/res/values/dimens.xml
@@ -20,4 +20,73 @@
     <dimen name="status_bar_height">56dp</dimen>
     <dimen name="navigation_bar_height_car_mode">112dp</dimen>
     <dimen name="status_bar_icon_size">40dp</dimen>
+
+    <!-- The height of the header of a notification. -->
+    <dimen name="notification_header_height">58dp</dimen>
+
+    <!-- The absolute size of the notification expand icon. -->
+    <dimen name="notification_header_expand_icon_size">55dp</dimen>
+
+        <!-- The top padding for the notification expand button. -->
+    <dimen name="notification_expand_button_padding_top">0dp</dimen>
+
+    <!-- The end margin after the application icon in the notification header -->
+    <dimen name="notification_header_icon_margin_end">10dp</dimen>
+
+    <!-- The absolute size of the application icon in the notification header. -->
+    <dimen name="notification_header_icon_size">24dp</dimen>
+
+    <!-- The margins before and after each of the items in the notification header.-->
+    <dimen name="notification_header_separating_margin">6dp</dimen>
+
+    <!-- The margins before the start of the app name in the header. -->
+    <dimen name="notification_header_app_name_margin_start">@dimen/notification_header_separating_margin</dimen>
+
+    <!-- The padding at the top of the notification header. -->
+    <dimen name="notification_header_padding_top">0dp</dimen>
+
+    <!-- The padding at the bottom of the notification header. -->
+    <dimen name="notification_header_padding_bottom">0dp</dimen>
+
+    <!-- The margin at the bottom of the notification header. -->
+    <dimen name="notification_header_margin_bottom">0dp</dimen>
+
+    <!-- The absolute height for the header in a media notification. -->
+    <dimen name="media_notification_header_height">@dimen/notification_header_height</dimen>
+
+    <!-- Top margin to accommodate for the header before the notification content. This value
+         is 8dp smaller than the notification_header_height to bring the text closer. Otherwise,
+         spacing in the font itself makes the space look too large. -->
+    <dimen name="notification_content_margin_top">55dp</dimen>
+
+    <!-- The bottom margin after the notification content.-->
+    <dimen name="notification_content_margin_bottom">24dp</dimen>
+
+    <!-- The margin on the start of the content view. This value should match card keyline1. -->
+    <dimen name="notification_content_margin_start">24dp</dimen>
+
+    <!-- The margin on the end of the content view. Keep in sync with
+         notification_content_plus_picture_margin! -->
+    <dimen name="notification_content_margin_end">@dimen/notification_content_margin_start</dimen>
+
+    <!-- The margin on the end of the content view with a picture. This value is the size of
+         the right icon (64dp) + notification_content_margin_end + 16dp. -->
+    <dimen name="notification_content_picture_margin">106dp</dimen>
+
+    <!-- The margin on the end of the content view with a picture, plus the standard
+        content end margin. -->
+    <dimen name="notification_content_plus_picture_margin_end">80dp</dimen>
+
+    <!-- Size of notification text titles (see TextAppearance.StatusBar.EventContent.Title). -->
+    <dimen name="notification_title_text_size">32sp</dimen>
+
+    <!-- Size of notification text (see TextAppearance.StatusBar.EventContent). -->
+    <dimen name="notification_text_size">26sp</dimen>
+
+    <!-- Size of smaller notification text (see TextAppearance.StatusBar.EventContent.Line2,
+         Info, Time). -->
+    <dimen name="notification_subtext_size">@dimen/notification_text_size</dimen>
+
+    <!-- The margin on top of the text of the notification. -->
+    <dimen name="notification_text_margin_top">0dp</dimen>
 </resources>
diff --git a/car_product/overlay/frameworks/base/packages/SystemUI/res/values-h600dp/dimens.xml b/car_product/overlay/frameworks/base/packages/SystemUI/res/values-h600dp/dimens.xml
new file mode 100644
index 0000000..3140afc
--- /dev/null
+++ b/car_product/overlay/frameworks/base/packages/SystemUI/res/values-h600dp/dimens.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.
+-->
+<resources>
+    <!-- The height of the header for a container containing child notifications. -->
+    <dimen name="notification_children_container_header_height">96dp</dimen>
+
+    <!-- The top margin for the notification children container in its non-expanded form. This
+         value is smaller than notification_children_container_header_height to bring the first
+         child closer so there is less wasted space. -->
+    <dimen name="notification_children_container_margin_top">88dp</dimen>
+</resources>
diff --git a/car_product/overlay/frameworks/base/packages/SystemUI/res/values-night/colors.xml b/car_product/overlay/frameworks/base/packages/SystemUI/res/values-night/colors.xml
new file mode 100644
index 0000000..be66b5b
--- /dev/null
+++ b/car_product/overlay/frameworks/base/packages/SystemUI/res/values-night/colors.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2016, 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.
+*/
+-->
+<resources>
+    <color name="status_bar_background_color">#ff000000</color>
+    <color name="system_bar_background_opaque">#ff0c1013</color>
+</resources>
diff --git a/car_product/overlay/frameworks/base/packages/SystemUI/res/values-sw600dp/dimens.xml b/car_product/overlay/frameworks/base/packages/SystemUI/res/values-sw600dp/dimens.xml
new file mode 100644
index 0000000..7b85870
--- /dev/null
+++ b/car_product/overlay/frameworks/base/packages/SystemUI/res/values-sw600dp/dimens.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2016 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.
+-->
+<resources>
+    <!-- The width of the panel holding the notification cards. -->
+    <dimen name="notification_panel_width">744dp</dimen>
+</resources>
diff --git a/car_product/overlay/frameworks/base/packages/SystemUI/res/values-w1024dp/dimens.xml b/car_product/overlay/frameworks/base/packages/SystemUI/res/values-w1024dp/dimens.xml
new file mode 100644
index 0000000..932bae2
--- /dev/null
+++ b/car_product/overlay/frameworks/base/packages/SystemUI/res/values-w1024dp/dimens.xml
@@ -0,0 +1,19 @@
+<?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.
+-->
+<resources>
+    <!-- The width of panel holding the notification card. -->
+    <dimen name="notification_panel_width">744dp</dimen>
+</resources>
diff --git a/car_product/overlay/frameworks/base/packages/SystemUI/res/values-w550dp-land/dimens.xml b/car_product/overlay/frameworks/base/packages/SystemUI/res/values-w550dp-land/dimens.xml
new file mode 100644
index 0000000..2248352
--- /dev/null
+++ b/car_product/overlay/frameworks/base/packages/SystemUI/res/values-w550dp-land/dimens.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2016 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.
+-->
+<resources>
+    <!-- The width of panel holding the notification card. -->
+    <dimen name="notification_panel_width">522dp</dimen>
+</resources>
diff --git a/car_product/overlay/frameworks/base/packages/SystemUI/res/values/colors.xml b/car_product/overlay/frameworks/base/packages/SystemUI/res/values/colors.xml
index 7b6e5eb..b66ff92 100644
--- a/car_product/overlay/frameworks/base/packages/SystemUI/res/values/colors.xml
+++ b/car_product/overlay/frameworks/base/packages/SystemUI/res/values/colors.xml
@@ -22,4 +22,13 @@
 
     <color name="docked_divider_background">@color/car_grey_50</color>
     <color name="system_bar_background_opaque">#ff172026</color>
+
+    <color name="status_bar_background_color">#33000000</color>
+    <drawable name="system_bar_background">@color/status_bar_background_color</drawable>
+
+    <!-- The scrim color for the background of the notifications shade. -->
+    <color name="scrim_behind_color">#172026</color>
+
+    <!-- The color of the dividing line between grouped notifications. -->
+    <color name="notification_divider_color">@*android:color/notification_action_list</color>
 </resources>
diff --git a/car_product/overlay/frameworks/base/packages/SystemUI/res/values/config.xml b/car_product/overlay/frameworks/base/packages/SystemUI/res/values/config.xml
index b5aae40..a9f231c 100644
--- a/car_product/overlay/frameworks/base/packages/SystemUI/res/values/config.xml
+++ b/car_product/overlay/frameworks/base/packages/SystemUI/res/values/config.xml
@@ -22,4 +22,81 @@
     <string name="config_statusBarComponent" translatable="false">com.android.systemui.statusbar.car.CarStatusBar</string>
     <string name="config_systemUIFactoryComponent" translatable="false">com.android.systemui.car.CarSystemUIFactory</string>
     <bool name="config_enableFullscreenUserSwitcher">true</bool>
+
+    <!-- Notifications on the car should not show the gear icon. Swiping should only dismiss the
+         cards. -->
+    <bool name="config_showNotificationGear">false</bool>
+
+    <!-- No need to draw a background around a notification because there is no gear icon. -->
+    <bool name="config_drawNotificationBackground">false</bool>
+
+    <!-- No quick settings the quick settings row should not be shown.-->
+    <bool name="config_showQuickSettingsRow">false</bool>
+
+    <!-- The quick settings are not available on the car and should not be editable. -->
+    <bool name="config_showQuickSettingsEditingIcon">false</bool>
+
+    <!-- The multi-user switcher should always be visible because quick settings cannot be
+         expanded. Thus, there is no other way to access this. -->
+    <bool name="config_alwaysShowMultiUserSwitcher">true</bool>
+
+    <!-- The quick settings should not be available for expansion in the car. -->
+    <bool name="config_showQuickSettingsExpandIndicator">false</bool>
+
+    <!-- There are no quick settings, so it should not be revealed with scrolling. -->
+    <bool name="config_enableQuickSettingsOverscrollExpansion">false</bool>
+
+    <!-- The notification shade should only be shown on a facet click and not by dragging. -->
+    <bool name="config_enableNotificationShadeDrag">false</bool>
+
+    <!-- There should not be the ability to clear all notifications with a button. -->
+    <bool name="config_enableNotificationsClearAll">false</bool>
+
+    <!-- Hide the notification shelf so that the cards in the notification center scroll smoothly
+         off-screen. -->
+    <bool name="config_showNotificationShelf">false</bool>
+
+    <!-- The notifications should always fade when being dismissed. -->
+    <bool name="config_fadeNotificationsOnDismiss">true</bool>
+
+    <!-- The entire notification row should be translated because the cards are smaller than the
+         width of the screen. If the row is not translated, then they will be clipped. -->
+    <bool name="config_translateNotificationContentsOnSwipe">false</bool>
+
+    <!-- The notifications should fade as they are being swiped off screen. -->
+    <bool name="config_fadeDependingOnAmountSwiped">true</bool>
+
+     <!-- The expand icon should be displayed at the top right corner of the notifications. -->
+    <bool name="config_showNotificationExpandButtonAtEnd">true</bool>
+
+    <!-- A notification card that has been scrolled off screen should not be clipped in height. This
+         maintains the illusion that the cards are being scrolled underneath the status bar
+         shelf. -->
+    <bool name="config_clipNotificationScrollToTop">false</bool>
+
+    <!-- The auto notification have rounded corners. Ensure that any content is clipped to these
+         corners. -->
+    <bool name="config_clipNotificationsToOutline">true</bool>
+
+    <!-- Notifications should always be in their expanded state so that the actions are visible.
+         This will make it easier for a auto user to interact with them. -->
+    <bool name="config_alwaysExpandNonGroupedNotifications">true</bool>
+
+    <!-- Auto does not allow notifications to be toggled to and from their expanded states to
+         reduce driver distraction. -->
+    <bool name="config_enableNonGroupedNotificationExpand">false</bool>
+
+    <!-- There should always be a dividing line between notifications. -->
+    <bool name="config_showDividersWhenGroupNotificationExpanded">true</bool>
+
+    <!--- Hide the dividing lines when the notification group is expanding. -->
+    <bool name="config_hideDividersDuringTransition">true</bool>
+
+    <!-- Child notifications are displayed with no dividing space between them in auto, so disable
+         the shadow. -->
+    <bool name="config_enableShadowOnChildNotifications">false</bool>
+
+    <!-- Keep the notification background when the container has been expanded. The children will
+         expand inline within the container, so it can keep its original background. -->
+    <bool name="config_showGroupNotificationBgWhenExpanded">true</bool>
 </resources>
diff --git a/car_product/overlay/frameworks/base/packages/SystemUI/res/values/dimens.xml b/car_product/overlay/frameworks/base/packages/SystemUI/res/values/dimens.xml
index 1001784..5d675fe 100644
--- a/car_product/overlay/frameworks/base/packages/SystemUI/res/values/dimens.xml
+++ b/car_product/overlay/frameworks/base/packages/SystemUI/res/values/dimens.xml
@@ -17,6 +17,10 @@
 */
 -->
 <resources>
+    <!-- The alpha for the scrim behind the notification shade. This value is 1 so that the
+         scrim has no transparency. -->
+    <item name="scrim_behind_alpha" format="float" type="dimen">1.0</item>
+
     <!-- The amount by which to scale up the status bar icons. -->
     <item name="status_bar_icon_scale_factor" format="float" type="dimen">2.3</item>
 
@@ -70,4 +74,66 @@
     <!-- Largest size an avatar might need to be drawn in the user picker, status bar, or
          quick settings header -->
     <dimen name="max_avatar_size">128dp</dimen>
+
+    <!-- The width of panel holding the notification card. -->
+    <dimen name="notification_panel_width">522dp</dimen>
+
+    <!-- The width of the quick settings panel. -1 for match_parent. -->
+    <dimen name="qs_panel_width">-1px</dimen>
+
+    <!-- Height of a small notification in the status bar-->
+    <dimen name="notification_min_height">600dp</dimen>
+
+    <!-- Height of a small notification in the status bar which was used before android N -->
+    <dimen name="notification_min_height_legacy">600dp</dimen>
+
+    <!-- Height of a large notification in the status bar -->
+    <dimen name="notification_max_height">600dp</dimen>
+
+    <!-- Height of a heads up notification in the status bar for legacy custom views -->
+    <dimen name="notification_max_heads_up_height_legacy">600dp</dimen>
+
+    <!-- Height of a heads up notification in the status bar -->
+    <dimen name="notification_max_heads_up_height">600dp</dimen>
+
+    <!-- Height of the status bar header bar -->
+    <dimen name="status_bar_header_height">54dp</dimen>
+
+    <!-- The height of the divider between the individual notifications. -->
+    <dimen name="notification_divider_height">16dp</dimen>
+
+    <!-- The height of the divider between the individual notifications when the notification
+         wants it to be increased. This value is the same as notification_divider_height so that
+         the spacing between all notifications will always be the same. -->
+    <dimen name="notification_divider_height_increased">@dimen/notification_divider_height</dimen>
+
+    <!-- The alpha of the dividing line between child notifications of a notification group. -->
+    <item name="notification_divider_alpha" format="float" type="dimen">1.0</item>
+
+    <!-- The width of each individual notification card. -->
+    <dimen name="notification_child_width">522dp</dimen>
+
+    <!-- The top margin of the notification panel. -->
+    <dimen name="notification_panel_margin_top">32dp</dimen>
+
+    <!-- The bottom margin of the panel that holds the list of notifications. -->
+    <dimen name="notification_panel_margin_bottom">@dimen/notification_divider_height</dimen>
+
+    <!-- The corner radius of the shadow behind the notification. -->
+    <dimen name="notification_shadow_radius">16dp</dimen>
+
+    <!-- The amount of space below the notification list. This value is 0 so the list scrolls
+         all the way to the bottom. -->
+    <dimen name="close_handle_underlap">0dp</dimen>
+
+    <!-- The height of the divider between the individual notifications in a notification group. -->
+    <dimen name="notification_children_container_divider_height">1dp</dimen>
+
+    <!-- The height of the header for a container containing child notifications. -->
+    <dimen name="notification_children_container_header_height">76dp</dimen>
+
+    <!-- The top margin for the notification children container in its non-expanded form. This
+         value is smaller than notification_children_container_header_height to bring the first
+         child closer so there is less wasted space. -->
+    <dimen name="notification_children_container_margin_top">68dp</dimen>
 </resources>
diff --git a/evs/app/evs_app.cpp b/evs/app/evs_app.cpp
index 6062f93..9d33e05 100644
--- a/evs/app/evs_app.cpp
+++ b/evs/app/evs_app.cpp
@@ -40,6 +40,33 @@
 using android::hardware::joinRpcThreadpool;
 
 
+// Helper to subscribe to VHal notifications
+static bool subscribeToVHal(sp<IVehicle> pVnet,
+                            sp<IVehicleCallback> listener,
+                            VehicleProperty propertyId) {
+    assert(pVnet != nullptr);
+    assert(listener != nullptr);
+
+    // Register for vehicle state change callbacks we care about
+    // Changes in these values are what will trigger a reconfiguration of the EVS pipeline
+    SubscribeOptions optionsData[] = {
+        {
+            .propId = static_cast<int32_t>(propertyId),
+            .flags  = SubscribeFlags::DEFAULT
+        },
+    };
+    hidl_vec <SubscribeOptions> options;
+    options.setToExternal(optionsData, arraysize(optionsData));
+    StatusCode status = pVnet->subscribe(listener, options);
+    if (status != StatusCode::OK) {
+        ALOGW("VHAL subscription for property 0x%08X failed with code %d.", propertyId, status);
+        return false;
+    }
+
+    return true;
+}
+
+
 // Main entry point
 int main(int argc, char** argv)
 {
@@ -91,7 +118,7 @@
     }
 
     // Connect to the Vehicle HAL so we can monitor state
-    android::sp <IVehicle> pVnet;
+    sp<IVehicle> pVnet;
     if (useVehicleHal) {
         ALOGI("Connecting to Vehicle HAL");
         pVnet = IVehicle::getService();
@@ -101,24 +128,13 @@
         } else {
             // Register for vehicle state change callbacks we care about
             // Changes in these values are what will trigger a reconfiguration of the EVS pipeline
-            SubscribeOptions optionsData[2] = {
-                    {
-                            .propId = static_cast<int32_t>(VehicleProperty::GEAR_SELECTION),
-                            .flags = SubscribeFlags::DEFAULT
-                    },
-                    {
-                            .propId = static_cast<int32_t>(VehicleProperty::TURN_SIGNAL_STATE),
-                            .flags = SubscribeFlags::DEFAULT
-                    },
-            };
-            hidl_vec <SubscribeOptions> options;
-            options.setToExternal(optionsData, arraysize(optionsData));
-            StatusCode status = pVnet->subscribe(pEvsListener, options);
-            if (status != StatusCode::OK) {
-                ALOGE("Subscription to vehicle notifications failed with code %d.  Exiting.",
-                      status);
+            if (!subscribeToVHal(pVnet, pEvsListener, VehicleProperty::GEAR_SELECTION)) {
+                ALOGE("Without gear notification, we can't support EVS.  Exiting.");
                 return 1;
             }
+            if (!subscribeToVHal(pVnet, pEvsListener, VehicleProperty::TURN_SIGNAL_STATE)) {
+                ALOGW("Didn't get turn signal notificaitons, so we'll ignore those.");
+            }
         }
     } else {
         ALOGW("Test mode selected, so not talking to Vehicle HAL");
diff --git a/service/src/com/android/car/CarDiagnosticService.java b/service/src/com/android/car/CarDiagnosticService.java
index e752133..88e7e34 100644
--- a/service/src/com/android/car/CarDiagnosticService.java
+++ b/service/src/com/android/car/CarDiagnosticService.java
@@ -29,6 +29,7 @@
 import android.os.RemoteException;
 import android.util.ArrayMap;
 import android.util.Log;
+import com.android.car.hal.DiagnosticHalService.DiagnosticCapabilities;
 import com.android.car.internal.CarPermission;
 import com.android.car.Listeners.ClientWithRate;
 import com.android.car.hal.DiagnosticHalService;
@@ -389,6 +390,29 @@
         return mDiagnosticHal;
     }
 
+    // Expose DiagnosticCapabilities
+    public boolean isLiveFrameSupported() {
+        return getDiagnosticHal().getDiagnosticCapabilities().isLiveFrameSupported();
+    }
+
+    public boolean isFreezeFrameSupported() {
+        return getDiagnosticHal().getDiagnosticCapabilities().isFreezeFrameSupported();
+    }
+
+    public boolean isFreezeFrameTimestampSupported() {
+        DiagnosticCapabilities diagnosticCapabilities =
+                getDiagnosticHal().getDiagnosticCapabilities();
+        return diagnosticCapabilities.isFreezeFrameInfoSupported() &&
+                diagnosticCapabilities.isFreezeFrameSupported();
+    }
+
+    public boolean isFreezeFrameClearSupported() {
+        DiagnosticCapabilities diagnosticCapabilities =
+            getDiagnosticHal().getDiagnosticCapabilities();
+        return diagnosticCapabilities.isFreezeFrameClearSupported() &&
+            diagnosticCapabilities.isFreezeFrameSupported();
+    }
+
     // ICarDiagnostic implementations
 
     @Override
diff --git a/tests/carservice_test/src/com/android/car/test/CarDiagnosticManagerTest.java b/tests/carservice_test/src/com/android/car/test/CarDiagnosticManagerTest.java
index 154101f..d316ba6 100644
--- a/tests/carservice_test/src/com/android/car/test/CarDiagnosticManagerTest.java
+++ b/tests/carservice_test/src/com/android/car/test/CarDiagnosticManagerTest.java
@@ -728,6 +728,13 @@
         assertTrue(listener2.waitForEvent(time));
     }
 
+    public void testIsSupportedApiCalls() throws Exception {
+        assertTrue(mCarDiagnosticManager.isLiveFrameSupported());
+        assertTrue(mCarDiagnosticManager.isFreezeFrameSupported());
+        assertTrue(mCarDiagnosticManager.isFreezeFrameTimestampSupported());
+        assertTrue(mCarDiagnosticManager.isFreezeFrameClearSupported());
+    }
+
     class Listener implements CarDiagnosticManager.OnDiagnosticEventListener {
         private final Object mSync = new Object();
 
diff --git a/tools/bootanalyze/config.yaml b/tools/bootanalyze/config.yaml
index 5b221f3..8c21606 100644
--- a/tools/bootanalyze/config.yaml
+++ b/tools/bootanalyze/config.yaml
@@ -43,7 +43,11 @@
   CarLauncherReady: Em.Overview:\s*onResume
   CarService_start: for service com.android.car/.CarService
   BootAnimStart: starting service 'bootanim'
+  BootAnimStopRequest: TELLING SURFACE FLINGER WE ARE BOOTED
   BootAnimEnd: Service 'bootanim'
+  KeyguardStart: KeyguardServiceDelegate.*\*\*\* Keyguard started
+  KeyguardConnected: KeyguardServiceDelegate.*\*\*\* Keyguard connected
+  KeyguardShown: KeyguardServiceDelegate.*\*\*\*\* SHOWN CALLED \*\*\*\*
   BootComplete: Starting phase 1000
   BootComplete_kernel: processing action \(sys\.boot_completed=1\)
   LauncherStart: START.*HOME.*(NexusLauncherActivity|GEL)
diff --git a/tools/emulator/gui.py b/tools/emulator/gui.py
new file mode 100755
index 0000000..87d4925
--- /dev/null
+++ b/tools/emulator/gui.py
@@ -0,0 +1,122 @@
+#!/usr/bin/env python
+#
+# 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.
+#
+
+# A simple GUI to remotely actuate the Vehicle HAL via the eumalator
+
+import sys
+import vhal_consts_2_1 as c
+
+from PyQt4.QtCore import *
+from PyQt4.QtGui import *
+
+from vhal_emulator import Vhal
+
+
+# Main window setup
+def window():
+    app = QApplication(sys.argv)
+    widget = QWidget()
+    widget.setWindowTitle("VHal Driver")
+    widget.setGeometry(100,100,200,50)
+    topLevelLayout = QHBoxLayout()
+    widget.setLayout(topLevelLayout)
+
+    shiftLayout = QVBoxLayout()
+    topLevelLayout.addLayout(shiftLayout)
+
+    gearTitle = QLabel(widget)
+    gearTitle.setText("Gear Shift")
+    shiftLayout.addWidget(gearTitle);
+
+    gearDisplay = QLabel(widget)
+    shiftLayout.addWidget(gearDisplay);
+
+    slider = QSlider(Qt.Vertical)
+    slider.setMinimum(0)
+    slider.setMaximum(2)
+    slider.setInvertedAppearance(True)
+    slider.valueChanged.connect(lambda:sliderMove(slider, gearDisplay))
+    shiftLayout.addWidget(slider)
+    sliderMove(slider, gearDisplay)
+
+
+    buttonLayout = QVBoxLayout()
+    topLevelLayout.addLayout(buttonLayout)
+
+    signalButtonGroup = QButtonGroup()
+
+    bNoSignal = QPushButton("None")
+    bNoSignal.setCheckable(True)
+    bNoSignal.setChecked(True)
+    buttonLayout.addWidget(bNoSignal)
+    signalButtonGroup.addButton(bNoSignal)
+
+    bHazards = QPushButton("Hazards")
+    bHazards.setCheckable(True)
+    buttonLayout.addWidget(bHazards)
+    signalButtonGroup.addButton(bHazards)
+
+    bLeft = QPushButton("Left")
+    bLeft.setCheckable(True)
+    buttonLayout.addWidget(bLeft)
+    signalButtonGroup.addButton(bLeft)
+
+    bRight = QPushButton("Right")
+    bRight.setCheckable(True)
+    buttonLayout.addWidget(bRight)
+    signalButtonGroup.addButton(bRight)
+
+    signalButtonGroup.buttonClicked.connect(lambda:onSignalClicked(signalButtonGroup))
+
+    widget.show()
+    sys.exit(app.exec_())
+
+
+def onSignalClicked(group):
+    print "signal "+group.checkedButton().text()+" is active"
+    try:
+        vhal.setProperty(c.VEHICLEPROPERTY_TURN_SIGNAL_STATE, 0, group.checkedId())
+    except:
+        print "Ignoring error setting property 0x{:08X}".format(c.VEHICLEPROPERTY_TURN_SIGNAL_STATE)
+
+
+def sliderMove(slider, gearDisplay):
+    if slider.value() == 0:
+        gearName = 'park'
+        vhal.setProperty(c.VEHICLEPROPERTY_GEAR_SELECTION, 0, c.VEHICLEGEAR_GEAR_PARK)
+    elif slider.value() == 1:
+        gearName = 'reverse'
+        vhal.setProperty(c.VEHICLEPROPERTY_GEAR_SELECTION, 0, c.VEHICLEGEAR_GEAR_REVERSE)
+    elif slider.value() == 2:
+        gearName = 'drive'
+        vhal.setProperty(c.VEHICLEPROPERTY_GEAR_SELECTION, 0, c.VEHICLEGEAR_GEAR_DRIVE)
+    else:
+        gearName = "UNK"
+    print "slider "+slider.objectName()+" is now "+str(slider.value())+" = "+gearName
+    gearDisplay.setText(gearName)
+
+
+if __name__ == '__main__':
+    print "Starting VHal driver GUI"
+
+    vhal = Vhal(c.vhal_types_2_0)
+
+    # Put the car in park so we start in a known state (consistent with the GUI default state)
+    vhal.setProperty(c.VEHICLEPROPERTY_GEAR_SELECTION, 0, c.VEHICLEGEAR_GEAR_PARK)
+
+    # Start the main UI -- never returns
+    window()
diff --git a/tools/emulator/vhal_emulator.py b/tools/emulator/vhal_emulator.py
index b8b1e75..98c9f51 100644
--- a/tools/emulator/vhal_emulator.py
+++ b/tools/emulator/vhal_emulator.py
@@ -174,7 +174,7 @@
 
     def getConfigAll(self):
         """
-            Sends a getConfigAll message to the host.  This will return all configs avaialable.
+            Sends a getConfigAll message to the host.  This will return all configs available.
         """
         cmd = VehicleHalProto_pb2.EmulatorMessage()
         cmd.msg_type = VehicleHalProto_pb2.GET_CONFIG_ALL_CMD
@@ -193,7 +193,7 @@
 
     def getPropertyAll(self):
         """
-            Sends a getPropertyAll message to the host.  This will return all properties avaialable.
+            Sends a getPropertyAll message to the host.  This will return all properties available.
         """
         cmd = VehicleHalProto_pb2.EmulatorMessage()
         cmd.msg_type = VehicleHalProto_pb2.GET_PROPERTY_ALL_CMD