From 97ff85838e21c18fbfc2e509bcc92049716ab97c Mon Sep 17 00:00:00 2001 From: Rakesh Iyer Date: Mon, 22 May 2017 17:47:52 -0700 Subject: [PATCH] Best effort dismissal of the login screen. This change adds in two mechanisms to dismiss the login screen that shows up on boot. The first is a countdown timer and the second is a start driving button. Both of them behave in the same way that once the timer runs out or if the button is clicked, the system will automatically try to select a user and get the system running. Right now the implementation of selecting a user is a bit trivial, it just tries to drop the keyguard on the currently running user. Bug: 36454400 Test: 1. Booted mojave, watched progress bar make progress and automatically log in user. 2. Booted mojave, clicked the start driving button and watch the keyguard dismiss itself. Change-Id: If22f4c3c7e21aadf2951b9c0cd8b97a4b474b349 --- .../res/drawable/car_progress_bar.xml | 30 +++++++++++ .../res/drawable/car_round_button.xml | 21 ++++++++ .../layout/car_fullscreen_user_switcher.xml | 17 ++++++ packages/SystemUI/res/values/colors_car.xml | 24 +++++++++ packages/SystemUI/res/values/dimens_car.xml | 9 +++- packages/SystemUI/res/values/integers_car.xml | 22 ++++++++ packages/SystemUI/res/values/strings_car.xml | 1 + packages/SystemUI/res/values/styles_car.xml | 34 ++++++++++++ .../statusbar/car/FullscreenUserSwitcher.java | 53 +++++++++++++++++-- .../systemui/statusbar/car/UserGridView.java | 2 +- 10 files changed, 207 insertions(+), 6 deletions(-) create mode 100644 packages/SystemUI/res/drawable/car_progress_bar.xml create mode 100644 packages/SystemUI/res/drawable/car_round_button.xml create mode 100644 packages/SystemUI/res/values/colors_car.xml create mode 100644 packages/SystemUI/res/values/integers_car.xml create mode 100644 packages/SystemUI/res/values/styles_car.xml diff --git a/packages/SystemUI/res/drawable/car_progress_bar.xml b/packages/SystemUI/res/drawable/car_progress_bar.xml new file mode 100644 index 0000000000000..742fca7d19fdf --- /dev/null +++ b/packages/SystemUI/res/drawable/car_progress_bar.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + diff --git a/packages/SystemUI/res/drawable/car_round_button.xml b/packages/SystemUI/res/drawable/car_round_button.xml new file mode 100644 index 0000000000000..5f4deb3e6be30 --- /dev/null +++ b/packages/SystemUI/res/drawable/car_round_button.xml @@ -0,0 +1,21 @@ + + + + + + diff --git a/packages/SystemUI/res/layout/car_fullscreen_user_switcher.xml b/packages/SystemUI/res/layout/car_fullscreen_user_switcher.xml index a66f767d0ce72..e0438369762c9 100644 --- a/packages/SystemUI/res/layout/car_fullscreen_user_switcher.xml +++ b/packages/SystemUI/res/layout/car_fullscreen_user_switcher.xml @@ -20,6 +20,14 @@ android:layout_height="match_parent" android:visibility="gone"> + + + +