From 18f99d91349a4f5ce55e22ed33f1f57eb1b0297b Mon Sep 17 00:00:00 2001 From: Jason Monk Date: Thu, 11 Sep 2014 13:36:42 -0400 Subject: [PATCH] Material design for screen pinning cling Switching from a dialog to a cling-like view to be more material. Also moving it into SysUI as it highlights the buttons in nav bar. This will be triggered directly from recents, but from apps it will be triggered by the PhoneStatusBar. In the case that apps trigger the request, there will be a 'no thanks' button so that users can refuse. Bug: 16957435 Change-Id: Ie880f82c66f4b2be98283ed3fa789703c4bd7ed5 --- core/res/res/layout/lock_to_app_checkbox.xml | 36 --- core/res/res/values/strings.xml | 10 - core/res/res/values/symbols.xml | 7 - .../res/drawable/screen_pinning_bg_circ.xml | 28 ++ .../drawable/screen_pinning_light_bg_circ.xml | 28 ++ .../res/layout/screen_pinning_request.xml | 42 +++ .../layout/screen_pinning_request_buttons.xml | 143 +++++++++ .../screen_pinning_request_buttons_land.xml | 135 +++++++++ .../screen_pinning_request_land_phone.xml | 35 +++ .../screen_pinning_request_text_area.xml | 80 +++++ .../SystemUI/res/values-sw400dp/dimens.xml | 8 + .../res/values-sw600dp-land/dimens.xml | 11 + .../SystemUI/res/values-sw600dp/dimens.xml | 11 + packages/SystemUI/res/values/colors.xml | 6 + packages/SystemUI/res/values/dimens.xml | 25 ++ packages/SystemUI/res/values/internal.xml | 1 + packages/SystemUI/res/values/strings.xml | 12 + .../systemui/recent/ScreenPinningRequest.java | 282 ++++++++++++++++++ .../systemui/recents/RecentsActivity.java | 15 + .../recents/misc/SystemServicesProxy.java | 11 - .../systemui/recents/views/RecentsView.java | 6 +- .../statusbar/phone/PhoneStatusBar.java | 17 +- .../server/am/LockToAppRequestDialog.java | 141 --------- 23 files changed, 882 insertions(+), 208 deletions(-) delete mode 100644 core/res/res/layout/lock_to_app_checkbox.xml create mode 100644 packages/SystemUI/res/drawable/screen_pinning_bg_circ.xml create mode 100644 packages/SystemUI/res/drawable/screen_pinning_light_bg_circ.xml create mode 100644 packages/SystemUI/res/layout/screen_pinning_request.xml create mode 100644 packages/SystemUI/res/layout/screen_pinning_request_buttons.xml create mode 100644 packages/SystemUI/res/layout/screen_pinning_request_buttons_land.xml create mode 100644 packages/SystemUI/res/layout/screen_pinning_request_land_phone.xml create mode 100644 packages/SystemUI/res/layout/screen_pinning_request_text_area.xml create mode 100644 packages/SystemUI/src/com/android/systemui/recent/ScreenPinningRequest.java delete mode 100644 services/core/java/com/android/server/am/LockToAppRequestDialog.java diff --git a/core/res/res/layout/lock_to_app_checkbox.xml b/core/res/res/layout/lock_to_app_checkbox.xml deleted file mode 100644 index 890507b850e74..0000000000000 --- a/core/res/res/layout/lock_to_app_checkbox.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml index c5bd495fbd83b..becf5960110f4 100644 --- a/core/res/res/values/strings.xml +++ b/core/res/res/values/strings.xml @@ -4853,16 +4853,6 @@ To unpin this screen, touch and hold Overview. Screen is pinned. Unpinning isn\'t allowed by your organization. - - Use screen pinning? - - Screen pinning locks the display in a single view.\n\nTo unpin, touch and hold Back and Overview at the same time. - - Screen pinning locks the display in a single view.\n\nTo unpin, touch and hold Overview. - - NO, THANKS - - START Screen pinned diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml index 6e881a7104699..7e32a079d61fa 100644 --- a/core/res/res/values/symbols.xml +++ b/core/res/res/values/symbols.xml @@ -667,13 +667,6 @@ - - - - - - - diff --git a/packages/SystemUI/res/drawable/screen_pinning_bg_circ.xml b/packages/SystemUI/res/drawable/screen_pinning_bg_circ.xml new file mode 100644 index 0000000000000..354b8bd7607b6 --- /dev/null +++ b/packages/SystemUI/res/drawable/screen_pinning_bg_circ.xml @@ -0,0 +1,28 @@ + + + + + + + + + diff --git a/packages/SystemUI/res/drawable/screen_pinning_light_bg_circ.xml b/packages/SystemUI/res/drawable/screen_pinning_light_bg_circ.xml new file mode 100644 index 0000000000000..9e83057041d0c --- /dev/null +++ b/packages/SystemUI/res/drawable/screen_pinning_light_bg_circ.xml @@ -0,0 +1,28 @@ + + + + + + + + + diff --git a/packages/SystemUI/res/layout/screen_pinning_request.xml b/packages/SystemUI/res/layout/screen_pinning_request.xml new file mode 100644 index 0000000000000..fea45cc099cf2 --- /dev/null +++ b/packages/SystemUI/res/layout/screen_pinning_request.xml @@ -0,0 +1,42 @@ + + + + + + + + + + + diff --git a/packages/SystemUI/res/layout/screen_pinning_request_buttons.xml b/packages/SystemUI/res/layout/screen_pinning_request_buttons.xml new file mode 100644 index 0000000000000..224a0a0fd8591 --- /dev/null +++ b/packages/SystemUI/res/layout/screen_pinning_request_buttons.xml @@ -0,0 +1,143 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/SystemUI/res/layout/screen_pinning_request_buttons_land.xml b/packages/SystemUI/res/layout/screen_pinning_request_buttons_land.xml new file mode 100644 index 0000000000000..1e5193ff99259 --- /dev/null +++ b/packages/SystemUI/res/layout/screen_pinning_request_buttons_land.xml @@ -0,0 +1,135 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/SystemUI/res/layout/screen_pinning_request_land_phone.xml b/packages/SystemUI/res/layout/screen_pinning_request_land_phone.xml new file mode 100644 index 0000000000000..e6c22d477886b --- /dev/null +++ b/packages/SystemUI/res/layout/screen_pinning_request_land_phone.xml @@ -0,0 +1,35 @@ + + + + + + + + + diff --git a/packages/SystemUI/res/layout/screen_pinning_request_text_area.xml b/packages/SystemUI/res/layout/screen_pinning_request_text_area.xml new file mode 100644 index 0000000000000..df957f42145db --- /dev/null +++ b/packages/SystemUI/res/layout/screen_pinning_request_text_area.xml @@ -0,0 +1,80 @@ + + + + + + + + +