Merge "Commandeer full screen user switcher for auto."
diff --git a/packages/SystemUI/res/layout/fullscreen_user_pod.xml b/packages/SystemUI/res/layout/car_fullscreen_user_pod.xml
similarity index 84%
rename from packages/SystemUI/res/layout/fullscreen_user_pod.xml
rename to packages/SystemUI/res/layout/car_fullscreen_user_pod.xml
index 12f0a80..b7e666f 100644
--- a/packages/SystemUI/res/layout/fullscreen_user_pod.xml
+++ b/packages/SystemUI/res/layout/car_fullscreen_user_pod.xml
@@ -26,13 +26,13 @@
<ImageView android:id="@+id/user_avatar"
android:padding="10dp"
android:layout_gravity="center"
- android:layout_width="160dp"
- android:layout_height="160dp" />
+ android:layout_width="@dimen/car_fullscreen_user_pod_image_avatar_width"
+ android:layout_height="@dimen/car_fullscreen_user_pod_image_avatar_height" />
<TextView android:id="@+id/user_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:textSize="@dimen/qs_detail_item_secondary_text_size"
+ android:textSize="@dimen/car_fullscreen_user_pod_text_size"
android:textColor="@color/qs_user_detail_name"
android:gravity="center_horizontal" />
</LinearLayout>
diff --git a/packages/SystemUI/res/layout/car_fullscreen_user_switcher.xml b/packages/SystemUI/res/layout/car_fullscreen_user_switcher.xml
new file mode 100644
index 0000000..b953ff2
--- /dev/null
+++ b/packages/SystemUI/res/layout/car_fullscreen_user_switcher.xml
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2015 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:fitsSystemWindows="true"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:visibility="gone">
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical">
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/car_lockscreen_disclaimer_title"
+ android:textSize="@dimen/car_lockscreen_disclaimer_title_size"
+ android:paddingStart="@dimen/car_lockscreen_disclaimer_title_padding_start"
+ android:paddingTop="@dimen/car_lockscreen_disclaimer_title_padding_top" />
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/car_lockscreen_disclaimer_text"
+ android:textSize="@dimen/car_lockscreen_disclaimer_text_size"
+ android:paddingStart="@dimen/car_lockscreen_disclaimer_text_padding_start"
+ android:paddingEnd="@dimen/car_lockscreen_disclaimer_text_padding_end"
+ android:paddingTop="@dimen/car_lockscreen_disclaimer_text_padding_top" />
+ <com.android.systemui.statusbar.UserGridView
+ android:id="@+id/user_grid"
+ android:layout_gravity="center"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:paddingTop="@dimen/car_lockscreen_user_grid_view_padding_top"
+ android:stretchMode="columnWidth">
+ </com.android.systemui.statusbar.UserGridView>
+ </LinearLayout>
+</FrameLayout>
diff --git a/packages/SystemUI/res/layout/fullscreen_user_switcher.xml b/packages/SystemUI/res/layout/fullscreen_user_switcher.xml
deleted file mode 100644
index 46c1896..0000000
--- a/packages/SystemUI/res/layout/fullscreen_user_switcher.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2015 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:fitsSystemWindows="true"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:visibility="gone">
- <com.android.systemui.statusbar.UserGridView
- android:id="@+id/user_grid"
- android:layout_gravity="center"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:paddingStart="10dp"
- android:paddingEnd="10dp"
- android:columnWidth="180dp"
- android:verticalSpacing="10dp"
- android:horizontalSpacing="10dp"
- android:stretchMode="columnWidth"
- android:gravity="center">
- </com.android.systemui.statusbar.UserGridView>
-</FrameLayout>
diff --git a/packages/SystemUI/res/layout/keyguard_user_switcher_item.xml b/packages/SystemUI/res/layout/keyguard_user_switcher_item.xml
index 2e67376..c6e453a 100644
--- a/packages/SystemUI/res/layout/keyguard_user_switcher_item.xml
+++ b/packages/SystemUI/res/layout/keyguard_user_switcher_item.xml
@@ -43,4 +43,4 @@
sysui:frameWidth="@dimen/keyguard_user_switcher_border_thickness"
sysui:framePadding="6dp"
sysui:activeFrameColor="@color/current_user_border_color" />
-</com.android.systemui.qs.tiles.UserDetailItemView>
\ No newline at end of file
+</com.android.systemui.qs.tiles.UserDetailItemView>
diff --git a/packages/SystemUI/res/layout/super_status_bar.xml b/packages/SystemUI/res/layout/super_status_bar.xml
index 39da8d0..4c80b48 100644
--- a/packages/SystemUI/res/layout/super_status_bar.xml
+++ b/packages/SystemUI/res/layout/super_status_bar.xml
@@ -80,7 +80,7 @@
</FrameLayout>
<ViewStub android:id="@+id/fullscreen_user_switcher_stub"
- android:layout="@layout/fullscreen_user_switcher"
+ android:layout="@layout/car_fullscreen_user_switcher"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
diff --git a/packages/SystemUI/res/values/dimens_car.xml b/packages/SystemUI/res/values/dimens_car.xml
new file mode 100644
index 0000000..ecdccee
--- /dev/null
+++ b/packages/SystemUI/res/values/dimens_car.xml
@@ -0,0 +1,32 @@
+<?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>
+ <dimen name="car_lockscreen_disclaimer_title_size">48sp</dimen>
+ <dimen name="car_lockscreen_disclaimer_title_padding_start">96dp</dimen>
+ <dimen name="car_lockscreen_disclaimer_title_padding_top">96dp</dimen>
+ <dimen name="car_lockscreen_disclaimer_text_size">28sp</dimen>
+ <dimen name="car_lockscreen_disclaimer_text_padding_start">96dp</dimen>
+ <dimen name="car_lockscreen_disclaimer_text_padding_end">96dp</dimen>
+ <dimen name="car_lockscreen_disclaimer_text_padding_top">32dp</dimen>
+ <dimen name="car_lockscreen_user_grid_view_padding_start">10dp</dimen>
+ <dimen name="car_lockscreen_user_grid_view_padding_end">10dp</dimen>
+ <dimen name="car_lockscreen_user_grid_view_padding_top">128dp</dimen>
+ <dimen name="car_fullscreen_user_pod_image_avatar_width">128dp</dimen>
+ <dimen name="car_fullscreen_user_pod_image_avatar_height">128dp</dimen>
+ <dimen name="car_fullscreen_user_pod_text_size">24sp</dimen>
+</resources>
diff --git a/packages/SystemUI/res/values/strings_car.xml b/packages/SystemUI/res/values/strings_car.xml
new file mode 100644
index 0000000..882773a
--- /dev/null
+++ b/packages/SystemUI/res/values/strings_car.xml
@@ -0,0 +1,29 @@
+<?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>
+ <string name="car_lockscreen_disclaimer_title">Drive safely</string>
+ <string name="car_lockscreen_disclaimer_text">
+ Stay fully aware of driving conditions and always obey applicable laws. Directions may be
+ inaccurate, incomplete, dangerous, not suitable, prohibited, or involve crossing
+ administrative areas. Business information may also be inaccurate or incomplete. Data is
+ not real-time, and location accuracy cannot be guaranteed. Do not handle your mobile device
+ or use apps not intended for Android Auto while driving.
+ </string>
+
+</resources>
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/UserGridView.java b/packages/SystemUI/src/com/android/systemui/statusbar/UserGridView.java
index 32caf9f..2f8bc2d 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/UserGridView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/UserGridView.java
@@ -137,7 +137,7 @@
if (convertView == null) {
LayoutInflater inflater = (LayoutInflater)getContext().getSystemService
(Context.LAYOUT_INFLATER_SERVICE);
- convertView = inflater.inflate(R.layout.fullscreen_user_pod, null);
+ convertView = inflater.inflate(R.layout.car_fullscreen_user_pod, null);
}
UserSwitcherController.UserRecord record = getItem(position);