From 4d5343ea3a4ffdb45c3af2af552a96fe60e21fef Mon Sep 17 00:00:00 2001 From: Rakesh Iyer Date: Thu, 14 Jan 2016 13:37:15 -0800 Subject: Commandeer full screen user switcher for auto. The full screen user switcher wasn't needed by the original author so adapt it for the auto use case because it fits really well. This change adds in some legal text (TBR - legal) and tweaks the layout a bit. Bug: 26559008 Change-Id: Ib78d0ec8a8d4ec8411dbbffe5852c5307c2cf42f --- .../res/layout/car_fullscreen_user_pod.xml | 38 ++++++++++++++++ .../res/layout/car_fullscreen_user_switcher.xml | 51 ++++++++++++++++++++++ .../SystemUI/res/layout/fullscreen_user_pod.xml | 38 ---------------- .../res/layout/fullscreen_user_switcher.xml | 36 --------------- .../res/layout/keyguard_user_switcher_item.xml | 2 +- packages/SystemUI/res/layout/super_status_bar.xml | 2 +- packages/SystemUI/res/values/dimens_car.xml | 32 ++++++++++++++ packages/SystemUI/res/values/strings_car.xml | 29 ++++++++++++ .../android/systemui/statusbar/UserGridView.java | 2 +- 9 files changed, 153 insertions(+), 77 deletions(-) create mode 100644 packages/SystemUI/res/layout/car_fullscreen_user_pod.xml create mode 100644 packages/SystemUI/res/layout/car_fullscreen_user_switcher.xml delete mode 100644 packages/SystemUI/res/layout/fullscreen_user_pod.xml delete mode 100644 packages/SystemUI/res/layout/fullscreen_user_switcher.xml create mode 100644 packages/SystemUI/res/values/dimens_car.xml create mode 100644 packages/SystemUI/res/values/strings_car.xml diff --git a/packages/SystemUI/res/layout/car_fullscreen_user_pod.xml b/packages/SystemUI/res/layout/car_fullscreen_user_pod.xml new file mode 100644 index 000000000000..b7e666fbfbf9 --- /dev/null +++ b/packages/SystemUI/res/layout/car_fullscreen_user_pod.xml @@ -0,0 +1,38 @@ + + + + + + + + + + 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 000000000000..b953ff2c976a --- /dev/null +++ b/packages/SystemUI/res/layout/car_fullscreen_user_switcher.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + diff --git a/packages/SystemUI/res/layout/fullscreen_user_pod.xml b/packages/SystemUI/res/layout/fullscreen_user_pod.xml deleted file mode 100644 index 12f0a80e62c7..000000000000 --- a/packages/SystemUI/res/layout/fullscreen_user_pod.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - 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 46c18963cec1..000000000000 --- a/packages/SystemUI/res/layout/fullscreen_user_switcher.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - diff --git a/packages/SystemUI/res/layout/keyguard_user_switcher_item.xml b/packages/SystemUI/res/layout/keyguard_user_switcher_item.xml index 2e673761995f..c6e453a5d991 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" /> - \ No newline at end of file + diff --git a/packages/SystemUI/res/layout/super_status_bar.xml b/packages/SystemUI/res/layout/super_status_bar.xml index 39da8d02a855..4c80b4843231 100644 --- a/packages/SystemUI/res/layout/super_status_bar.xml +++ b/packages/SystemUI/res/layout/super_status_bar.xml @@ -80,7 +80,7 @@ diff --git a/packages/SystemUI/res/values/dimens_car.xml b/packages/SystemUI/res/values/dimens_car.xml new file mode 100644 index 000000000000..ecdccee003ee --- /dev/null +++ b/packages/SystemUI/res/values/dimens_car.xml @@ -0,0 +1,32 @@ + + + + 48sp + 96dp + 96dp + 28sp + 96dp + 96dp + 32dp + 10dp + 10dp + 128dp + 128dp + 128dp + 24sp + diff --git a/packages/SystemUI/res/values/strings_car.xml b/packages/SystemUI/res/values/strings_car.xml new file mode 100644 index 000000000000..882773a01bff --- /dev/null +++ b/packages/SystemUI/res/values/strings_car.xml @@ -0,0 +1,29 @@ + + + + Drive safely + + 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. + + + diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/UserGridView.java b/packages/SystemUI/src/com/android/systemui/statusbar/UserGridView.java index 32caf9f0ecf7..2f8bc2d4cb0f 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 @@ public class UserGridView extends GridView { 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); -- cgit v1.2.3-59-g8ed1b