diff options
Diffstat (limited to 'packages/Keyguard')
149 files changed, 3022 insertions, 671 deletions
diff --git a/packages/Keyguard/Android.mk b/packages/Keyguard/Android.mk new file mode 100644 index 0000000..f8827f6 --- /dev/null +++ b/packages/Keyguard/Android.mk @@ -0,0 +1,24 @@ +# Copyright (C) 2010 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. +# + +LOCAL_PATH:= $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := $(call all-subdir-java-files) $(call all-subdir-Iaidl-files) + +LOCAL_PACKAGE_NAME := Keyguard +LOCAL_CERTIFICATE := platform + +include $(BUILD_PACKAGE) diff --git a/packages/Keyguard/AndroidManifest.xml b/packages/Keyguard/AndroidManifest.xml new file mode 100644 index 0000000..0741882 --- /dev/null +++ b/packages/Keyguard/AndroidManifest.xml @@ -0,0 +1,61 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +** Copyright 2013, 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. +*/ +--> +<manifest xmlns:android="http://schemas.android.com/apk/res/android" + package="com.android.keyguard" + android:sharedUserId="android.uid.systemui" + coreApp="true"> + <uses-sdk android:minSdkVersion="10" android:targetSdkVersion="17"/> + <uses-permission android:name="android.permission.VIBRATE" /> + <uses-permission android:name="android.permission.MODIFY_PHONE_STATE" /> + <uses-permission android:name="android.permission.GET_ACCOUNTS" /> + <uses-permission android:name="android.permission.MANAGE_ACCOUNTS" /> + <uses-permission android:name="android.permission.INTERACT_ACROSS_USERS_FULL" /> + <uses-permission android:name="android.permission.WAKE_LOCK" /> + <uses-permission android:name="android.permission.STATUS_BAR" /> + <uses-permission android:name="android.permission.DEVICE_POWER" /> + <uses-permission android:name="android.permission.MANAGE_USERS" /> + <uses-permission android:name="android.permission.MANAGE_APP_TOKENS" /> + <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> + <uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS" /> + <uses-permission android:name="android.permission.BIND_APPWIDGET" /> + <uses-permission android:name="android.permission.INTERNAL_SYSTEM_WINDOW" /> + <uses-permission android:name="android.permission.BIND_DEVICE_ADMIN" /> + <uses-permission android:name="android.permission.CHANGE_COMPONENT_ENABLED_STATE" /> + + <application android:label="@string/app_name" android:icon="@drawable/app_icon" + android:process="com.android.systemui.keyguard" + android:persistent="true" > + + <service android:name=".KeyguardService" + android:exported="true" /> + + <activity android:name=".KeyguardTestActivity" + android:label="@string/app_name" + android:theme="@android:style/Theme.Holo" + android:hardwareAccelerated="true" + android:process="com.android.keyguard.keyguard_test" + > + <intent-filter> + <action android:name="android.intent.action.MAIN" /> + <category android:name="android.intent.category.LAUNCHER" /> + </intent-filter> + </activity> + + </application> +</manifest> diff --git a/packages/Keyguard/NOTICE b/packages/Keyguard/NOTICE new file mode 100644 index 0000000..33ff961 --- /dev/null +++ b/packages/Keyguard/NOTICE @@ -0,0 +1,190 @@ + + Copyright (c) 2005-2012, 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. + + 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. + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + diff --git a/packages/Keyguard/res/anim/keyguard_security_fade_in.xml b/packages/Keyguard/res/anim/keyguard_security_fade_in.xml index 6293432..c66c604 100644 --- a/packages/Keyguard/res/anim/keyguard_security_fade_in.xml +++ b/packages/Keyguard/res/anim/keyguard_security_fade_in.xml @@ -17,6 +17,6 @@ <alpha xmlns:android="http://schemas.android.com/apk/res/android" android:interpolator="@android:interpolator/decelerate_quad" android:fromAlpha="0.0" android:toAlpha="1.0" - android:duration="@*android:integer/kg_security_fade_duration" /> + android:duration="@integer/kg_security_fade_duration" /> diff --git a/packages/Keyguard/res/anim/keyguard_security_fade_out.xml b/packages/Keyguard/res/anim/keyguard_security_fade_out.xml index 4ab0229..6465b35 100644 --- a/packages/Keyguard/res/anim/keyguard_security_fade_out.xml +++ b/packages/Keyguard/res/anim/keyguard_security_fade_out.xml @@ -17,5 +17,5 @@ android:interpolator="@android:interpolator/accelerate_quad" android:fromAlpha="1.0" android:toAlpha="0.0" - android:duration="@*android:integer/kg_security_fade_duration" + android:duration="@integer/kg_security_fade_duration" /> diff --git a/packages/Keyguard/res/anim/lock_screen_enter.xml b/packages/Keyguard/res/anim/lock_screen_enter.xml index 3a6c5b6..4344cf9 100644 --- a/packages/Keyguard/res/anim/lock_screen_enter.xml +++ b/packages/Keyguard/res/anim/lock_screen_enter.xml @@ -18,7 +18,7 @@ --> <set xmlns:android="http://schemas.android.com/apk/res/android" - android:interpolator="@interpolator/accelerate_cubic"> + android:interpolator="@android:interpolator/accelerate_cubic"> <alpha android:fromAlpha="0.0" android:toAlpha="1.0" - android:duration="@android:integer/config_activityDefaultDur" /> + android:duration="@integer/config_activityDefaultDur" /> </set> diff --git a/packages/Keyguard/res/anim/lock_screen_exit.xml b/packages/Keyguard/res/anim/lock_screen_exit.xml index 37383d9..c75b3cc 100644 --- a/packages/Keyguard/res/anim/lock_screen_exit.xml +++ b/packages/Keyguard/res/anim/lock_screen_exit.xml @@ -26,11 +26,11 @@ android:fromYScale="1.0" android:toYScale="1.10" android:pivotX="50%p" android:pivotY="50%p" android:fillEnabled="true" android:fillAfter="true" - android:interpolator="@interpolator/accelerate_quint" + android:interpolator="@android:interpolator/accelerate_quint" android:duration="@android:integer/config_shortAnimTime" /> <alpha android:fromAlpha="1.0" android:toAlpha="0" android:fillEnabled="true" android:fillAfter="true" - android:interpolator="@interpolator/accelerate_quad" + android:interpolator="@android:interpolator/accelerate_quad" android:duration="@android:integer/config_shortAnimTime"/> -</set>
\ No newline at end of file +</set> diff --git a/packages/Keyguard/res/anim/lock_screen_wallpaper_behind_enter.xml b/packages/Keyguard/res/anim/lock_screen_wallpaper_behind_enter.xml deleted file mode 100644 index c29fd1a..0000000 --- a/packages/Keyguard/res/anim/lock_screen_wallpaper_behind_enter.xml +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- -/* -** Copyright 2007, 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. -*/ ---> - -<set xmlns:android="http://schemas.android.com/apk/res/android" - android:detachWallpaper="true" android:shareInterpolator="false"> - <alpha - android:fromAlpha="0.0" android:toAlpha="1.0" - android:fillEnabled="true" android:fillBefore="true" - android:interpolator="@interpolator/decelerate_quad" - android:startOffset="@android:integer/config_shortAnimTime" - android:duration="@android:integer/config_shortAnimTime"/> -</set> diff --git a/packages/Keyguard/res/drawable-hdpi/ic_media_next.png b/packages/Keyguard/res/drawable-hdpi/ic_media_next.png Binary files differnew file mode 100644 index 0000000..6e27b81 --- /dev/null +++ b/packages/Keyguard/res/drawable-hdpi/ic_media_next.png diff --git a/packages/Keyguard/res/drawable-hdpi/ic_media_play.png b/packages/Keyguard/res/drawable-hdpi/ic_media_play.png Binary files differnew file mode 100644 index 0000000..2746d17 --- /dev/null +++ b/packages/Keyguard/res/drawable-hdpi/ic_media_play.png diff --git a/packages/Keyguard/res/drawable-hdpi/ic_media_previous.png b/packages/Keyguard/res/drawable-hdpi/ic_media_previous.png Binary files differnew file mode 100644 index 0000000..85b3766 --- /dev/null +++ b/packages/Keyguard/res/drawable-hdpi/ic_media_previous.png diff --git a/packages/Keyguard/res/drawable-hdpi/kg_add_widget.png b/packages/Keyguard/res/drawable-hdpi/kg_add_widget.png Binary files differindex 68971a5..7456705 100644 --- a/packages/Keyguard/res/drawable-hdpi/kg_add_widget.png +++ b/packages/Keyguard/res/drawable-hdpi/kg_add_widget.png diff --git a/packages/Keyguard/res/drawable-hdpi/kg_security_lock_focused.png b/packages/Keyguard/res/drawable-hdpi/kg_security_lock_focused.png Binary files differindex abcf683..9a82799 100644 --- a/packages/Keyguard/res/drawable-hdpi/kg_security_lock_focused.png +++ b/packages/Keyguard/res/drawable-hdpi/kg_security_lock_focused.png diff --git a/packages/Keyguard/res/drawable-hdpi/kg_security_lock_normal.png b/packages/Keyguard/res/drawable-hdpi/kg_security_lock_normal.png Binary files differindex e8cff24..d608707 100644 --- a/packages/Keyguard/res/drawable-hdpi/kg_security_lock_normal.png +++ b/packages/Keyguard/res/drawable-hdpi/kg_security_lock_normal.png diff --git a/packages/Keyguard/res/drawable-hdpi/kg_security_lock_pressed.png b/packages/Keyguard/res/drawable-hdpi/kg_security_lock_pressed.png Binary files differindex 3214dcb..7ca995d 100644 --- a/packages/Keyguard/res/drawable-hdpi/kg_security_lock_pressed.png +++ b/packages/Keyguard/res/drawable-hdpi/kg_security_lock_pressed.png diff --git a/packages/Keyguard/res/drawable-ldpi/ic_media_next.png b/packages/Keyguard/res/drawable-ldpi/ic_media_next.png Binary files differnew file mode 100644 index 0000000..99927fd --- /dev/null +++ b/packages/Keyguard/res/drawable-ldpi/ic_media_next.png diff --git a/packages/Keyguard/res/drawable-ldpi/ic_media_play.png b/packages/Keyguard/res/drawable-ldpi/ic_media_play.png Binary files differnew file mode 100644 index 0000000..e7c1972 --- /dev/null +++ b/packages/Keyguard/res/drawable-ldpi/ic_media_play.png diff --git a/packages/Keyguard/res/drawable-ldpi/ic_media_previous.png b/packages/Keyguard/res/drawable-ldpi/ic_media_previous.png Binary files differnew file mode 100644 index 0000000..df04322 --- /dev/null +++ b/packages/Keyguard/res/drawable-ldpi/ic_media_previous.png diff --git a/packages/Keyguard/res/drawable-mdpi/ic_media_next.png b/packages/Keyguard/res/drawable-mdpi/ic_media_next.png Binary files differnew file mode 100644 index 0000000..fcd73d9 --- /dev/null +++ b/packages/Keyguard/res/drawable-mdpi/ic_media_next.png diff --git a/packages/Keyguard/res/drawable-mdpi/ic_media_play.png b/packages/Keyguard/res/drawable-mdpi/ic_media_play.png Binary files differnew file mode 100644 index 0000000..7966bbc --- /dev/null +++ b/packages/Keyguard/res/drawable-mdpi/ic_media_play.png diff --git a/packages/Keyguard/res/drawable-mdpi/ic_media_previous.png b/packages/Keyguard/res/drawable-mdpi/ic_media_previous.png Binary files differnew file mode 100644 index 0000000..b653d05 --- /dev/null +++ b/packages/Keyguard/res/drawable-mdpi/ic_media_previous.png diff --git a/packages/Keyguard/res/drawable-mdpi/kg_add_widget.png b/packages/Keyguard/res/drawable-mdpi/kg_add_widget.png Binary files differindex 136ae17..1cab0d9 100644 --- a/packages/Keyguard/res/drawable-mdpi/kg_add_widget.png +++ b/packages/Keyguard/res/drawable-mdpi/kg_add_widget.png diff --git a/packages/Keyguard/res/drawable-mdpi/kg_security_lock_focused.png b/packages/Keyguard/res/drawable-mdpi/kg_security_lock_focused.png Binary files differindex c567a82..c3608f9 100644 --- a/packages/Keyguard/res/drawable-mdpi/kg_security_lock_focused.png +++ b/packages/Keyguard/res/drawable-mdpi/kg_security_lock_focused.png diff --git a/packages/Keyguard/res/drawable-mdpi/kg_security_lock_normal.png b/packages/Keyguard/res/drawable-mdpi/kg_security_lock_normal.png Binary files differindex 6fbecc1..7957c79 100644 --- a/packages/Keyguard/res/drawable-mdpi/kg_security_lock_normal.png +++ b/packages/Keyguard/res/drawable-mdpi/kg_security_lock_normal.png diff --git a/packages/Keyguard/res/drawable-mdpi/kg_security_lock_pressed.png b/packages/Keyguard/res/drawable-mdpi/kg_security_lock_pressed.png Binary files differindex a883258..41715f5 100644 --- a/packages/Keyguard/res/drawable-mdpi/kg_security_lock_pressed.png +++ b/packages/Keyguard/res/drawable-mdpi/kg_security_lock_pressed.png diff --git a/packages/Keyguard/res/drawable-nodpi/app_icon.png b/packages/Keyguard/res/drawable-nodpi/app_icon.png Binary files differnew file mode 100644 index 0000000..ea31bd8 --- /dev/null +++ b/packages/Keyguard/res/drawable-nodpi/app_icon.png diff --git a/packages/Keyguard/res/drawable-xhdpi/ic_media_next.png b/packages/Keyguard/res/drawable-xhdpi/ic_media_next.png Binary files differnew file mode 100644 index 0000000..4def965 --- /dev/null +++ b/packages/Keyguard/res/drawable-xhdpi/ic_media_next.png diff --git a/packages/Keyguard/res/drawable-xhdpi/ic_media_play.png b/packages/Keyguard/res/drawable-xhdpi/ic_media_play.png Binary files differnew file mode 100644 index 0000000..ccfef18 --- /dev/null +++ b/packages/Keyguard/res/drawable-xhdpi/ic_media_play.png diff --git a/packages/Keyguard/res/drawable-xhdpi/ic_media_previous.png b/packages/Keyguard/res/drawable-xhdpi/ic_media_previous.png Binary files differnew file mode 100644 index 0000000..c4472ae --- /dev/null +++ b/packages/Keyguard/res/drawable-xhdpi/ic_media_previous.png diff --git a/packages/Keyguard/res/drawable-xhdpi/kg_add_widget.png b/packages/Keyguard/res/drawable-xhdpi/kg_add_widget.png Binary files differindex ca48be2..d71905f 100644 --- a/packages/Keyguard/res/drawable-xhdpi/kg_add_widget.png +++ b/packages/Keyguard/res/drawable-xhdpi/kg_add_widget.png diff --git a/packages/Keyguard/res/drawable-xhdpi/kg_security_lock_focused.png b/packages/Keyguard/res/drawable-xhdpi/kg_security_lock_focused.png Binary files differindex ee21647..db22016 100644 --- a/packages/Keyguard/res/drawable-xhdpi/kg_security_lock_focused.png +++ b/packages/Keyguard/res/drawable-xhdpi/kg_security_lock_focused.png diff --git a/packages/Keyguard/res/drawable-xhdpi/kg_security_lock_normal.png b/packages/Keyguard/res/drawable-xhdpi/kg_security_lock_normal.png Binary files differindex eae7d8c..17ebb5f 100644 --- a/packages/Keyguard/res/drawable-xhdpi/kg_security_lock_normal.png +++ b/packages/Keyguard/res/drawable-xhdpi/kg_security_lock_normal.png diff --git a/packages/Keyguard/res/drawable-xhdpi/kg_security_lock_pressed.png b/packages/Keyguard/res/drawable-xhdpi/kg_security_lock_pressed.png Binary files differindex 5e9a52b..186b6ff 100644 --- a/packages/Keyguard/res/drawable-xhdpi/kg_security_lock_pressed.png +++ b/packages/Keyguard/res/drawable-xhdpi/kg_security_lock_pressed.png diff --git a/packages/Keyguard/res/drawable/lockscreen_password_field_dark.xml b/packages/Keyguard/res/drawable/lockscreen_password_field_dark.xml deleted file mode 100644 index 92ceb79..0000000 --- a/packages/Keyguard/res/drawable/lockscreen_password_field_dark.xml +++ /dev/null @@ -1,26 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- Copyright (C) 2010 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. ---> - -<selector xmlns:android="http://schemas.android.com/apk/res/android"> - <item android:state_window_focused="false" android:state_enabled="true" android:drawable="@drawable/textfield_bg_default_holo_dark" /> - <item android:state_window_focused="false" android:state_enabled="false" android:drawable="@drawable/textfield_bg_disabled_holo_dark" /> - <item android:state_enabled="true" android:state_focused="true" android:drawable="@drawable/textfield_bg_activated_holo_dark" /> - <iten android:state_enabled="true" android:state_activated="true" android:drawable="@drawable/textfield_bg_focused_holo_dark" /> - <item android:state_enabled="true" android:drawable="@drawable/textfield_bg_default_holo_dark" /> - <item android:state_focused="true" android:drawable="@drawable/textfield_bg_disabled_focused_holo_dark" /> - <item android:drawable="@drawable/textfield_bg_disabled_holo_dark" /> -</selector> - diff --git a/packages/Keyguard/res/layout-land/keyguard_host_view.xml b/packages/Keyguard/res/layout-land/keyguard_host_view.xml index 6b36235..eeb9ee7 100644 --- a/packages/Keyguard/res/layout-land/keyguard_host_view.xml +++ b/packages/Keyguard/res/layout-land/keyguard_host_view.xml @@ -19,18 +19,19 @@ <!-- This is the host view that generally contains two sub views: the widget view and the security view. --> -<com.android.internal.policy.impl.keyguard.KeyguardHostView +<com.android.keyguard.KeyguardHostView xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:androidprv="http://schemas.android.com/apk/res/android" + xmlns:androidprv="http://schemas.android.com/apk/res/com.android.keyguard" android:id="@+id/keyguard_host_view" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="horizontal"> - <com.android.internal.policy.impl.keyguard.MultiPaneChallengeLayout + <com.android.keyguard.MultiPaneChallengeLayout android:id="@+id/multi_pane_challenge" android:layout_width="match_parent" android:layout_height="match_parent" + android:orientation="horizontal" android:clipChildren="false"> <include layout="@layout/keyguard_widget_remove_drop_target" @@ -55,13 +56,13 @@ androidprv:layout_childType="scrim" android:background="#99000000" /> - <com.android.internal.policy.impl.keyguard.KeyguardSecurityContainer + <com.android.keyguard.KeyguardSecurityContainer android:id="@+id/keyguard_security_container" android:layout_width="wrap_content" android:layout_height="wrap_content" androidprv:layout_childType="challenge" androidprv:layout_centerWithinArea="0.55"> - <com.android.internal.policy.impl.keyguard.KeyguardSecurityViewFlipper + <com.android.keyguard.KeyguardSecurityViewFlipper android:id="@+id/view_flipper" android:layout_width="match_parent" android:layout_height="match_parent" @@ -72,9 +73,9 @@ android:paddingRight="@dimen/keyguard_security_view_margin" android:paddingBottom="@dimen/keyguard_security_view_margin" android:gravity="center"> - </com.android.internal.policy.impl.keyguard.KeyguardSecurityViewFlipper> - </com.android.internal.policy.impl.keyguard.KeyguardSecurityContainer> + </com.android.keyguard.KeyguardSecurityViewFlipper> + </com.android.keyguard.KeyguardSecurityContainer> - </com.android.internal.policy.impl.keyguard.MultiPaneChallengeLayout> -</com.android.internal.policy.impl.keyguard.KeyguardHostView> + </com.android.keyguard.MultiPaneChallengeLayout> +</com.android.keyguard.KeyguardHostView> diff --git a/packages/Keyguard/res/layout-land/keyguard_widget_pager.xml b/packages/Keyguard/res/layout-land/keyguard_widget_pager.xml index 02c6d0e..da31065 100644 --- a/packages/Keyguard/res/layout-land/keyguard_widget_pager.xml +++ b/packages/Keyguard/res/layout-land/keyguard_widget_pager.xml @@ -18,8 +18,8 @@ --> <!-- This is the selector widget that allows the user to select an action. --> -<com.android.internal.policy.impl.keyguard.KeyguardWidgetCarousel - xmlns:androidprv="http://schemas.android.com/apk/res/android" +<com.android.keyguard.KeyguardWidgetCarousel + xmlns:androidprv="http://schemas.android.com/apk/res/com.android.keyguard" xmlns:android="http://schemas.android.com/apk/res/android" android:paddingLeft="25dp" android:paddingRight="25dp" @@ -27,4 +27,4 @@ android:paddingBottom="25dp" android:clipToPadding="false" androidprv:pageSpacing="10dp"> -</com.android.internal.policy.impl.keyguard.KeyguardWidgetCarousel>
\ No newline at end of file +</com.android.keyguard.KeyguardWidgetCarousel> diff --git a/packages/Keyguard/res/layout-port/keyguard_host_view.xml b/packages/Keyguard/res/layout-port/keyguard_host_view.xml index fb25f9c..8498dcf 100644 --- a/packages/Keyguard/res/layout-port/keyguard_host_view.xml +++ b/packages/Keyguard/res/layout-port/keyguard_host_view.xml @@ -19,16 +19,16 @@ <!-- This is the host view that generally contains two sub views: the widget view and the security view. --> -<com.android.internal.policy.impl.keyguard.KeyguardHostView +<com.android.keyguard.KeyguardHostView xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:androidprv="http://schemas.android.com/apk/res/android" + xmlns:androidprv="http://schemas.android.com/apk/res/com.android.keyguard" android:id="@+id/keyguard_host_view" android:layout_width="match_parent" android:layout_height="match_parent" android:gravity="center_horizontal" android:orientation="vertical"> - <com.android.internal.policy.impl.keyguard.SlidingChallengeLayout + <com.android.keyguard.SlidingChallengeLayout android:id="@+id/sliding_layout" android:layout_width="match_parent" android:layout_height="match_parent"> @@ -60,15 +60,15 @@ androidprv:layout_childType="scrim" android:background="#99000000" /> - <com.android.internal.policy.impl.keyguard.KeyguardSecurityContainer + <com.android.keyguard.KeyguardSecurityContainer android:id="@+id/keyguard_security_container" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_maxHeight="@dimen/keyguard_security_height" + androidprv:layout_maxHeight="@dimen/keyguard_security_height" androidprv:layout_childType="challenge" android:padding="0dp" android:gravity="bottom|center_horizontal"> - <com.android.internal.policy.impl.keyguard.KeyguardSecurityViewFlipper + <com.android.keyguard.KeyguardSecurityViewFlipper android:id="@+id/view_flipper" android:layout_width="match_parent" android:layout_height="match_parent" @@ -76,8 +76,8 @@ android:clipToPadding="false" android:paddingTop="@dimen/keyguard_security_view_margin" android:gravity="center"> - </com.android.internal.policy.impl.keyguard.KeyguardSecurityViewFlipper> - </com.android.internal.policy.impl.keyguard.KeyguardSecurityContainer> + </com.android.keyguard.KeyguardSecurityViewFlipper> + </com.android.keyguard.KeyguardSecurityContainer> <ImageButton android:layout_width="match_parent" @@ -89,6 +89,6 @@ android:scaleType="center" android:contentDescription="@string/keyguard_accessibility_expand_lock_area" /> - </com.android.internal.policy.impl.keyguard.SlidingChallengeLayout> -</com.android.internal.policy.impl.keyguard.KeyguardHostView> + </com.android.keyguard.SlidingChallengeLayout> +</com.android.keyguard.KeyguardHostView> diff --git a/packages/Keyguard/res/layout-port/keyguard_widget_pager.xml b/packages/Keyguard/res/layout-port/keyguard_widget_pager.xml index 7f22709..d0a07ca 100644 --- a/packages/Keyguard/res/layout-port/keyguard_widget_pager.xml +++ b/packages/Keyguard/res/layout-port/keyguard_widget_pager.xml @@ -18,8 +18,8 @@ --> <!-- This is the selector widget that allows the user to select an action. --> -<com.android.internal.policy.impl.keyguard.KeyguardWidgetPager - xmlns:androidprv="http://schemas.android.com/apk/res/android" +<com.android.keyguard.KeyguardWidgetPager + xmlns:androidprv="http://schemas.android.com/apk/res/com.android.keyguard" xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/app_widget_container" android:paddingLeft="25dp" @@ -28,4 +28,4 @@ android:paddingBottom="@dimen/kg_widget_pager_bottom_padding" android:clipToPadding="false" androidprv:pageSpacing="10dp"> -</com.android.internal.policy.impl.keyguard.KeyguardWidgetPager> +</com.android.keyguard.KeyguardWidgetPager> diff --git a/packages/Keyguard/res/layout-sw600dp-port/keyguard_host_view.xml b/packages/Keyguard/res/layout-sw600dp-port/keyguard_host_view.xml index e3d577d..77bc9b5 100644 --- a/packages/Keyguard/res/layout-sw600dp-port/keyguard_host_view.xml +++ b/packages/Keyguard/res/layout-sw600dp-port/keyguard_host_view.xml @@ -19,15 +19,15 @@ <!-- This is the host view that generally contains two sub views: the widget view and the security view. --> -<com.android.internal.policy.impl.keyguard.KeyguardHostView +<com.android.keyguard.KeyguardHostView xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:androidprv="http://schemas.android.com/apk/res/android" + xmlns:androidprv="http://schemas.android.com/apk/res/com.android.keyguard" android:id="@+id/keyguard_host_view" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="horizontal"> - <com.android.internal.policy.impl.keyguard.MultiPaneChallengeLayout + <com.android.keyguard.MultiPaneChallengeLayout android:id="@+id/multi_pane_challenge" android:layout_width="match_parent" android:layout_height="match_parent" @@ -57,14 +57,14 @@ androidprv:layout_childType="scrim" android:background="#99000000" /> - <com.android.internal.policy.impl.keyguard.KeyguardSecurityContainer + <com.android.keyguard.KeyguardSecurityContainer android:id="@+id/keyguard_security_container" android:layout_width="wrap_content" android:layout_height="wrap_content" androidprv:layout_centerWithinArea="0.5" androidprv:layout_childType="challenge" android:layout_gravity="center_horizontal|bottom"> - <com.android.internal.policy.impl.keyguard.KeyguardSecurityViewFlipper + <com.android.keyguard.KeyguardSecurityViewFlipper android:id="@+id/view_flipper" android:layout_width="wrap_content" android:layout_height="wrap_content" @@ -75,8 +75,8 @@ android:paddingRight="@dimen/keyguard_security_view_margin" android:paddingBottom="@dimen/keyguard_security_view_margin" android:gravity="center"> - </com.android.internal.policy.impl.keyguard.KeyguardSecurityViewFlipper> - </com.android.internal.policy.impl.keyguard.KeyguardSecurityContainer> + </com.android.keyguard.KeyguardSecurityViewFlipper> + </com.android.keyguard.KeyguardSecurityContainer> - </com.android.internal.policy.impl.keyguard.MultiPaneChallengeLayout> -</com.android.internal.policy.impl.keyguard.KeyguardHostView> + </com.android.keyguard.MultiPaneChallengeLayout> +</com.android.keyguard.KeyguardHostView> diff --git a/packages/Keyguard/res/layout-sw600dp-port/keyguard_status_area.xml b/packages/Keyguard/res/layout-sw600dp-port/keyguard_status_area.xml deleted file mode 100644 index 88dd760..0000000 --- a/packages/Keyguard/res/layout-sw600dp-port/keyguard_status_area.xml +++ /dev/null @@ -1,56 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- -** -** Copyright 2009, 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. -*/ ---> - -<!-- This is a view that shows general status information in Keyguard. --> -<LinearLayout - xmlns:android="http://schemas.android.com/apk/res/android" - android:id="@+id/keyguard_status_area" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_gravity="end" - android:layout_marginTop="-16dp" - android:orientation="vertical"> - - <TextView - android:id="@+id/date" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_gravity="end" - android:layout_marginEnd="@dimen/kg_status_line_font_right_margin" - android:singleLine="true" - android:ellipsize="marquee" - android:textAppearance="?android:attr/textAppearanceMedium" - android:textSize="@dimen/kg_status_date_font_size" - /> - - <TextView - android:id="@+id/alarm_status" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_gravity="end" - android:layout_marginTop="28dp" - android:layout_marginEnd="@dimen/kg_status_line_font_right_margin" - android:singleLine="true" - android:ellipsize="marquee" - android:textAppearance="?android:attr/textAppearance" - android:textSize="@dimen/kg_status_line_font_size" - android:drawablePadding="4dip" - /> - -</LinearLayout> diff --git a/packages/Keyguard/res/layout-sw600dp/keyguard_transport_control.xml b/packages/Keyguard/res/layout-sw600dp/keyguard_transport_control.xml deleted file mode 100644 index f864339..0000000 --- a/packages/Keyguard/res/layout-sw600dp/keyguard_transport_control.xml +++ /dev/null @@ -1,111 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- Copyright (C) 2011 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. ---> - -<!-- *** Note *** This should mirror the file in layout/ with the exception of the background set - here for adding a drop shadow on tablets. --> - -<com.android.internal.widget.TransportControlView - xmlns:android="http://schemas.android.com/apk/res/android" - android:id="@+id/transport_controls" - android:background="@drawable/transportcontrol_bg"> - - <!-- FrameLayout used as scrim to show between album art and buttons --> - <FrameLayout - android:layout_width="match_parent" - android:layout_height="match_parent" - android:foreground="@drawable/ic_lockscreen_player_background"> - <!-- We use ImageView for its cropping features, otherwise could be android:background --> - <ImageView - android:id="@+id/albumart" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:layout_gravity="fill" - android:scaleType="centerCrop" - android:adjustViewBounds="false" - /> - </FrameLayout> - - <LinearLayout - android:orientation="vertical" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_gravity="bottom"> - <TextView - android:id="@+id/title" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_marginTop="8dip" - android:layout_marginStart="16dip" - android:layout_marginEnd="16dip" - android:gravity="center_horizontal" - android:singleLine="true" - android:ellipsize="end" - android:textAppearance="?android:attr/textAppearanceMedium" - /> - <LinearLayout - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:orientation="horizontal" - android:layout_marginTop="5dip"> - <FrameLayout - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_weight="1"> - <ImageView - android:id="@+id/btn_prev" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_gravity="center" - android:src="@drawable/ic_media_previous" - android:clickable="true" - android:background="?android:attr/selectableItemBackground" - android:padding="10dip" - android:contentDescription="@string/lockscreen_transport_prev_description"/> - </FrameLayout> - <FrameLayout - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_weight="1"> - <ImageView - android:id="@+id/btn_play" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_gravity="center" - android:clickable="true" - android:src="@drawable/ic_media_play" - android:background="?android:attr/selectableItemBackground" - android:padding="10dip" - android:contentDescription="@string/lockscreen_transport_play_description"/> - </FrameLayout> - <FrameLayout - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_weight="1"> - <ImageView - android:id="@+id/btn_next" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_gravity="center" - android:clickable="true" - android:src="@drawable/ic_media_next" - android:background="?android:attr/selectableItemBackground" - android:padding="10dip" - android:contentDescription="@string/lockscreen_transport_next_description"/> - </FrameLayout> - </LinearLayout> - </LinearLayout> - -</com.android.internal.widget.TransportControlView> diff --git a/packages/Keyguard/res/layout/keyguard_account_view.xml b/packages/Keyguard/res/layout/keyguard_account_view.xml index fa36371..766effa 100644 --- a/packages/Keyguard/res/layout/keyguard_account_view.xml +++ b/packages/Keyguard/res/layout/keyguard_account_view.xml @@ -16,13 +16,14 @@ ** limitations under the License. */ --> -<com.android.internal.policy.impl.keyguard.KeyguardAccountView +<com.android.keyguard.KeyguardAccountView xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:androidprv="http://schemas.android.com/apk/res/com.android.keyguard" android:id="@+id/keyguard_account_view" android:layout_width="match_parent" android:layout_height="match_parent" - android:layout_maxWidth="@dimen/keyguard_security_width" - android:layout_maxHeight="@dimen/keyguard_security_height" + androidprv:layout_maxWidth="@dimen/keyguard_security_width" + androidprv:layout_maxHeight="@dimen/keyguard_security_height" android:orientation="vertical"> <include layout="@layout/keyguard_message_area" @@ -84,4 +85,4 @@ android:gravity="center_horizontal" /> --> -</com.android.internal.policy.impl.keyguard.KeyguardAccountView> +</com.android.keyguard.KeyguardAccountView> diff --git a/packages/Keyguard/res/layout/keyguard_add_widget.xml b/packages/Keyguard/res/layout/keyguard_add_widget.xml index d043fdb..01b616c 100644 --- a/packages/Keyguard/res/layout/keyguard_add_widget.xml +++ b/packages/Keyguard/res/layout/keyguard_add_widget.xml @@ -18,7 +18,7 @@ --> <!-- This is a view that shows general status information in Keyguard. --> -<com.android.internal.policy.impl.keyguard.KeyguardWidgetFrame +<com.android.keyguard.KeyguardWidgetFrame xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/keyguard_add_widget" android:layout_width="match_parent" @@ -39,4 +39,4 @@ android:src="@drawable/keyguard_add_widget_button" android:contentDescription="@string/keyguard_accessibility_add_widget"/> </FrameLayout> -</com.android.internal.policy.impl.keyguard.KeyguardWidgetFrame> +</com.android.keyguard.KeyguardWidgetFrame> diff --git a/packages/Keyguard/res/layout/keyguard_emergency_carrier_area.xml b/packages/Keyguard/res/layout/keyguard_emergency_carrier_area.xml index 52adc04..1e2de92 100644 --- a/packages/Keyguard/res/layout/keyguard_emergency_carrier_area.xml +++ b/packages/Keyguard/res/layout/keyguard_emergency_carrier_area.xml @@ -28,7 +28,7 @@ android:layout_alignParentBottom="true" android:clickable="true"> - <com.android.internal.policy.impl.keyguard.CarrierText + <com.android.keyguard.CarrierText android:layout_width="wrap_content" android:layout_height="wrap_content" android:singleLine="true" @@ -46,12 +46,12 @@ android:gravity="center" android:weightSum="2"> - <com.android.internal.policy.impl.keyguard.EmergencyButton + <com.android.keyguard.EmergencyButton android:id="@+id/emergency_call_button" android:layout_width="0dip" android:layout_height="wrap_content" android:layout_weight="1" - android:drawableLeft="@*android:drawable/lockscreen_emergency_button" + android:drawableLeft="@drawable/lockscreen_emergency_button" android:text="@string/kg_emergency_call_label" style="?android:attr/buttonBarButtonStyle" android:textAppearance="?android:attr/textAppearanceMedium" @@ -63,7 +63,7 @@ android:layout_width="0dip" android:layout_height="wrap_content" android:layout_weight="1" - android:drawableLeft="@*android:drawable/lockscreen_forgot_password_button" + android:drawableLeft="@drawable/lockscreen_forgot_password_button" style="?android:attr/buttonBarButtonStyle" android:textSize="@dimen/kg_status_line_font_size" android:textColor="?android:attr/textColorSecondary" diff --git a/packages/Keyguard/res/layout/keyguard_face_unlock_view.xml b/packages/Keyguard/res/layout/keyguard_face_unlock_view.xml index c9f1176..94c68a5 100644 --- a/packages/Keyguard/res/layout/keyguard_face_unlock_view.xml +++ b/packages/Keyguard/res/layout/keyguard_face_unlock_view.xml @@ -18,14 +18,15 @@ --> <!-- This is the screen that allows the user to unlock by showing their face. --> -<com.android.internal.policy.impl.keyguard.KeyguardFaceUnlockView +<com.android.keyguard.KeyguardFaceUnlockView xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:androidprv="http://schemas.android.com/apk/res/com.android.keyguard" android:id="@+id/keyguard_face_unlock_view" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" - android:layout_maxWidth="@dimen/keyguard_security_width" - android:layout_maxHeight="@dimen/keyguard_security_height" + androidprv:layout_maxWidth="@dimen/keyguard_security_width" + androidprv:layout_maxHeight="@dimen/keyguard_security_height" android:contentDescription="@string/keyguard_accessibility_face_unlock"> <include layout="@layout/keyguard_message_area" @@ -35,7 +36,7 @@ <FrameLayout android:id="@+id/keyguard_bouncer_frame" - android:background="@*android:drawable/kg_bouncer_bg_white" + android:background="@drawable/kg_bouncer_bg_white" android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1" @@ -45,14 +46,14 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:layout_gravity="center_horizontal" - android:background="@*android:drawable/intro_bg" + android:background="@drawable/intro_bg" android:gravity="center"> <View android:id="@+id/spotlightMask" android:layout_width="match_parent" android:layout_height="match_parent" - android:background="@*android:color/facelock_spotlight_mask" + android:background="@color/facelock_spotlight_mask" /> <ImageButton @@ -63,7 +64,7 @@ android:layout_alignParentTop="true" android:layout_alignParentEnd="true" android:background="#00000000" - android:src="@*android:drawable/ic_facial_backup" + android:src="@drawable/ic_facial_backup" /> </com.android.internal.widget.FaceUnlockView> </FrameLayout> @@ -75,4 +76,4 @@ android:orientation="vertical" android:layout_gravity="bottom|center_horizontal" android:gravity="center_horizontal" /> -</com.android.internal.policy.impl.keyguard.KeyguardFaceUnlockView> +</com.android.keyguard.KeyguardFaceUnlockView> diff --git a/packages/Keyguard/res/layout/keyguard_glow_pad_container.xml b/packages/Keyguard/res/layout/keyguard_glow_pad_container.xml index d86707f..376d0e9 100644 --- a/packages/Keyguard/res/layout/keyguard_glow_pad_container.xml +++ b/packages/Keyguard/res/layout/keyguard_glow_pad_container.xml @@ -22,5 +22,5 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="bottom|center_horizontal" - android:layout_marginBottom="-60dp"/> + android:layout_marginBottom="-80dp"/> </merge>
\ No newline at end of file diff --git a/packages/Keyguard/res/layout/keyguard_glow_pad_view.xml b/packages/Keyguard/res/layout/keyguard_glow_pad_view.xml index cfd8160..3a466dd 100644 --- a/packages/Keyguard/res/layout/keyguard_glow_pad_view.xml +++ b/packages/Keyguard/res/layout/keyguard_glow_pad_view.xml @@ -31,16 +31,16 @@ prvandroid:targetDrawables="@array/lockscreen_targets_unlock_only" prvandroid:targetDescriptions="@array/lockscreen_target_descriptions_unlock_only" - prvandroid:directionDescriptions="@*android:array/lockscreen_direction_descriptions" - prvandroid:handleDrawable="@*android:drawable/ic_lockscreen_handle" - prvandroid:outerRingDrawable="@*android:drawable/ic_lockscreen_outerring" - prvandroid:outerRadius="@*android:dimen/glowpadview_target_placement_radius" - prvandroid:innerRadius="@*android:dimen/glowpadview_inner_radius" - prvandroid:snapMargin="@*android:dimen/glowpadview_snap_margin" + prvandroid:directionDescriptions="@array/lockscreen_direction_descriptions" + prvandroid:handleDrawable="@drawable/ic_lockscreen_handle" + prvandroid:outerRingDrawable="@drawable/ic_lockscreen_outerring" + prvandroid:outerRadius="@dimen/glowpadview_target_placement_radius" + prvandroid:innerRadius="@dimen/glowpadview_inner_radius" + prvandroid:snapMargin="@dimen/glowpadview_snap_margin" prvandroid:firstItemOffset="@integer/kg_glowpad_rotation_offset" prvandroid:magneticTargets="true" prvandroid:feedbackCount="1" prvandroid:vibrationDuration="20" - prvandroid:glowRadius="@*android:dimen/glowpadview_glow_radius" - prvandroid:pointDrawable="@*android:drawable/ic_lockscreen_glowdot" + prvandroid:glowRadius="@dimen/glowpadview_glow_radius" + prvandroid:pointDrawable="@drawable/ic_lockscreen_glowdot" prvandroid:allowScaling="true" /> diff --git a/packages/Keyguard/res/layout/keyguard_message_area.xml b/packages/Keyguard/res/layout/keyguard_message_area.xml index 37463cf..a709e98 100644 --- a/packages/Keyguard/res/layout/keyguard_message_area.xml +++ b/packages/Keyguard/res/layout/keyguard_message_area.xml @@ -18,7 +18,7 @@ --> <!-- This contains emergency call button and carrier as shared by pin/pattern/password screens --> -<com.android.internal.policy.impl.keyguard.KeyguardMessageArea +<com.android.keyguard.KeyguardMessageArea xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" diff --git a/packages/Keyguard/res/layout/keyguard_message_area_large.xml b/packages/Keyguard/res/layout/keyguard_message_area_large.xml index 584cec4..ab6246d 100644 --- a/packages/Keyguard/res/layout/keyguard_message_area_large.xml +++ b/packages/Keyguard/res/layout/keyguard_message_area_large.xml @@ -18,7 +18,7 @@ --> <!-- This contains emergency call button and carrier as shared by pin/pattern/password screens --> -<com.android.internal.policy.impl.keyguard.KeyguardMessageArea +<com.android.keyguard.KeyguardMessageArea xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" diff --git a/packages/Keyguard/res/layout/keyguard_multi_user_avatar.xml b/packages/Keyguard/res/layout/keyguard_multi_user_avatar.xml index 2d8f02d..41b0be9 100644 --- a/packages/Keyguard/res/layout/keyguard_multi_user_avatar.xml +++ b/packages/Keyguard/res/layout/keyguard_multi_user_avatar.xml @@ -18,7 +18,7 @@ --> <!-- This is a view that shows general status information in Keyguard. --> -<com.android.internal.policy.impl.keyguard.KeyguardMultiUserAvatar +<com.android.keyguard.KeyguardMultiUserAvatar xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="@dimen/keyguard_avatar_size" android:layout_height="@dimen/keyguard_avatar_size" @@ -42,4 +42,4 @@ android:ellipsize="end" android:paddingLeft="2dp" android:paddingRight="2dp" /> -</com.android.internal.policy.impl.keyguard.KeyguardMultiUserAvatar> +</com.android.keyguard.KeyguardMultiUserAvatar> diff --git a/packages/Keyguard/res/layout/keyguard_multi_user_selector.xml b/packages/Keyguard/res/layout/keyguard_multi_user_selector.xml index ee01285..c1d5326 100644 --- a/packages/Keyguard/res/layout/keyguard_multi_user_selector.xml +++ b/packages/Keyguard/res/layout/keyguard_multi_user_selector.xml @@ -16,8 +16,8 @@ ** limitations under the License. */ --> -<com.android.internal.policy.impl.keyguard.KeyguardMultiUserSelectorView - xmlns:androidprv="http://schemas.android.com/apk/res/android" +<com.android.keyguard.KeyguardMultiUserSelectorView + xmlns:androidprv="http://schemas.android.com/apk/res/com.android.keyguard" xmlns:android="http://schemas.android.com/apk/res/android" androidprv:layout_childType="userSwitcher" android:id="@+id/keyguard_user_selector" @@ -25,10 +25,10 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="bottom" - android:contentDescription="@*android:string/keyguard_accessibility_user_selector" + android:contentDescription="@string/keyguard_accessibility_user_selector" android:visibility="gone"> - <com.android.internal.policy.impl.keyguard.KeyguardLinearLayout + <com.android.keyguard.KeyguardLinearLayout android:id="@+id/keyguard_users_grid" android:orientation="horizontal" android:layout_width="wrap_content" @@ -36,4 +36,4 @@ android:layout_height="@dimen/keyguard_avatar_size" android:layout_gravity="center|bottom" /> -</com.android.internal.policy.impl.keyguard.KeyguardMultiUserSelectorView> +</com.android.keyguard.KeyguardMultiUserSelectorView> diff --git a/packages/Keyguard/res/layout/keyguard_password_view.xml b/packages/Keyguard/res/layout/keyguard_password_view.xml index aab54c3..d8012bf 100644 --- a/packages/Keyguard/res/layout/keyguard_password_view.xml +++ b/packages/Keyguard/res/layout/keyguard_password_view.xml @@ -16,14 +16,15 @@ ** limitations under the License. */ --> -<com.android.internal.policy.impl.keyguard.KeyguardPasswordView +<com.android.keyguard.KeyguardPasswordView xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:androidprv="http://schemas.android.com/apk/res/com.android.keyguard" android:id="@+id/keyguard_password_view" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" - android:layout_maxWidth="@dimen/keyguard_security_width" - android:layout_maxHeight="@dimen/keyguard_security_height" + androidprv:layout_maxWidth="@dimen/keyguard_security_width" + androidprv:layout_maxHeight="@dimen/keyguard_security_height" android:gravity="bottom" android:contentDescription="@string/keyguard_accessibility_password_unlock" > @@ -43,7 +44,7 @@ since the backspace/IME switcher looks better inside --> <FrameLayout android:id="@+id/keyguard_bouncer_frame" - android:background="@*android:drawable/kg_bouncer_bg_white" + android:background="@drawable/kg_bouncer_bg_white" android:layout_height="wrap_content" android:layout_width="match_parent" > @@ -62,7 +63,7 @@ android:layout_weight="1" android:gravity="center_horizontal" android:layout_gravity="center_vertical" - android:layout_marginStart="@*android:dimen/keyguard_lockscreen_pin_margin_left" + android:layout_marginStart="@dimen/keyguard_lockscreen_pin_margin_left" android:singleLine="true" android:textStyle="normal" android:inputType="textPassword" @@ -76,7 +77,7 @@ <ImageView android:id="@+id/switch_ime_button" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:src="@*android:drawable/ic_lockscreen_ime" + android:src="@drawable/ic_lockscreen_ime" android:clickable="true" android:padding="8dip" android:layout_gravity="center" @@ -101,4 +102,4 @@ android:layout_gravity="bottom|center_horizontal" android:gravity="center_horizontal" /> -</com.android.internal.policy.impl.keyguard.KeyguardPasswordView> +</com.android.keyguard.KeyguardPasswordView> diff --git a/packages/Keyguard/res/layout/keyguard_pattern_view.xml b/packages/Keyguard/res/layout/keyguard_pattern_view.xml index 1bd3e4e..0c9380c 100644 --- a/packages/Keyguard/res/layout/keyguard_pattern_view.xml +++ b/packages/Keyguard/res/layout/keyguard_pattern_view.xml @@ -20,14 +20,15 @@ <!-- This is the screen that shows the 9 circle unlock widget and instructs the user how to unlock their device, or make an emergency call. This is the portrait layout. --> -<com.android.internal.policy.impl.keyguard.KeyguardPatternView +<com.android.keyguard.KeyguardPatternView xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:androidprv="http://schemas.android.com/apk/res/com.android.keyguard" android:id="@+id/keyguard_pattern_view" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" - android:layout_maxWidth="@dimen/keyguard_security_width" - android:layout_maxHeight="@dimen/keyguard_security_height" + androidprv:layout_maxWidth="@dimen/keyguard_security_width" + androidprv:layout_maxHeight="@dimen/keyguard_security_height" android:gravity="center_horizontal" android:contentDescription="@string/keyguard_accessibility_pattern_unlock"> @@ -48,7 +49,7 @@ <FrameLayout android:id="@+id/keyguard_bouncer_frame" - android:background="@*android:drawable/kg_bouncer_bg_white" + android:background="@drawable/kg_bouncer_bg_white" android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1" @@ -75,4 +76,4 @@ </LinearLayout> </FrameLayout> -</com.android.internal.policy.impl.keyguard.KeyguardPatternView> +</com.android.keyguard.KeyguardPatternView> diff --git a/packages/Keyguard/res/layout/keyguard_pin_view.xml b/packages/Keyguard/res/layout/keyguard_pin_view.xml index 6a3b9e6..00c6a21 100644 --- a/packages/Keyguard/res/layout/keyguard_pin_view.xml +++ b/packages/Keyguard/res/layout/keyguard_pin_view.xml @@ -17,14 +17,14 @@ */ --> -<com.android.internal.policy.impl.keyguard.KeyguardPINView +<com.android.keyguard.KeyguardPINView xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:androidprv="http://schemas.android.com/apk/res/android" + xmlns:androidprv="http://schemas.android.com/apk/res/com.android.keyguard" android:id="@+id/keyguard_pin_view" android:layout_width="match_parent" android:layout_height="match_parent" - android:layout_maxWidth="@dimen/keyguard_security_width" - android:layout_maxHeight="@dimen/keyguard_security_height" + androidprv:layout_maxWidth="@dimen/keyguard_security_width" + androidprv:layout_maxHeight="@dimen/keyguard_security_height" android:orientation="vertical" android:contentDescription="@string/keyguard_accessibility_pin_unlock" > @@ -34,7 +34,7 @@ /> <LinearLayout android:id="@+id/keyguard_bouncer_frame" - android:background="@*android:drawable/kg_bouncer_bg_white" + android:background="@drawable/kg_bouncer_bg_white" android:layout_width="match_parent" android:layout_height="0dp" android:orientation="vertical" @@ -53,7 +53,7 @@ android:layout_height="match_parent" android:layout_weight="1" android:gravity="center" - android:layout_marginStart="@*android:dimen/keyguard_lockscreen_pin_margin_left" + android:layout_marginStart="@dimen/keyguard_lockscreen_pin_margin_left" android:singleLine="true" android:cursorVisible="false" android:background="@null" @@ -64,7 +64,7 @@ android:layout_width="wrap_content" android:layout_height="match_parent" android:gravity="center_vertical" - android:src="@*android:drawable/ic_input_delete" + android:src="@drawable/ic_input_delete" android:clickable="true" android:paddingTop="8dip" android:paddingBottom="8dip" @@ -85,7 +85,7 @@ android:layout_weight="1" android:orientation="horizontal" > - <view class="com.android.internal.policy.impl.keyguard.NumPadKey" + <view class="com.android.keyguard.NumPadKey" android:id="@+id/key1" style="@style/Widget.Button.NumPadKey" android:layout_width="0px" @@ -94,7 +94,7 @@ androidprv:textView="@+id/pinEntry" androidprv:digit="1" /> - <view class="com.android.internal.policy.impl.keyguard.NumPadKey" + <view class="com.android.keyguard.NumPadKey" android:id="@+id/key2" style="@style/Widget.Button.NumPadKey" android:layout_width="0px" @@ -103,7 +103,7 @@ androidprv:textView="@+id/pinEntry" androidprv:digit="2" /> - <view class="com.android.internal.policy.impl.keyguard.NumPadKey" + <view class="com.android.keyguard.NumPadKey" android:id="@+id/key3" style="@style/Widget.Button.NumPadKey" android:layout_width="0px" @@ -119,7 +119,7 @@ android:layout_weight="1" android:orientation="horizontal" > - <view class="com.android.internal.policy.impl.keyguard.NumPadKey" + <view class="com.android.keyguard.NumPadKey" android:id="@+id/key4" style="@style/Widget.Button.NumPadKey" android:layout_width="0px" @@ -128,7 +128,7 @@ androidprv:textView="@+id/pinEntry" androidprv:digit="4" /> - <view class="com.android.internal.policy.impl.keyguard.NumPadKey" + <view class="com.android.keyguard.NumPadKey" android:id="@+id/key5" style="@style/Widget.Button.NumPadKey" android:layout_width="0px" @@ -137,7 +137,7 @@ androidprv:textView="@+id/pinEntry" androidprv:digit="5" /> - <view class="com.android.internal.policy.impl.keyguard.NumPadKey" + <view class="com.android.keyguard.NumPadKey" android:id="@+id/key6" style="@style/Widget.Button.NumPadKey" android:layout_width="0px" @@ -153,7 +153,7 @@ android:orientation="horizontal" android:layout_weight="1" > - <view class="com.android.internal.policy.impl.keyguard.NumPadKey" + <view class="com.android.keyguard.NumPadKey" android:id="@+id/key7" style="@style/Widget.Button.NumPadKey" android:layout_width="0px" @@ -162,7 +162,7 @@ androidprv:textView="@+id/pinEntry" androidprv:digit="7" /> - <view class="com.android.internal.policy.impl.keyguard.NumPadKey" + <view class="com.android.keyguard.NumPadKey" android:id="@+id/key8" style="@style/Widget.Button.NumPadKey" android:layout_width="0px" @@ -171,7 +171,7 @@ androidprv:textView="@+id/pinEntry" androidprv:digit="8" /> - <view class="com.android.internal.policy.impl.keyguard.NumPadKey" + <view class="com.android.keyguard.NumPadKey" android:id="@+id/key9" style="@style/Widget.Button.NumPadKey" android:layout_width="0px" @@ -192,7 +192,7 @@ android:layout_height="match_parent" android:layout_weight="1" /> - <view class="com.android.internal.policy.impl.keyguard.NumPadKey" + <view class="com.android.keyguard.NumPadKey" android:id="@+id/key0" style="@style/Widget.Button.NumPadKey" android:layout_width="0px" @@ -221,4 +221,4 @@ android:layout_gravity="bottom|center_horizontal" android:gravity="center_horizontal" /> -</com.android.internal.policy.impl.keyguard.KeyguardPINView> +</com.android.keyguard.KeyguardPINView> diff --git a/packages/Keyguard/res/layout/keyguard_selector_view.xml b/packages/Keyguard/res/layout/keyguard_selector_view.xml index dfacb6a..6cb5e67 100644 --- a/packages/Keyguard/res/layout/keyguard_selector_view.xml +++ b/packages/Keyguard/res/layout/keyguard_selector_view.xml @@ -18,14 +18,14 @@ --> <!-- This is the selector widget that allows the user to select an action. --> -<com.android.internal.policy.impl.keyguard.KeyguardSelectorView - xmlns:prvandroid="http://schemas.android.com/apk/prv/res/android" +<com.android.keyguard.KeyguardSelectorView xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:androidprv="http://schemas.android.com/apk/res/com.android.keyguard" android:id="@+id/keyguard_selector_view" android:layout_width="match_parent" android:layout_height="match_parent" - android:layout_maxWidth="420dp" - android:layout_maxHeight="@dimen/keyguard_security_height" + androidprv:layout_maxWidth="420dp" + androidprv:layout_maxHeight="@dimen/keyguard_security_height" android:clipChildren="false" android:clipToPadding="false" android:orientation="vertical" @@ -49,7 +49,7 @@ android:layout_height="match_parent" android:layout_marginLeft="16dp" android:layout_marginRight="16dp" - android:background="@*android:drawable/kg_bouncer_bg_white"/> + android:background="@drawable/kg_bouncer_bg_white"/> <include layout="@layout/keyguard_glow_pad_container" /> @@ -60,5 +60,5 @@ android:layout_gravity="bottom|center_horizontal" /> </FrameLayout> -</com.android.internal.policy.impl.keyguard.KeyguardSelectorView> +</com.android.keyguard.KeyguardSelectorView> diff --git a/packages/Keyguard/res/layout/keyguard_sim_pin_view.xml b/packages/Keyguard/res/layout/keyguard_sim_pin_view.xml index 6e6fe08..eccac19 100644 --- a/packages/Keyguard/res/layout/keyguard_sim_pin_view.xml +++ b/packages/Keyguard/res/layout/keyguard_sim_pin_view.xml @@ -17,15 +17,15 @@ */ --> <!-- This is the SIM PIN view that allows the user to enter a SIM PIN to unlock the device. --> -<com.android.internal.policy.impl.keyguard.KeyguardSimPinView +<com.android.keyguard.KeyguardSimPinView xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:androidprv="http://schemas.android.com/apk/res/android" + xmlns:androidprv="http://schemas.android.com/apk/res/com.android.keyguard" android:id="@+id/keyguard_sim_pin_view" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" - android:layout_maxWidth="@dimen/keyguard_security_width" - android:layout_maxHeight="@dimen/keyguard_security_height" + androidprv:layout_maxWidth="@dimen/keyguard_security_width" + androidprv:layout_maxHeight="@dimen/keyguard_security_height" android:gravity="center_horizontal"> <ImageView @@ -39,7 +39,7 @@ /> <LinearLayout android:id="@+id/keyguard_bouncer_frame" - android:background="@*android:drawable/kg_bouncer_bg_white" + android:background="@drawable/kg_bouncer_bg_white" android:layout_width="match_parent" android:layout_height="0dp" android:orientation="vertical" @@ -58,7 +58,7 @@ android:layout_height="match_parent" android:layout_weight="1" android:gravity="center" - android:layout_marginStart="@*android:dimen/keyguard_lockscreen_pin_margin_left" + android:layout_marginStart="@dimen/keyguard_lockscreen_pin_margin_left" android:singleLine="true" android:cursorVisible="false" android:background="@null" @@ -69,7 +69,7 @@ android:layout_width="wrap_content" android:layout_height="match_parent" android:gravity="center_vertical" - android:src="@*android:drawable/ic_input_delete" + android:src="@drawable/ic_input_delete" android:clickable="true" android:paddingTop="8dip" android:paddingBottom="8dip" @@ -90,7 +90,7 @@ android:layout_weight="1" android:orientation="horizontal" > - <view class="com.android.internal.policy.impl.keyguard.NumPadKey" + <view class="com.android.keyguard.NumPadKey" android:id="@+id/key1" style="@style/Widget.Button.NumPadKey" android:layout_width="0px" @@ -99,7 +99,7 @@ androidprv:textView="@+id/pinEntry" androidprv:digit="1" /> - <view class="com.android.internal.policy.impl.keyguard.NumPadKey" + <view class="com.android.keyguard.NumPadKey" android:id="@+id/key2" style="@style/Widget.Button.NumPadKey" android:layout_width="0px" @@ -108,7 +108,7 @@ androidprv:textView="@+id/pinEntry" androidprv:digit="2" /> - <view class="com.android.internal.policy.impl.keyguard.NumPadKey" + <view class="com.android.keyguard.NumPadKey" android:id="@+id/key3" style="@style/Widget.Button.NumPadKey" android:layout_width="0px" @@ -124,7 +124,7 @@ android:layout_weight="1" android:orientation="horizontal" > - <view class="com.android.internal.policy.impl.keyguard.NumPadKey" + <view class="com.android.keyguard.NumPadKey" android:id="@+id/key4" style="@style/Widget.Button.NumPadKey" android:layout_width="0px" @@ -133,7 +133,7 @@ androidprv:textView="@+id/pinEntry" androidprv:digit="4" /> - <view class="com.android.internal.policy.impl.keyguard.NumPadKey" + <view class="com.android.keyguard.NumPadKey" android:id="@+id/key5" style="@style/Widget.Button.NumPadKey" android:layout_width="0px" @@ -142,7 +142,7 @@ androidprv:textView="@+id/pinEntry" androidprv:digit="5" /> - <view class="com.android.internal.policy.impl.keyguard.NumPadKey" + <view class="com.android.keyguard.NumPadKey" android:id="@+id/key6" style="@style/Widget.Button.NumPadKey" android:layout_width="0px" @@ -158,7 +158,7 @@ android:orientation="horizontal" android:layout_weight="1" > - <view class="com.android.internal.policy.impl.keyguard.NumPadKey" + <view class="com.android.keyguard.NumPadKey" android:id="@+id/key7" style="@style/Widget.Button.NumPadKey" android:layout_width="0px" @@ -167,7 +167,7 @@ androidprv:textView="@+id/pinEntry" androidprv:digit="7" /> - <view class="com.android.internal.policy.impl.keyguard.NumPadKey" + <view class="com.android.keyguard.NumPadKey" android:id="@+id/key8" style="@style/Widget.Button.NumPadKey" android:layout_width="0px" @@ -176,7 +176,7 @@ androidprv:textView="@+id/pinEntry" androidprv:digit="8" /> - <view class="com.android.internal.policy.impl.keyguard.NumPadKey" + <view class="com.android.keyguard.NumPadKey" android:id="@+id/key9" style="@style/Widget.Button.NumPadKey" android:layout_width="0px" @@ -197,7 +197,7 @@ android:layout_height="match_parent" android:layout_weight="1" /> - <view class="com.android.internal.policy.impl.keyguard.NumPadKey" + <view class="com.android.keyguard.NumPadKey" android:id="@+id/key0" style="@style/Widget.Button.NumPadKey" android:layout_width="0px" @@ -227,4 +227,4 @@ android:layout_gravity="bottom|center_horizontal" android:gravity="center_horizontal" /> -</com.android.internal.policy.impl.keyguard.KeyguardSimPinView> +</com.android.keyguard.KeyguardSimPinView> diff --git a/packages/Keyguard/res/layout/keyguard_sim_puk_view.xml b/packages/Keyguard/res/layout/keyguard_sim_puk_view.xml index 0412fdc..fe37203 100644 --- a/packages/Keyguard/res/layout/keyguard_sim_puk_view.xml +++ b/packages/Keyguard/res/layout/keyguard_sim_puk_view.xml @@ -18,15 +18,15 @@ --> <!-- This is the SIM PUK view that allows the user to recover their device by entering the carrier-provided PUK code and entering a new SIM PIN for it. --> -<com.android.internal.policy.impl.keyguard.KeyguardSimPukView +<com.android.keyguard.KeyguardSimPukView xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:androidprv="http://schemas.android.com/apk/res/android" + xmlns:androidprv="http://schemas.android.com/apk/res/com.android.keyguard" android:id="@+id/keyguard_sim_puk_view" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" - android:layout_maxWidth="@dimen/keyguard_security_width" - android:layout_maxHeight="@dimen/keyguard_security_height" + androidprv:layout_maxWidth="@dimen/keyguard_security_width" + androidprv:layout_maxHeight="@dimen/keyguard_security_height" android:gravity="center_horizontal"> <ImageView @@ -40,7 +40,7 @@ /> <LinearLayout android:id="@+id/keyguard_bouncer_frame" - android:background="@*android:drawable/kg_bouncer_bg_white" + android:background="@drawable/kg_bouncer_bg_white" android:layout_width="match_parent" android:layout_height="0dp" android:orientation="vertical" @@ -59,7 +59,7 @@ android:layout_height="match_parent" android:layout_weight="1" android:gravity="center" - android:layout_marginStart="@*android:dimen/keyguard_lockscreen_pin_margin_left" + android:layout_marginStart="@dimen/keyguard_lockscreen_pin_margin_left" android:singleLine="true" android:cursorVisible="false" android:background="@null" @@ -70,7 +70,7 @@ android:layout_width="wrap_content" android:layout_height="match_parent" android:gravity="center_vertical" - android:src="@*android:drawable/ic_input_delete" + android:src="@drawable/ic_input_delete" android:clickable="true" android:paddingTop="8dip" android:paddingBottom="8dip" @@ -91,7 +91,7 @@ android:layout_weight="1" android:orientation="horizontal" > - <view class="com.android.internal.policy.impl.keyguard.NumPadKey" + <view class="com.android.keyguard.NumPadKey" android:id="@+id/key1" style="@style/Widget.Button.NumPadKey" android:layout_width="0px" @@ -100,7 +100,7 @@ androidprv:textView="@+id/pinEntry" androidprv:digit="1" /> - <view class="com.android.internal.policy.impl.keyguard.NumPadKey" + <view class="com.android.keyguard.NumPadKey" android:id="@+id/key2" style="@style/Widget.Button.NumPadKey" android:layout_width="0px" @@ -109,7 +109,7 @@ androidprv:textView="@+id/pinEntry" androidprv:digit="2" /> - <view class="com.android.internal.policy.impl.keyguard.NumPadKey" + <view class="com.android.keyguard.NumPadKey" android:id="@+id/key3" style="@style/Widget.Button.NumPadKey" android:layout_width="0px" @@ -125,7 +125,7 @@ android:layout_weight="1" android:orientation="horizontal" > - <view class="com.android.internal.policy.impl.keyguard.NumPadKey" + <view class="com.android.keyguard.NumPadKey" android:id="@+id/key4" style="@style/Widget.Button.NumPadKey" android:layout_width="0px" @@ -134,7 +134,7 @@ androidprv:textView="@+id/pinEntry" androidprv:digit="4" /> - <view class="com.android.internal.policy.impl.keyguard.NumPadKey" + <view class="com.android.keyguard.NumPadKey" android:id="@+id/key5" style="@style/Widget.Button.NumPadKey" android:layout_width="0px" @@ -143,7 +143,7 @@ androidprv:textView="@+id/pinEntry" androidprv:digit="5" /> - <view class="com.android.internal.policy.impl.keyguard.NumPadKey" + <view class="com.android.keyguard.NumPadKey" android:id="@+id/key6" style="@style/Widget.Button.NumPadKey" android:layout_width="0px" @@ -159,7 +159,7 @@ android:orientation="horizontal" android:layout_weight="1" > - <view class="com.android.internal.policy.impl.keyguard.NumPadKey" + <view class="com.android.keyguard.NumPadKey" android:id="@+id/key7" style="@style/Widget.Button.NumPadKey" android:layout_width="0px" @@ -168,7 +168,7 @@ androidprv:textView="@+id/pinEntry" androidprv:digit="7" /> - <view class="com.android.internal.policy.impl.keyguard.NumPadKey" + <view class="com.android.keyguard.NumPadKey" android:id="@+id/key8" style="@style/Widget.Button.NumPadKey" android:layout_width="0px" @@ -177,7 +177,7 @@ androidprv:textView="@+id/pinEntry" androidprv:digit="8" /> - <view class="com.android.internal.policy.impl.keyguard.NumPadKey" + <view class="com.android.keyguard.NumPadKey" android:id="@+id/key9" style="@style/Widget.Button.NumPadKey" android:layout_width="0px" @@ -198,7 +198,7 @@ android:layout_height="match_parent" android:layout_weight="1" /> - <view class="com.android.internal.policy.impl.keyguard.NumPadKey" + <view class="com.android.keyguard.NumPadKey" android:id="@+id/key0" style="@style/Widget.Button.NumPadKey" android:layout_width="0px" @@ -227,4 +227,4 @@ android:orientation="vertical" android:layout_gravity="bottom|center_horizontal" android:gravity="center_horizontal" /> -</com.android.internal.policy.impl.keyguard.KeyguardSimPukView> +</com.android.keyguard.KeyguardSimPukView> diff --git a/packages/Keyguard/res/layout/keyguard_status_view.xml b/packages/Keyguard/res/layout/keyguard_status_view.xml index 9e36df3..2304d9f 100644 --- a/packages/Keyguard/res/layout/keyguard_status_view.xml +++ b/packages/Keyguard/res/layout/keyguard_status_view.xml @@ -18,29 +18,30 @@ --> <!-- This is a view that shows general status information in Keyguard. --> -<com.android.internal.policy.impl.keyguard.KeyguardWidgetFrame +<com.android.keyguard.KeyguardWidgetFrame xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:androidprv="http://schemas.android.com/apk/res/com.android.keyguard" android:id="@+id/keyguard_status_view" android:layout_width="match_parent" android:layout_height="match_parent" - android:layout_maxWidth="@dimen/keyguard_security_width" - android:layout_maxHeight="@dimen/keyguard_security_height" + androidprv:layout_maxWidth="@dimen/keyguard_security_width" + androidprv:layout_maxHeight="@dimen/keyguard_security_height" android:gravity="center_horizontal"> - <com.android.internal.policy.impl.keyguard.KeyguardStatusView + <com.android.keyguard.KeyguardStatusView android:id="@+id/keyguard_status_view_face_palm" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" android:gravity="center_horizontal|top" - android:contentDescription="@android:string/keyguard_accessibility_status"> + android:contentDescription="@string/keyguard_accessibility_status"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="center_horizontal|top" android:orientation="vertical" android:focusable="true"> - <com.android.internal.policy.impl.keyguard.ClockView + <com.android.keyguard.ClockView android:id="@+id/clock_view" android:layout_width="wrap_content" android:layout_height="wrap_content" @@ -58,10 +59,10 @@ android:drawablePadding="2dip" /> - </com.android.internal.policy.impl.keyguard.ClockView> + </com.android.keyguard.ClockView> <include layout="@layout/keyguard_status_area" /> </LinearLayout> - </com.android.internal.policy.impl.keyguard.KeyguardStatusView> -</com.android.internal.policy.impl.keyguard.KeyguardWidgetFrame> + </com.android.keyguard.KeyguardStatusView> +</com.android.keyguard.KeyguardWidgetFrame> diff --git a/packages/Keyguard/res/layout/keyguard_test_activity.xml b/packages/Keyguard/res/layout/keyguard_test_activity.xml new file mode 100644 index 0000000..a3b75b0 --- /dev/null +++ b/packages/Keyguard/res/layout/keyguard_test_activity.xml @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +** +** Copyright 2012, 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. +*/ +--> + +<LinearLayout + xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:orientation="vertical" + android:gravity="center"> + + <Button android:id="@+id/do_keyguard" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="@string/do_keyguard" /> + + <Button android:id="@+id/on_screen_turned_off" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="@string/on_screen_turned_off" /> + + <Button android:id="@+id/on_screen_turned_on" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="@string/on_screen_turned_on" /> + + <Button android:id="@+id/verify_unlock" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="@string/verify_unlock" /> + +</LinearLayout> diff --git a/packages/Keyguard/res/layout/keyguard_transport_control_view.xml b/packages/Keyguard/res/layout/keyguard_transport_control_view.xml index 532322c..7e36f9f 100644 --- a/packages/Keyguard/res/layout/keyguard_transport_control_view.xml +++ b/packages/Keyguard/res/layout/keyguard_transport_control_view.xml @@ -15,7 +15,7 @@ --> <!-- This is a view to control music playback in keyguard. --> -<com.android.internal.policy.impl.keyguard.KeyguardTransportControlView +<com.android.keyguard.KeyguardTransportControlView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="wrap_content" @@ -26,8 +26,8 @@ <FrameLayout android:layout_width="match_parent" android:layout_height="match_parent" - android:foreground="@*android:drawable/ic_lockscreen_player_background" - android:contentDescription="@*android:string/keygaurd_accessibility_media_controls"> + android:foreground="@drawable/ic_lockscreen_player_background" + android:contentDescription="@string/keygaurd_accessibility_media_controls"> <!-- Use ImageView for its cropping features; otherwise could be android:background --> <ImageView android:id="@+id/albumart" @@ -70,11 +70,11 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" - android:src="@*android:drawable/ic_media_previous" + android:src="@drawable/ic_media_previous" android:clickable="true" android:background="?android:attr/selectableItemBackground" android:padding="10dip" - android:contentDescription="@*android:string/lockscreen_transport_prev_description"/> + android:contentDescription="@string/keyguard_accessibility_transport_prev_description"/> </FrameLayout> <FrameLayout android:layout_width="wrap_content" @@ -86,10 +86,10 @@ android:layout_height="wrap_content" android:layout_gravity="center" android:clickable="true" - android:src="@*android:drawable/ic_media_play" + android:src="@drawable/ic_media_play" android:background="?android:attr/selectableItemBackground" android:padding="10dip" - android:contentDescription="@*android:string/lockscreen_transport_play_description"/> + android:contentDescription="@string/keyguard_accessibility_transport_play_description"/> </FrameLayout> <FrameLayout android:layout_width="wrap_content" @@ -101,12 +101,12 @@ android:layout_height="wrap_content" android:layout_gravity="center" android:clickable="true" - android:src="@*android:drawable/ic_media_next" + android:src="@drawable/ic_media_next" android:background="?android:attr/selectableItemBackground" android:padding="10dip" - android:contentDescription="@*android:string/lockscreen_transport_next_description"/> + android:contentDescription="@string/keyguard_accessibility_transport_next_description"/> </FrameLayout> </LinearLayout> </LinearLayout> -</com.android.internal.policy.impl.keyguard.KeyguardTransportControlView>
\ No newline at end of file +</com.android.keyguard.KeyguardTransportControlView> diff --git a/packages/Keyguard/res/menu/optionmenu.xml b/packages/Keyguard/res/menu/optionmenu.xml new file mode 100644 index 0000000..22f300d --- /dev/null +++ b/packages/Keyguard/res/menu/optionmenu.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="utf-8"?> +<menu xmlns:android="http://schemas.android.com/apk/res/android"> + <item android:id="@+id/none_menu_item" + android:title="@string/none_menu_item" /> + <item android:id="@+id/pin_menu_item" + android:title="@string/pin_menu_item" /> + <item android:id="@+id/password_menu_item" + android:title="@string/password_menu_item" /> + <item android:id="@+id/pattern_menu_item" + android:title="@string/pattern_menu_item" /> + <item android:id="@+id/sim_pin_menu_item" + android:title="@string/sim_pin_menu_item" /> + <item android:id="@+id/sim_puk_menu_item" + android:title="@string/sim_puk_menu_item" /> + <item android:id="@+id/add_widget_item" + android:title="@string/add_widget_item" /> +</menu> diff --git a/packages/Keyguard/res/values-land/alias.xml b/packages/Keyguard/res/values-land/alias.xml new file mode 100644 index 0000000..7aac5b4 --- /dev/null +++ b/packages/Keyguard/res/values-land/alias.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* //device/apps/common/assets/res/any/colors.xml +** +** Copyright 2012, 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> + <!-- Alias used to reference one of two possible layouts in keyguard. --> + <item type="layout" name="keyguard_eca">@layout/keyguard_emergency_carrier_area_empty</item> +</resources> diff --git a/packages/Keyguard/res/values-land/arrays.xml b/packages/Keyguard/res/values-land/arrays.xml new file mode 100644 index 0000000..240b9e4 --- /dev/null +++ b/packages/Keyguard/res/values-land/arrays.xml @@ -0,0 +1,72 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* //device/apps/common/assets/res/any/colors.xml +** +** Copyright 2006, 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 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + + <!-- Resources for GlowPadView in LockScreen --> + <array name="lockscreen_targets_when_silent"> + <item>@null</item>" + <item>@drawable/ic_action_assist_generic</item> + <item>@drawable/ic_lockscreen_soundon</item> + <item>@drawable/ic_lockscreen_unlock</item> + </array> + + <array name="lockscreen_target_descriptions_when_silent"> + <item>@null</item> + <item>@string/description_target_search</item> + <item>@string/description_target_soundon</item> + <item>@string/description_target_unlock</item> + </array> + + <array name="lockscreen_direction_descriptions"> + <item>@null</item> + <item>@string/description_direction_up</item> + <item>@string/description_direction_left</item> + <item>@string/description_direction_down</item> + </array> + + <array name="lockscreen_targets_when_soundon"> + <item>@null</item> + <item>@drawable/ic_action_assist_generic</item> + <item>@drawable/ic_lockscreen_silent</item> + <item>@drawable/ic_lockscreen_unlock</item> + </array> + + <array name="lockscreen_target_descriptions_when_soundon"> + <item>@null</item> + <item>@string/description_target_search</item> + <item>@string/description_target_silent</item> + <item>@string/description_target_unlock</item> + </array> + + <array name="lockscreen_targets_with_camera"> + <item>@null</item> + <item>@drawable/ic_action_assist_generic</item> + <item>@drawable/ic_lockscreen_camera</item> + <item>@drawable/ic_lockscreen_unlock</item> + </array> + + <array name="lockscreen_target_descriptions_with_camera"> + <item>@null</item> + <item>@string/description_target_search</item> + <item>@string/description_target_camera</item> + <item>@string/description_target_unlock</item> + </array> + +</resources> diff --git a/packages/Keyguard/res/values-land/bools.xml b/packages/Keyguard/res/values-land/bools.xml new file mode 100644 index 0000000..a1dd2e4 --- /dev/null +++ b/packages/Keyguard/res/values-land/bools.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2012 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> + <bool name="kg_enable_camera_default_widget">false</bool> + <bool name="kg_top_align_page_shrink_on_bouncer_visible">true</bool> + <bool name="kg_share_status_area">false</bool> + <bool name="kg_sim_puk_account_full_screen">false</bool> +</resources> diff --git a/packages/Keyguard/res/values-land/dimens.xml b/packages/Keyguard/res/values-land/dimens.xml new file mode 100644 index 0000000..64e043c --- /dev/null +++ b/packages/Keyguard/res/values-land/dimens.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +** +** Copyright 2010, 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> + <!-- Default height of a key in the password keyboard for alpha --> + <dimen name="password_keyboard_key_height_alpha">47dip</dimen> + <!-- Default height of a key in the password keyboard for numeric --> + <dimen name="password_keyboard_key_height_numeric">50dip</dimen> + <!-- Default correction for the space key in the password keyboard --> + <dimen name="password_keyboard_spacebar_vertical_correction">2dip</dimen> + <dimen name="preference_widget_width">72dp</dimen> + + <!-- Size of clock font in LockScreen on Unsecure unlock screen. --> + <dimen name="keyguard_lockscreen_clock_font_size">70sp</dimen> + + <!-- Shift emergency button from the left edge by this amount. Used by landscape layout on + phones --> + <dimen name="kg_emergency_button_shift">30dp</dimen> + + <!-- Space reserved at the bottom of secure views (pin/pattern/password/SIM pin/SIM puk) --> + <dimen name="kg_secure_padding_height">0dp</dimen> + + <!-- Top padding for the widget pager --> + <dimen name="kg_widget_pager_top_padding">0dp</dimen> + + <!-- Bottom padding for the widget pager --> + <dimen name="kg_widget_pager_bottom_padding">0dp</dimen> + + <!-- If the height if keyguard drops below this threshold (most likely + due to the appearance of the IME), then drop the multiuser selector. + Landscape's layout allows this to be smaller than for portrait. --> + <dimen name="kg_squashed_layout_threshold">400dp</dimen> + +</resources> diff --git a/packages/Keyguard/res/values-land/integers.xml b/packages/Keyguard/res/values-land/integers.xml new file mode 100644 index 0000000..020fd23 --- /dev/null +++ b/packages/Keyguard/res/values-land/integers.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +** Copyright 2012, 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> + <!-- Gravity to make KeyguardSelectorView work in multiple orientations + 0x13 == "left|center_vertical" --> + <integer name="kg_selector_gravity">0x13</integer> + <integer name="kg_widget_region_weight">45</integer> + <integer name="kg_security_flipper_weight">55</integer> + <integer name="kg_glowpad_rotation_offset">-90</integer> +</resources> diff --git a/packages/Keyguard/res/values-large/dimens.xml b/packages/Keyguard/res/values-large/dimens.xml new file mode 100644 index 0000000..8cd614d --- /dev/null +++ b/packages/Keyguard/res/values-large/dimens.xml @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +** Copyright 2011, 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> + <!-- Default height of a key in the password keyboard for alpha --> + <dimen name="password_keyboard_key_height_alpha">75dip</dimen> + <!-- Default height of a key in the password keyboard for numeric --> + <dimen name="password_keyboard_key_height_numeric">75dip</dimen> + <!-- keyboardHeight = key_height*4 + key_bottom_gap*3 --> + <dimen name="password_keyboard_height">48.0mm</dimen> + + <!-- Minimum width of the search view text entry area. --> + <dimen name="search_view_text_min_width">192dip</dimen> + + <item type="dimen" name="dialog_min_width_major">55%</item> + <item type="dimen" name="dialog_min_width_minor">80%</item> + + <!-- Preference UI dimensions for larger screens. --> + <dimen name="preference_widget_width">56dp</dimen> +</resources> diff --git a/packages/Keyguard/res/values-port/alias.xml b/packages/Keyguard/res/values-port/alias.xml new file mode 100644 index 0000000..c3ecbb9 --- /dev/null +++ b/packages/Keyguard/res/values-port/alias.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* //device/apps/common/assets/res/any/colors.xml +** +** Copyright 2012, 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> + <!-- Alias used to reference one of two possible layouts in keyguard. --> + <item type="layout" name="keyguard_eca">@layout/keyguard_emergency_carrier_area</item> +</resources> diff --git a/packages/Keyguard/res/values-port/bools.xml b/packages/Keyguard/res/values-port/bools.xml new file mode 100644 index 0000000..1e2a4f2 --- /dev/null +++ b/packages/Keyguard/res/values-port/bools.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2012 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> + <bool name="action_bar_embed_tabs">false</bool> + <bool name="kg_share_status_area">true</bool> + <bool name="kg_sim_puk_account_full_screen">true</bool> +</resources> diff --git a/packages/Keyguard/res/values-port/integers.xml b/packages/Keyguard/res/values-port/integers.xml new file mode 100644 index 0000000..ef7e4da --- /dev/null +++ b/packages/Keyguard/res/values-port/integers.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +** Copyright 2012, 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> + <!-- Gravity to make KeyguardSelectorView work in multiple orientations + 0x31 == "top|center_horizontal" --> + <integer name="kg_selector_gravity">0x31</integer> +</resources>
\ No newline at end of file diff --git a/packages/Keyguard/res/values-sw380dp-land/dimens.xml b/packages/Keyguard/res/values-sw380dp-land/dimens.xml new file mode 100644 index 0000000..20eb1be --- /dev/null +++ b/packages/Keyguard/res/values-sw380dp-land/dimens.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* //device/apps/common/assets/res/any/dimens.xml +** +** Copyright 2012, 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> + <!-- Top margin for the clock view --> + <dimen name="kg_clock_top_margin">48dp</dimen> +</resources> diff --git a/packages/Keyguard/res/layout-land/keyguard_glow_pad_container.xml b/packages/Keyguard/res/values-sw380dp/dimens.xml index f8364f1..fc0e85d 100644 --- a/packages/Keyguard/res/layout-land/keyguard_glow_pad_container.xml +++ b/packages/Keyguard/res/values-sw380dp/dimens.xml @@ -17,9 +17,7 @@ */ --> -<merge xmlns:android="http://schemas.android.com/apk/res/android"> - <include layout="@layout/keyguard_glow_pad_view" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_gravity="center" /> -</merge>
\ No newline at end of file +<resources> + <!-- Width of the sliding KeyguardSecurityContainer (includes 2x keyguard_security_view_margin) --> + <dimen name="keyguard_security_width">340dp</dimen> +</resources>
\ No newline at end of file diff --git a/packages/Keyguard/res/values-sw600dp-land/arrays.xml b/packages/Keyguard/res/values-sw600dp-land/arrays.xml new file mode 100644 index 0000000..5550216 --- /dev/null +++ b/packages/Keyguard/res/values-sw600dp-land/arrays.xml @@ -0,0 +1,72 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* //device/apps/common/assets/res/any/colors.xml +** +** Copyright 2006, 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 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + + <!-- Resources for GlowPadView in LockScreen --> + <array name="lockscreen_targets_when_silent"> + <item>@drawable/ic_lockscreen_unlock</item> + <item>@null</item> + <item>@drawable/ic_lockscreen_soundon</item> + <item>@null</item> + </array> + + <array name="lockscreen_target_descriptions_when_silent"> + <item>@string/description_target_unlock</item> + <item>@null</item> + <item>@string/description_target_soundon</item> + <item>@null</item> + </array> + + <array name="lockscreen_direction_descriptions"> + <item>@string/description_direction_right</item> + <item>@null</item> + <item>@string/description_direction_left</item> + <item>@null</item> + </array> + + <array name="lockscreen_targets_when_soundon"> + <item>@drawable/ic_lockscreen_unlock</item> + <item>@null</item> + <item>@drawable/ic_lockscreen_silent</item> + <item>@null</item> + </array> + + <array name="lockscreen_target_descriptions_when_soundon"> + <item>@string/description_target_unlock</item> + <item>@null</item> + <item>@string/description_target_silent</item> + <item>@null</item> + </array> + + <array name="lockscreen_targets_with_camera"> + <item>@drawable/ic_lockscreen_unlock</item> + <item>@drawable/ic_action_assist_generic</item> + <item>@drawable/ic_lockscreen_camera</item> + <item>@null</item> + </array> + + <array name="lockscreen_target_descriptions_with_camera"> + <item>@string/description_target_unlock</item> + <item>@string/description_target_search</item> + <item>@string/description_target_camera</item> + <item>@null</item> + </array> + +</resources> diff --git a/packages/Keyguard/res/values-sw600dp-land/dimens.xml b/packages/Keyguard/res/values-sw600dp-land/dimens.xml new file mode 100644 index 0000000..5507e5f --- /dev/null +++ b/packages/Keyguard/res/values-sw600dp-land/dimens.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* //device/apps/common/assets/res/any/dimens.xml +** +** Copyright 2006, 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> + <!-- Top margin for the clock view --> + <dimen name="kg_clock_top_margin">85dp</dimen> + + <!-- Size of margin on the right of keyguard's status view --> + <dimen name="kg_status_line_font_right_margin">16dp</dimen> +</resources>
\ No newline at end of file diff --git a/packages/Keyguard/res/values-sw600dp-land/integers.xml b/packages/Keyguard/res/values-sw600dp-land/integers.xml new file mode 100644 index 0000000..b724c90 --- /dev/null +++ b/packages/Keyguard/res/values-sw600dp-land/integers.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +** Copyright 2012, 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> + <integer name="kg_widget_region_weight">50</integer> + <integer name="kg_security_flipper_weight">50</integer> + <integer name="kg_glowpad_rotation_offset">0</integer> +</resources> diff --git a/packages/Keyguard/res/layout-sw600dp/keyguard_sim_puk_pin_navigation.xml b/packages/Keyguard/res/values-sw600dp-port/integers.xml index 2e6fa37..65b854a 100644 --- a/packages/Keyguard/res/layout-sw600dp/keyguard_sim_puk_pin_navigation.xml +++ b/packages/Keyguard/res/values-sw600dp-port/integers.xml @@ -1,9 +1,9 @@ <?xml version="1.0" encoding="utf-8"?> <!-- -** +/* ** Copyright 2012, The Android Open Source Project ** -** Licensed under the Apache License, Version 2.0 (the "License") +** 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 ** @@ -16,6 +16,7 @@ ** limitations under the License. */ --> -<merge xmlns:android="http://schemas.android.com/apk/res/android"> - <include layout="@layout/default_navigation" /> -</merge> +<resources> + <integer name="kg_widget_region_weight">46</integer> + <integer name="kg_security_flipper_weight">54</integer> +</resources>
\ No newline at end of file diff --git a/packages/Keyguard/res/values-sw600dp/alias.xml b/packages/Keyguard/res/values-sw600dp/alias.xml new file mode 100644 index 0000000..c3ecbb9 --- /dev/null +++ b/packages/Keyguard/res/values-sw600dp/alias.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* //device/apps/common/assets/res/any/colors.xml +** +** Copyright 2012, 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> + <!-- Alias used to reference one of two possible layouts in keyguard. --> + <item type="layout" name="keyguard_eca">@layout/keyguard_emergency_carrier_area</item> +</resources> diff --git a/packages/Keyguard/res/values-sw600dp/bools.xml b/packages/Keyguard/res/values-sw600dp/bools.xml new file mode 100644 index 0000000..ddc48c5 --- /dev/null +++ b/packages/Keyguard/res/values-sw600dp/bools.xml @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2011 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> + <bool name="target_honeycomb_needs_options_menu">false</bool> + <bool name="show_ongoing_ime_switcher">true</bool> + <bool name="kg_share_status_area">false</bool> + <bool name="kg_sim_puk_account_full_screen">false</bool> + <bool name="kg_show_ime_at_screen_on">false</bool> + <!-- No camera for you, tablet user --> + <bool name="kg_enable_camera_default_widget">false</bool> + <bool name="kg_center_small_widgets_vertically">true</bool> + <bool name="kg_top_align_page_shrink_on_bouncer_visible">false</bool> +</resources> diff --git a/packages/Keyguard/res/values-sw600dp/dimens.xml b/packages/Keyguard/res/values-sw600dp/dimens.xml new file mode 100644 index 0000000..c0e3937 --- /dev/null +++ b/packages/Keyguard/res/values-sw600dp/dimens.xml @@ -0,0 +1,71 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* //device/apps/common/assets/res/any/dimens.xml +** +** Copyright 2006, 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 clock font in LockScreen. --> + <dimen name="keyguard_pattern_unlock_clock_font_size">112sp</dimen> + + <!-- Size of lockscreen outerring on unsecure unlock LockScreen --> + <dimen name="keyguard_lockscreen_outerring_diameter">364dp</dimen> + + <!-- Height of FaceUnlock view in keyguard --> + <dimen name="face_unlock_height">430dip</dimen> + + <!-- target placement radius for GlowPadView. Should be 1/2 of outerring diameter. --> + <dimen name="glowpadview_target_placement_radius">182dip</dimen> + + <!-- Size of status line font in LockScreen. --> + <dimen name="keyguard_pattern_unlock_status_line_font_size">14sp</dimen> + + <!-- Keyguard dimensions --> + <!-- Size of the clock font in keyguard's status view --> + <dimen name="kg_status_clock_font_size">141dp</dimen> + + <!-- Size of the date font in keyguard's status view --> + <dimen name="kg_status_date_font_size">25.5dp</dimen> + + <!-- Size of the generic status lines keyguard's status view --> + <dimen name="kg_status_line_font_size">16sp</dimen> + + <!-- Top margin for the clock view --> + <dimen name="kg_clock_top_margin">0dp</dimen> + + <!-- Size of margin on the right of keyguard's status view --> + <dimen name="kg_status_line_font_right_margin">50dp</dimen> + + <!-- Horizontal padding for the widget pager --> + <dimen name="kg_widget_pager_horizontal_padding">24dp</dimen> + + <!-- Top padding for the widget pager --> + <dimen name="kg_widget_pager_top_padding">0dp</dimen> + + <!-- Bottom padding for the widget pager --> + <dimen name="kg_widget_pager_bottom_padding">0dp</dimen> + + <!-- Top margin for the runway lights. We add a negative margin in large + devices to account for the widget pager padding --> + <dimen name="kg_runway_lights_top_margin">-10dp</dimen> + + <!-- Margin around the various security views --> + <dimen name="keyguard_security_view_margin">12dp</dimen> + + <!-- Margin around the various security views --> + <dimen name="keyguard_muliuser_selector_margin">12dp</dimen> + +</resources> diff --git a/packages/Keyguard/res/layout/keyguard_sim_puk_pin_account_navigation.xml b/packages/Keyguard/res/values-sw600dp/integers.xml index 2e6fa37..de9829c 100644 --- a/packages/Keyguard/res/layout/keyguard_sim_puk_pin_account_navigation.xml +++ b/packages/Keyguard/res/values-sw600dp/integers.xml @@ -1,9 +1,9 @@ <?xml version="1.0" encoding="utf-8"?> <!-- -** +/* ** Copyright 2012, The Android Open Source Project ** -** Licensed under the Apache License, Version 2.0 (the "License") +** 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 ** @@ -16,6 +16,6 @@ ** limitations under the License. */ --> -<merge xmlns:android="http://schemas.android.com/apk/res/android"> - <include layout="@layout/default_navigation" /> -</merge> +<resources> + <integer name="kg_carousel_angle">60</integer> +</resources> diff --git a/packages/Keyguard/res/values-sw720dp-land/dimens.xml b/packages/Keyguard/res/values-sw720dp-land/dimens.xml new file mode 100644 index 0000000..14726ab --- /dev/null +++ b/packages/Keyguard/res/values-sw720dp-land/dimens.xml @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* //device/apps/common/assets/res/any/dimens.xml +** +** Copyright 2012, 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> + <!-- Top margin for the clock view --> + <dimen name="kg_clock_top_margin">174dp</dimen> + + <!-- Size of margin on the right of keyguard's status view --> + <dimen name="kg_status_line_font_right_margin">16dp</dimen> + + <!-- Horizontal padding for the widget pager --> + <dimen name="kg_widget_pager_horizontal_padding">32dp</dimen> +</resources> diff --git a/packages/Keyguard/res/layout-sw600dp/keyguard_navigation.xml b/packages/Keyguard/res/values-sw720dp-port/integers.xml index 2e6fa37..5f85f71 100644 --- a/packages/Keyguard/res/layout-sw600dp/keyguard_navigation.xml +++ b/packages/Keyguard/res/values-sw720dp-port/integers.xml @@ -1,9 +1,9 @@ <?xml version="1.0" encoding="utf-8"?> <!-- -** +/* ** Copyright 2012, The Android Open Source Project ** -** Licensed under the Apache License, Version 2.0 (the "License") +** 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 ** @@ -16,6 +16,7 @@ ** limitations under the License. */ --> -<merge xmlns:android="http://schemas.android.com/apk/res/android"> - <include layout="@layout/default_navigation" /> -</merge> +<resources> + <integer name="kg_widget_region_weight">48</integer> + <integer name="kg_security_flipper_weight">52</integer> +</resources>
\ No newline at end of file diff --git a/packages/Keyguard/res/values-sw720dp/dimens.xml b/packages/Keyguard/res/values-sw720dp/dimens.xml new file mode 100644 index 0000000..b29ac22 --- /dev/null +++ b/packages/Keyguard/res/values-sw720dp/dimens.xml @@ -0,0 +1,66 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +** +** Copyright 2012, 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> + <!-- Keyguard dimensions --> + <!-- Size of the clock font in keyguard's status view --> + <dimen name="kg_status_clock_font_size">188dp</dimen> + + <!-- Size of the date font in keyguard's status view --> + <dimen name="kg_status_date_font_size">34dp</dimen> + + <!-- Size of the generic status lines keyguard's status view --> + <dimen name="kg_status_line_font_size">19sp</dimen> + + <!-- Top margin for the clock view --> + <dimen name="kg_clock_top_margin">0dp</dimen> + + <!-- Size of margin on the right of keyguard's status view --> + <dimen name="kg_status_line_font_right_margin">32dp</dimen> + + <!-- Horizontal padding for the widget pager --> + <dimen name="kg_widget_pager_horizontal_padding">80dp</dimen> + + <!-- Top padding for the widget pager --> + <dimen name="kg_widget_pager_top_padding">0dp</dimen> + + <!-- Bottom padding for the widget pager --> + <dimen name="kg_widget_pager_bottom_padding">0dp</dimen> + + <!-- Top margin for the runway lights. We add a negative margin in large + devices to account for the widget pager padding --> + <dimen name="kg_runway_lights_top_margin">-30dp</dimen> + + <!-- Margin around the various security views --> + <dimen name="keyguard_muliuser_selector_margin">24dp</dimen> + + <!-- Stroke width of the frame for the circular avatars. --> + <dimen name="keyguard_avatar_frame_stroke_width">3dp</dimen> + + <!-- Size of the avator on the multiuser lockscreen. --> + <dimen name="keyguard_avatar_size">88dp</dimen> + + <!-- Size of the text under the avator on the multiuser lockscreen. --> + <dimen name="keyguard_avatar_name_size">12sp</dimen> + + <!-- Width of the sliding KeyguardSecurityContainer (includes 2x keyguard_security_view_margin) --> + <dimen name="keyguard_security_width">420dp</dimen> + + <!-- Height of the sliding KeyguardSecurityContainer (includes 2x keyguard_security_view_margin) --> + <dimen name="keyguard_security_height">420dp</dimen> +</resources> diff --git a/packages/Keyguard/res/anim/lock_screen_behind_enter.xml b/packages/Keyguard/res/values-xlarge/dimens.xml index cb47b3c..b8cf287 100644 --- a/packages/Keyguard/res/anim/lock_screen_behind_enter.xml +++ b/packages/Keyguard/res/values-xlarge/dimens.xml @@ -1,7 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <!-- -/* -** Copyright 2012, The Android Open Source Project +/* //device/apps/common/assets/res/any/dimens.xml +** +** Copyright 2006, 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. @@ -16,13 +17,11 @@ ** limitations under the License. */ --> - -<set xmlns:android="http://schemas.android.com/apk/res/android" - android:background="#ff000000" android:shareInterpolator="false"> - <alpha - android:fromAlpha="0.0" android:toAlpha="1.0" - android:fillEnabled="true" android:fillBefore="true" - android:interpolator="@interpolator/decelerate_quint" - android:startOffset="@android:integer/config_shortAnimTime" - android:duration="@android:integer/config_shortAnimTime"/> -</set>
\ No newline at end of file +<resources> + <!-- Default height of a key in the password keyboard for alpha --> + <dimen name="password_keyboard_key_height_alpha">75dip</dimen> + <!-- Default height of a key in the password keyboard for numeric --> + <dimen name="password_keyboard_key_height_numeric">75dip</dimen> + <!-- keyboardHeight = key_height*4 + key_bottom_gap*3 --> + <dimen name="password_keyboard_height">48.0mm</dimen> +</resources> diff --git a/packages/Keyguard/res/values/activitystrings.xml b/packages/Keyguard/res/values/activitystrings.xml new file mode 100644 index 0000000..5af9dea --- /dev/null +++ b/packages/Keyguard/res/values/activitystrings.xml @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* //device/apps/common/assets/res/any/strings.xml +** +** Copyright 2006, 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 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="app_name">KeyguardTestActivity</string> + <string name="secure_app_name">UnifiedCamera</string> + <string name="none_menu_item">No security</string> + <string name="pin_menu_item">PIN</string> + <string name="password_menu_item">Password</string> + <string name="pattern_menu_item">Pattern</string> + <string name="sim_pin_menu_item">SIM PIN</string> + <string name="sim_puk_menu_item">SIM PUK</string> + <string name="add_widget_item">Choose widget...</string> + <string name="on_screen_turned_off">onScreenTurnedOff</string> + <string name="on_screen_turned_on">onScreenTurnedOn</string> + <string name="do_keyguard">doKeyguard</string> + <string name="verify_unlock">verifyUnlock</string> +</resources> diff --git a/packages/Keyguard/res/values/alias.xml b/packages/Keyguard/res/values/alias.xml new file mode 100644 index 0000000..47291b2 --- /dev/null +++ b/packages/Keyguard/res/values/alias.xml @@ -0,0 +1,52 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* //device/apps/common/assets/res/any/colors.xml +** +** Copyright 2013, 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> + + <!-- Alias used to reference framework color for transparency. --> + <item type="color" name="transparent">@android:color/transparent</item> + + <!-- Alias used to reference framework drawable in keyguard. --> + <item type="drawable" name="stat_sys_warning">@android:drawable/stat_sys_warning</item> + + <!-- Alias used to reference framework drawable in keyguard. --> + <item type="drawable" name="ic_media_pause">@android:drawable/ic_media_pause</item> + + <!-- Alias used to reference framework drawable in keyguard. --> + <item type="drawable" name="ic_media_stop">@*android:drawable/ic_media_stop</item> + + <!-- Alias used to reference framework drawable in keyguard. --> + <item type="drawable" name="ic_contact_picture">@*android:drawable/ic_contact_picture</item> + + <!-- Alias used to reference framework drawable in keyguard. --> + <item type="drawable" name="ic_lock_idle_alarm">@*android:drawable/ic_lock_idle_alarm</item> + + <!-- Alias used to reference framework "OK" string in keyguard. --> + <item type="string" name="ok">@*android:string/ok</item> + + <!-- Alias used to reference framework "OK" string in keyguard. --> + <item type="string" name="system_ui_date_pattern">@*android:string/system_ui_date_pattern</item> + + <!-- Alias used to reference framework configuration for screen rotation. --> + <item type="bool" name="config_enableLockScreenRotation">@*android:bool/config_enableLockScreenRotation</item> + + <!-- Alias used to reference framework activity duration. --> + <item type="integer" name="config_activityDefaultDur">@*android:integer/config_activityDefaultDur</item> + +</resources>
\ No newline at end of file diff --git a/packages/Keyguard/res/values/arrays.xml b/packages/Keyguard/res/values/arrays.xml new file mode 100644 index 0000000..550f80c --- /dev/null +++ b/packages/Keyguard/res/values/arrays.xml @@ -0,0 +1,93 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* //device/apps/common/assets/res/any/colors.xml +** +** Copyright 2006, 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 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + + <!-- Resources for GlowPadView in LockScreen --> + <array name="lockscreen_targets_when_silent"> + <item>@drawable/ic_lockscreen_unlock</item> + <item>@drawable/ic_action_assist_generic</item> + <item>@drawable/ic_lockscreen_soundon</item> + <item>@null</item> + </array> + + <array name="lockscreen_target_descriptions_when_silent"> + <item>@string/description_target_unlock</item> + <item>@string/description_target_search</item> + <item>@string/description_target_soundon</item> + <item>@null</item> + </array> + + <array name="lockscreen_direction_descriptions"> + <item>@string/description_direction_right</item> + <item>@string/description_direction_up</item> + <item>@string/description_direction_left</item> + <item>@null</item> + </array> + + <array name="lockscreen_targets_when_soundon"> + <item>@drawable/ic_lockscreen_unlock</item> + <item>@drawable/ic_action_assist_generic</item> + <item>@drawable/ic_lockscreen_silent</item> + <item>@null</item> + </array> + + <array name="lockscreen_target_descriptions_when_soundon"> + <item>@string/description_target_unlock</item> + <item>@string/description_target_search</item> + <item>@string/description_target_silent</item> + <item>@null</item> + </array> + + <array name="lockscreen_targets_with_camera"> + <item>@drawable/ic_lockscreen_unlock</item> + <item>@drawable/ic_action_assist_generic</item> + <item>@drawable/ic_lockscreen_camera</item> + <item>@null</item> + </array> + + <array name="lockscreen_target_descriptions_with_camera"> + <item>@string/description_target_unlock</item> + <item>@string/description_target_search</item> + <item>@string/description_target_camera</item> + <item>@null</item> + </array> + + <array name="lockscreen_targets_unlock_only"> + <item>@drawable/ic_lockscreen_unlock</item> + </array> + + <array name="lockscreen_target_descriptions_unlock_only"> + <item>@string/description_target_unlock</item> + </array> + + <!-- list of 3- or 4-letter mnemonics for a 10-key numeric keypad --> + <string-array translatable="false" name="lockscreen_num_pad_klondike"> + <item></item><!-- 0 --> + <item></item><!-- 1 --> + <item>ABC</item><!-- 2 --> + <item>DEF</item><!-- 3 --> + <item>GHI</item><!-- 4 --> + <item>JKL</item><!-- 5 --> + <item>MNO</item><!-- 6 --> + <item>PQRS</item><!-- 7 --> + <item>TUV</item><!-- 8 --> + <item>WXYZ</item><!-- 9 --> + </string-array> +</resources> diff --git a/packages/Keyguard/res/values/attrs.xml b/packages/Keyguard/res/values/attrs.xml new file mode 100644 index 0000000..e045dd2 --- /dev/null +++ b/packages/Keyguard/res/values/attrs.xml @@ -0,0 +1,136 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2006 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. +--> + +<!-- Formatting note: terminate all comments with a period, to avoid breaking + the documentation output. To suppress comment lines from the documentation + output, insert an eat-comment element after the comment lines. +--> + +<resources> + <!-- Standard gravity constant that a child supplies to its parent. + Defines how the child view should be positioned, on both the X and Y axes, within its enclosing layout. --> + <attr name="layout_gravity"> + <!-- Push object to the top of its container, not changing its size. --> + <flag name="top" value="0x30" /> + <!-- Push object to the bottom of its container, not changing its size. --> + <flag name="bottom" value="0x50" /> + <!-- Push object to the left of its container, not changing its size. --> + <flag name="left" value="0x03" /> + <!-- Push object to the right of its container, not changing its size. --> + <flag name="right" value="0x05" /> + <!-- Place object in the vertical center of its container, not changing its size. --> + <flag name="center_vertical" value="0x10" /> + <!-- Grow the vertical size of the object if needed so it completely fills its container. --> + <flag name="fill_vertical" value="0x70" /> + <!-- Place object in the horizontal center of its container, not changing its size. --> + <flag name="center_horizontal" value="0x01" /> + <!-- Grow the horizontal size of the object if needed so it completely fills its container. --> + <flag name="fill_horizontal" value="0x07" /> + <!-- Place the object in the center of its container in both the vertical and horizontal axis, not changing its size. --> + <flag name="center" value="0x11" /> + <!-- Grow the horizontal and vertical size of the object if needed so it completely fills its container. --> + <flag name="fill" value="0x77" /> + <!-- Additional option that can be set to have the top and/or bottom edges of + the child clipped to its container's bounds. + The clip will be based on the vertical gravity: a top gravity will clip the bottom + edge, a bottom gravity will clip the top edge, and neither will clip both edges. --> + <flag name="clip_vertical" value="0x80" /> + <!-- Additional option that can be set to have the left and/or right edges of + the child clipped to its container's bounds. + The clip will be based on the horizontal gravity: a left gravity will clip the right + edge, a right gravity will clip the left edge, and neither will clip both edges. --> + <flag name="clip_horizontal" value="0x08" /> + <!-- Push object to the beginning of its container, not changing its size. --> + <flag name="start" value="0x00800003" /> + <!-- Push object to the end of its container, not changing its size. --> + <flag name="end" value="0x00800005" /> + </attr> + + + <!-- PagedView specific attributes. These attributes are used to customize + a PagedView view in XML files. --> + <declare-styleable name="PagedView"> + <!-- The space between adjacent pages of the PagedView. --> + <attr name="pageSpacing" format="dimension" /> + <!-- The padding for the scroll indicator area --> + <attr name="scrollIndicatorPaddingLeft" format="dimension" /> + <attr name="scrollIndicatorPaddingRight" format="dimension" /> + </declare-styleable> + + <declare-styleable name="KeyguardGlowStripView"> + <attr name="dotSize" format="dimension" /> + <attr name="numDots" format="integer" /> + <attr name="glowDot" format="reference" /> + <attr name="leftToRight" format="boolean" /> + </declare-styleable> + + <!-- Some child types have special behavior. --> + <attr name="layout_childType"> + <!-- No special behavior. Layout will proceed as normal. --> + <enum name="none" value="0" /> + <!-- Widget container. + This will be resized in response to certain events. --> + <enum name="widget" value="1" /> + <!-- Security challenge container. + This will be dismissed/shown in response to certain events, + possibly obscuring widget elements. --> + <enum name="challenge" value="2" /> + <!-- User switcher. + This will consume space from the total layout area. --> + <enum name="userSwitcher" value="3" /> + <!-- Scrim. This will block access to child views that + come before it in the child list in bouncer mode. --> + <enum name="scrim" value="4" /> + <!-- The home for widgets. All widgets will be descendents of this. --> + <enum name="widgets" value="5" /> + <!-- This is a handle that is used for expanding the + security challenge container when it is collapsed. --> + <enum name="expandChallengeHandle" value="6" /> + <!-- Delete drop target. This will be the drop target to delete pages. --> + <enum name="pageDeleteDropTarget" value="7" /> + </attr> + + <declare-styleable name="SlidingChallengeLayout_Layout"> + <attr name="layout_childType" /> + <attr name="layout_maxHeight" format="dimension" /> + </declare-styleable> + + <declare-styleable name="MultiPaneChallengeLayout"> + <!-- Influences how layout_centerWithinArea behaves --> + <attr name="android:orientation" /> + </declare-styleable> + + <declare-styleable name="MultiPaneChallengeLayout_Layout"> + <!-- Percentage of the screen this child should consume or center within. + If 0/default, the view will be measured by standard rules + as if this were a FrameLayout. --> + <attr name="layout_centerWithinArea" format="float" /> + <attr name="layout_childType" /> + <attr name="layout_gravity" /> + <attr name="layout_maxWidth" format="dimension" /> + <attr name="layout_maxHeight" /> + </declare-styleable> + + <declare-styleable name="KeyguardSecurityViewFlipper_Layout"> + <attr name="layout_maxWidth" /> + <attr name="layout_maxHeight" /> + </declare-styleable> + + <declare-styleable name="NumPadKey"> + <attr name="digit" format="integer" /> + <attr name="textView" format="reference" /> + </declare-styleable> +</resources> diff --git a/packages/Keyguard/res/values/bools.xml b/packages/Keyguard/res/values/bools.xml new file mode 100644 index 0000000..a9f69e5 --- /dev/null +++ b/packages/Keyguard/res/values/bools.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2011 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> + <bool name="kg_enable_camera_default_widget">true</bool> + <bool name="kg_center_small_widgets_vertically">false</bool> + <bool name="kg_top_align_page_shrink_on_bouncer_visible">true</bool> + <bool name="kg_show_ime_at_screen_on">true</bool> +</resources> diff --git a/packages/Keyguard/res/values/colors.xml b/packages/Keyguard/res/values/colors.xml new file mode 100644 index 0000000..0c56a43 --- /dev/null +++ b/packages/Keyguard/res/values/colors.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2012 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> + <!-- Keyguard colors --> + <color name="keyguard_avatar_frame_color">#ffffffff</color> + <color name="keyguard_avatar_frame_shadow_color">#80000000</color> + <color name="keyguard_avatar_nick_color">#ffffffff</color> + <color name="keyguard_avatar_frame_pressed_color">#ff35b5e5</color> + <color name="kg_widget_pager_gradient">#ffffffff</color> + + <!-- FaceLock --> + <color name="facelock_spotlight_mask">#CC000000</color> +</resources> diff --git a/packages/Keyguard/res/layout/keyguard_multi_user_selector_widget.xml b/packages/Keyguard/res/values/config.xml index fc126fe..de17c4b 100644 --- a/packages/Keyguard/res/layout/keyguard_multi_user_selector_widget.xml +++ b/packages/Keyguard/res/values/config.xml @@ -1,9 +1,9 @@ <?xml version="1.0" encoding="utf-8"?> <!-- -** +/* ** Copyright 2009, The Android Open Source Project ** -** Licensed under the Apache License, Version 2.0 (the "License") +** 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 ** @@ -17,10 +17,16 @@ */ --> -<!-- This is a view that shows general status information in Keyguard. --> -<com.android.internal.policy.impl.keyguard.KeyguardWidgetFrame - xmlns:android="http://schemas.android.com/apk/res/android" - android:id="@+id/keyguard_multi_user_selector" - android:layout_width="match_parent" - android:layout_height="match_parent"> -</com.android.internal.policy.impl.keyguard.KeyguardWidgetFrame>
\ No newline at end of file +<!-- These resources are around just to allow their values to be customized --> +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + + <!-- Package name for default keyguard appwidget [DO NOT TRANSLATE] --> + <string name="widget_default_package_name"></string> + + <!-- Class name for default keyguard appwidget [DO NOT TRANSLATE] --> + <string name="widget_default_class_name"></string> + + <!-- Allow the menu hard key to be disabled in LockScreen on some devices [DO NOT TRANSLATE] --> + <bool name="config_disableMenuKeyInLockScreen">false</bool> + +</resources> diff --git a/packages/Keyguard/res/values/dimens.xml b/packages/Keyguard/res/values/dimens.xml new file mode 100644 index 0000000..fde63c4 --- /dev/null +++ b/packages/Keyguard/res/values/dimens.xml @@ -0,0 +1,167 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* //device/apps/common/assets/res/any/dimens.xml +** +** Copyright 2006, 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> + <!-- Default height of a key in the password keyboard for alpha (used by keyguard) --> + <dimen name="password_keyboard_key_height_alpha">56dip</dimen> + <!-- Default height of a key in the password keyboard for numeric (used by keyguard) --> + <dimen name="password_keyboard_key_height_numeric">56dip</dimen> + <!-- Default correction for the space key in the password keyboard (used by keyguard) --> + <dimen name="password_keyboard_spacebar_vertical_correction">4dip</dimen> + <!-- Default horizontal gap between keys in the password keyboard (used by keyguard) --> + <dimen name="password_keyboard_horizontalGap">3dip</dimen> + <!-- Default vertical gap between keys in the password keyboard (used by keyguard) --> + <dimen name="password_keyboard_verticalGap">9dip</dimen> + + <!-- Size of lockscreen outerring on unsecure unlock LockScreen --> + <dimen name="keyguard_lockscreen_outerring_diameter">270dp</dimen> + + <!-- Default target placement radius for GlowPadView. Should be 1/2 of outerring diameter. --> + <dimen name="glowpadview_target_placement_radius">135dip</dimen> + + <!-- Default glow radius for GlowPadView --> + <dimen name="glowpadview_glow_radius">75dip</dimen> + + <!-- Default distance beyond which GlowPadView snaps to the matching target --> + <dimen name="glowpadview_snap_margin">40dip</dimen> + + <!-- Default distance from each snap target that GlowPadView considers a "hit" --> + <dimen name="glowpadview_inner_radius">15dip</dimen> + + <!-- Size of clock font in LockScreen on Unsecure unlock screen. --> + <dimen name="keyguard_lockscreen_clock_font_size">80dip</dimen> + + <!-- Size of status line font on Unsecure unlock LockScreen. --> + <dimen name="keyguard_lockscreen_status_line_font_size">14dip</dimen> + + <!-- Size of right margin on Unsecure unlock LockScreen --> + <dimen name="keyguard_lockscreen_status_line_font_right_margin">42dip</dimen> + + <!-- Size of top margin on Clock font to edge on unlock LockScreen --> + <dimen name="keyguard_lockscreen_status_line_clockfont_top_margin">22dip</dimen> + + <!-- Size of top margin on Clock font to edge on unlock LockScreen --> + <dimen name="keyguard_lockscreen_status_line_clockfont_bottom_margin">12dip</dimen> + + <!-- Padding on left margin of PIN text entry field to center it when del button is showing --> + <dimen name="keyguard_lockscreen_pin_margin_left">40dip</dimen> + + <!-- Height of FaceUnlock view in keyguard --> + <dimen name="face_unlock_height">330dip</dimen> + + <!-- Keyguard dimensions --> + <!-- TEMP --> + <dimen name="kg_security_panel_height">600dp</dimen> + + <!-- Height of security view in keyguard. --> + <dimen name="kg_security_view_height">480dp</dimen> + + <!-- Width of widget view in keyguard. --> + <dimen name="kg_widget_view_width">0dp</dimen> + + <!-- Height of widget view in keyguard. --> + <dimen name="kg_widget_view_height">0dp</dimen> + + <!-- Size of the clock font in keyguard's status view --> + <dimen name="kg_status_clock_font_size">75dp</dimen> + + <!-- Size of the date font in keyguard's status view --> + <dimen name="kg_status_date_font_size">15dp</dimen> + + <!-- Size of the generic status lines keyguard's status view --> + <dimen name="kg_status_line_font_size">13dp</dimen> + + <!-- Size of margin on the right of keyguard's status view --> + <dimen name="kg_status_line_font_right_margin">16dp</dimen> + + <!-- Top margin for the clock view --> + <dimen name="kg_clock_top_margin">-16dp</dimen> + + <!-- Horizontal gap between keys in PIN and SIM PIN numeric keyboards in keyguard --> + <dimen name="kg_key_horizontal_gap">0dp</dimen> + + <!-- Horizontal gap between keys in PIN and SIM PIN numeric keyboards in keyguard --> + <dimen name="kg_key_vertical_gap">0dp</dimen> + + <!-- Horizontal gap between keys in PIN and SIM PIN numeric keyboards in keyguard --> + <dimen name="kg_pin_key_height">60dp</dimen> + + <!-- Space reserved at the bottom of secure views (pin/pattern/password/SIM pin/SIM puk) --> + <dimen name="kg_secure_padding_height">46dp</dimen> + + <!-- The height of the runway lights strip --> + <dimen name="kg_runway_lights_height">7dp</dimen> + + <!-- The height of the runway lights strip --> + <dimen name="kg_runway_lights_vertical_padding">2dp</dimen> + + <!-- Horizontal padding for the widget pager --> + <dimen name="kg_widget_pager_horizontal_padding">16dp</dimen> + + <!-- Top padding for the widget pager --> + <dimen name="kg_widget_pager_top_padding">0dp</dimen> + + <!-- Bottom padding for the widget pager --> + <dimen name="kg_widget_pager_bottom_padding">64dp</dimen> + + <!-- Top margin for the runway lights. We add a negative margin in large + devices to account for the widget pager padding --> + <dimen name="kg_runway_lights_top_margin">0dp</dimen> + + <!-- Touch slop for the global toggle accessibility gesture --> + <dimen name="accessibility_touch_slop">80dip</dimen> + + <!-- Width of the sliding KeyguardSecurityContainer (includes 2x keyguard_security_view_margin) --> + <dimen name="keyguard_security_width">320dp</dimen> + + <!-- Height of the sliding KeyguardSecurityContainer (includes 2x keyguard_security_view_margin) --> + <dimen name="keyguard_security_height">400dp</dimen> + + <!-- Margin around the various security views --> + <dimen name="keyguard_security_view_margin">8dp</dimen> + + <!-- Margin around the various security views --> + <dimen name="keyguard_muliuser_selector_margin">8dp</dimen> + + <!-- Stroke width of the frame for the circular avatars. --> + <dimen name="keyguard_avatar_frame_stroke_width">2dp</dimen> + + <!-- Shadow radius under the frame for the circular avatars. --> + <dimen name="keyguard_avatar_frame_shadow_radius">1dp</dimen> + + <!-- Size of the avator on hte multiuser lockscreen. --> + <dimen name="keyguard_avatar_size">66dp</dimen> + + <!-- Size of the text under the avator on the multiuser lockscreen. --> + <dimen name="keyguard_avatar_name_size">10sp</dimen> + + <!-- Size of the region along the edge of the screen that will accept + swipes to scroll the widget area. --> + <dimen name="kg_edge_swipe_region_size">24dp</dimen> + + <!-- If the height if keyguard drops below this threshold (most likely + due to the appearance of the IME), then drop the multiuser selector. --> + <dimen name="kg_squashed_layout_threshold">600dp</dimen> + + <!-- The height of widgets which do not support vertical resizing. This is only + used on tablets; on phones, this size is determined by the space left by the + security mode. --> + <dimen name="kg_small_widget_height">160dp</dimen> + +</resources> diff --git a/packages/Keyguard/res/values/integers.xml b/packages/Keyguard/res/values/integers.xml new file mode 100644 index 0000000..053fc85 --- /dev/null +++ b/packages/Keyguard/res/values/integers.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +** Copyright 2012, 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> + <integer name="kg_carousel_angle">75</integer> + <integer name="kg_security_flip_duration">100</integer> + <integer name="kg_security_fade_duration">100</integer> + <integer name="kg_glowpad_rotation_offset">0</integer> +</resources> diff --git a/packages/Keyguard/res/values/strings.xml b/packages/Keyguard/res/values/strings.xml new file mode 100644 index 0000000..5cf05f8 --- /dev/null +++ b/packages/Keyguard/res/values/strings.xml @@ -0,0 +1,327 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* //device/apps/common/assets/res/any/strings.xml +** +** Copyright 2006, 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 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <!-- Instructions telling the user to enter their SIM PIN to unlock the keyguard. + Displayed in one line in a large font. --> + <string name="keyguard_password_enter_pin_code">Type PIN code</string> + + <!-- Instructions telling the user to enter their SIM PUK to unlock the keyguard. + Displayed in one line in a large font. --> + <string name="keyguard_password_enter_puk_code">Type PUK and new PIN code</string> + + <!-- Prompt to enter SIM PUK in Edit Text Box in unlock screen --> + <string name="keyguard_password_enter_puk_prompt">PUK code</string> + <!-- Prompt to enter New SIM PIN in Edit Text Box in unlock screen --> + <string name="keyguard_password_enter_pin_prompt">New PIN code</string> + + <!-- Displayed as hint in passwordEntry EditText on PasswordUnlockScreen [CHAR LIMIT=30]--> + <string name="keyguard_password_entry_touch_hint"><font size="17">Touch to type password</font></string> + + <!-- Instructions telling the user to enter their text password to unlock the keyguard. + Displayed in one line in a large font. --> + <string name="keyguard_password_enter_password_code">Type password to unlock</string> + + <!-- Instructions telling the user to enter their PIN password to unlock the keyguard. + Displayed in one line in a large font. --> + <string name="keyguard_password_enter_pin_password_code">Type PIN to unlock</string> + + <!-- Instructions telling the user that they entered the wrong pin while trying + to unlock the keyguard. Displayed in one line in a large font. --> + <string name="keyguard_password_wrong_pin_code">Incorrect PIN code.</string> + + <!-- Instructions telling the user how to unlock the phone. --> + <string name="keyguard_label_text">To unlock, press Menu then 0.</string> + + <!-- Shown when face unlock failed multiple times so we're just using the backup --> + <string name="faceunlock_multiple_failures">Maximum Face Unlock attempts exceeded</string> + + <!-- When the lock screen is showing, the phone is plugged in and the battery is fully + charged, say that it is charged. --> + <string name="keyguard_charged">Charged</string> + + <!-- When the lock screen is showing and the phone plugged in, and the battery + is not fully charged, show the current charge %. --> + <string name="keyguard_plugged_in">Charging, <xliff:g id="number">%d</xliff:g><xliff:g id="percent">%%</xliff:g></string> + + <!-- When the lock screen is showing and the battery is low, warn user to plug + in the phone soon. --> + <string name="keyguard_low_battery">Connect your charger.</string> + + <!-- On the keyguard screen, when pattern lock is disabled, only tell them to press menu to unlock. This is shown in small font at the bottom. --> + <string name="keyguard_instructions_when_pattern_disabled">Press Menu to unlock.</string> + + <!-- SIM messages --><skip /> + <!-- When the user inserts a sim card from an unsupported network, it becomes network locked --> + <string name="keyguard_network_locked_message">Network locked</string> + <!-- Shown when there is no SIM card. --> + <string name="keyguard_missing_sim_message_short">No SIM card</string> + <!-- Shown when there is no SIM card. --> + <string name="keyguard_missing_sim_message" product="tablet">No SIM card in tablet.</string> + <!-- Shown when there is no SIM card. --> + <string name="keyguard_missing_sim_message" product="default">No SIM card in phone.</string> + <!-- Shown to ask the user to insert a SIM card. --> + <string name="keyguard_missing_sim_instructions">Insert a SIM card.</string> + <!-- Shown to ask the user to insert a SIM card when sim is missing or not readable. --> + <string name="keyguard_missing_sim_instructions_long">The SIM card is missing or not readable. Insert a SIM card.</string> + <!-- Shown when SIM card is permanently disabled. --> + <string name="keyguard_permanent_disabled_sim_message_short">Unusable SIM card.</string> + <!-- Shown to inform the user to SIM card is permanently disabled. --> + <string name="keyguard_permanent_disabled_sim_instructions">Your SIM card has been permanently disabled.\n + Contact your wireless service provider for another SIM card.</string> + <!-- Shown to tell the user that their SIM is locked and they must unlock it. --> + <string name="keyguard_sim_locked_message">SIM card is locked.</string> + <!-- When the user enters a wrong sim pin too many times, it becomes PUK locked (Pin Unlock Kode) --> + <string name="keyguard_sim_puk_locked_message">SIM card is PUK-locked.</string> + <!-- For the unlock screen, When the user enters a sim unlock code, it takes a little while to check + whether it is valid, and to unlock the sim if it is valid. we display a + progress dialog in the meantime. this is the emssage. --> + <string name="keyguard_sim_unlock_progress_dialog_message">Unlocking SIM card\u2026</string> + + + <!-- Accessibility description sent when user changes the current lock screen widget. [CHAR_LIMIT=none] --> + <string name="keyguard_accessibility_widget_changed">%1$s. Widget %2$d of %3$d.</string> + <!-- Accessibility description of the add widget button. [CHAR_LIMIT=none] --> + <string name="keyguard_accessibility_add_widget">Add widget.</string> + <!-- Accessibility description of the empty sidget slot (place holder for a new widget). [CHAR_LIMIT=none] --> + <string name="keyguard_accessibility_widget_empty_slot">Empty</string> + <!-- Accessibility description of the event of expanding an unlock area. [CHAR_LIMIT=none] --> + <string name="keyguard_accessibility_unlock_area_expanded">Unlock area expanded.</string> + <!-- Accessibility description of the event of collapsing an unlock area. [CHAR_LIMIT=none] --> + <string name="keyguard_accessibility_unlock_area_collapsed">Unlock area collapsed.</string> + <!-- Accessibility description of a lock screen widget. [CHAR_LIMIT=none] --> + <string name="keyguard_accessibility_widget"><xliff:g id="widget_index">%1$s</xliff:g> widget.</string> + <!-- Accessibility description of the lock screen user selector widget. [CHAR_LIMIT=none] --> + <string name="keyguard_accessibility_user_selector">User selector</string> + <!-- Accessibility description of the lock screen status widget. [CHAR_LIMIT=none] --> + <string name="keyguard_accessibility_status">Status</string> + <!-- Accessibility description of the camera widget. [CHAR_LIMIT=none] --> + <string name="keyguard_accessibility_camera">Camera</string> + <!-- Accessibility description of the lock media control widget. [CHAR_LIMIT=none] --> + <string name="keygaurd_accessibility_media_controls">Media controls</string> + <!-- Accessibility description of widget reordering start. [CHAR_LIMIT=none] --> + <string name="keyguard_accessibility_widget_reorder_start">Widget reordering started.</string> + <!-- Accessibility description of widget reordering end. [CHAR_LIMIT=none] --> + <string name="keyguard_accessibility_widget_reorder_end">Widget reordering ended.</string> + <!-- Accessibility description of the a widget deletion event. [CHAR_LIMIT=none] --> + <string name="keyguard_accessibility_widget_deleted">Widget <xliff:g id="widget_index">%1$s</xliff:g> deleted.</string> + <!-- Accessibility description of the button to expand the lock area. [CHAR_LIMIT=none] --> + <string name="keyguard_accessibility_expand_lock_area">Expand unlock area.</string> + <!-- Accessibility description of the slide unlock. [CHAR_LIMIT=none] --> + <string name="keyguard_accessibility_slide_unlock">Slide unlock.</string> + <!-- Accessibility description of the pattern unlock. [CHAR_LIMIT=none] --> + <string name="keyguard_accessibility_pattern_unlock">Pattern unlock.</string> + <!-- Accessibility description of the face unlock. [CHAR_LIMIT=none] --> + <string name="keyguard_accessibility_face_unlock">Face unlock.</string> + <!-- Accessibility description of the pin lock. [CHAR_LIMIT=none] --> + <string name="keyguard_accessibility_pin_unlock">Pin unlock.</string> + <!-- Accessibility description of the password lock. [CHAR_LIMIT=none] --> + <string name="keyguard_accessibility_password_unlock">Password unlock.</string> + <!-- Accessibility description of the unlock pattern area. [CHAR_LIMIT=none] --> + <string name="keyguard_accessibility_pattern_area">Pattern area.</string> + <!-- Accessibility description of the unlock slide area. [CHAR_LIMIT=none] --> + <string name="keyguard_accessibility_slide_area">Slide area.</string> + + <!-- Shown on transport control of lockscreen. Pressing button goes to previous track. --> + <string name="keyguard_accessibility_transport_prev_description">Previous track button</string> + <!-- Shown on transport control of lockscreen. Pressing button goes to next track. --> + <string name="keyguard_accessibility_transport_next_description">Next track button</string> + <!-- Shown on transport control of lockscreen. Pressing button pauses playback --> + <string name="keyguard_accessibility_transport_pause_description">Pause button</string> + <!-- Shown on transport control of lockscreen. Pressing button pauses playback --> + <string name="keyguard_accessibility_transport_play_description">Play button</string> + <!-- Shown on transport control of lockscreen. Pressing button pauses playback --> + <string name="keyguard_accessibility_transport_stop_description">Stop button</string> + + <!-- Password keyboard strings. Used by LockScreen and Settings --><skip /> + <!-- Label for "switch to symbols" key. Must be short to fit on key! --> + <string name="password_keyboard_label_symbol_key">\?123</string> + <!-- Label for "switch to alphabetic" key. Must be short to fit on key! --> + <string name="password_keyboard_label_alpha_key">ABC</string> + <!-- Label for ALT modifier key. Must be short to fit on key! --> + <string name="password_keyboard_label_alt_key">ALT</string> + + <!-- KeyboardView - accessibility support --><skip /> + <!-- Description of the Alt button in a KeyboardView. [CHAR LIMIT=NONE] --> + <string name="keyboardview_keycode_alt">Alt</string> + <!-- Description of the Cancel button in a KeyboardView. [CHAR LIMIT=NONE] --> + <string name="keyboardview_keycode_cancel">Cancel</string> + <!-- Description of the Delete button in a KeyboardView. [CHAR LIMIT=NONE] --> + <string name="keyboardview_keycode_delete">Delete</string> + <!-- Description of the Done button in a KeyboardView. [CHAR LIMIT=NONE] --> + <string name="keyboardview_keycode_done">Done</string> + <!-- Description of the Mode change button in a KeyboardView. [CHAR LIMIT=NONE] --> + <string name="keyboardview_keycode_mode_change">Mode change</string> + <!-- Description of the Shift button in a KeyboardView. [CHAR LIMIT=NONE] --> + <string name="keyboardview_keycode_shift">Shift</string> + <!-- Description of the Enter button in a KeyboardView. [CHAR LIMIT=NONE] --> + <string name="keyboardview_keycode_enter">Enter</string> + + <!-- Description of the unlock target in the Slide unlock screen. [CHAR LIMIT=NONE] --> + <string name="description_target_unlock">Unlock</string> + <!-- Description of the camera target in the Slide unlock screen. [CHAR LIMIT=NONE] --> + <string name="description_target_camera">Camera</string> + <!-- Description of the silent target in the Slide unlock screen. [CHAR LIMIT=NONE] --> + <string name="description_target_silent">Silent</string> + <!-- Description of the sound on target in the Slide unlock screen. [CHAR LIMIT=NONE] --> + <string name="description_target_soundon">Sound on</string> + <!-- Description of the unlock target in the Slide unlock screen. [CHAR LIMIT=NONE] --> + <string name="description_target_search">Search</string> + + <!-- Description of the up direction in which one can to slide the handle in the Slide unlock screen. [CHAR LIMIT=NONE] --> + <string name="description_direction_up">Slide up for <xliff:g id="target_description" example="Unlock">%s</xliff:g>.</string> + <!-- Description of the down direction in which one can to slide the handle in the Slide unlock screen. [CHAR LIMIT=NONE] --> + <string name="description_direction_down">Slide down for <xliff:g id="target_description" example="Unlock">%s</xliff:g>.</string> + <!-- Description of the left direction in which one can to slide the handle in the Slide unlock screen. [CHAR LIMIT=NONE] --> + <string name="description_direction_left">"Slide left for <xliff:g id="target_description" example="Unlock">%s</xliff:g>.</string> + <!-- Description of the right direction in which one can to slide the handle in the Slide unlock screen. [CHAR LIMIT=NONE] --> + <string name="description_direction_right">Slide right for <xliff:g id="target_description" example="Unlock">%s</xliff:g>.</string> + + <!-- Text spoken when the current user is switched if accessibility is enabled. [CHAR LIMIT=none] --> + <string name="user_switched">Current user <xliff:g id="name" example="Bob">%1$s</xliff:g>.</string> + + <!-- Label shown on emergency call button in keyguard --> + <string name="kg_emergency_call_label">Emergency call</string> + <!-- Message shown in pattern unlock after some number of unsuccessful attempts --> + <string name="kg_forgot_pattern_button_text">Forgot Pattern</string> + <!-- Message shown when user enters wrong pattern --> + <string name="kg_wrong_pattern">Wrong Pattern</string> + <!-- Message shown when user enters wrong password --> + <string name="kg_wrong_password">Wrong Password</string> + <!-- Message shown when user enters wrong PIN --> + <string name="kg_wrong_pin">Wrong PIN</string> + <!-- Countdown message shown after too many failed unlock attempts --> + <string name="kg_too_many_failed_attempts_countdown">Try again in <xliff:g id="number">%d</xliff:g> seconds.</string> + <!-- Instructions for using the pattern unlock screen --> + <string name="kg_pattern_instructions">Draw your pattern</string> + <!-- Instructions for using the SIM PIN unlock screen --> + <string name="kg_sim_pin_instructions">Enter SIM PIN</string> + <!-- Instructions for using the PIN unlock screen --> + <string name="kg_pin_instructions">Enter PIN</string> + <!-- Instructions for using the password unlock screen --> + <string name="kg_password_instructions">Enter Password</string> + <!-- Hint shown in the PUK screen that asks the user to enter the PUK code given to them by their provider --> + <string name="kg_puk_enter_puk_hint">SIM is now disabled. Enter PUK code to continue. Contact carrier for details.</string> + <!-- Hint shown in the PUK unlock screen PIN TextView --> + <string name="kg_puk_enter_pin_hint">Enter desired PIN code</string> + <!-- Message shown when the user needs to confirm the PIN they just entered in the PUK screen --> + <string name="kg_enter_confirm_pin_hint">Confirm desired PIN code</string> + <!-- Message shown in dialog while the device is unlocking the SIM card --> + <string name="kg_sim_unlock_progress_dialog_message">Unlocking SIM card\u2026</string> + <!-- Message shown when the user enters the wrong PIN code --> + <string name="kg_password_wrong_pin_code">Incorrect PIN code.</string> + <!-- Message shown when the user enters an invalid SIM pin password in PUK screen --> + <string name="kg_invalid_sim_pin_hint">Type a PIN that is 4 to 8 numbers.</string> + <!-- Message shown when the user enters an invalid PUK code in the PUK screen --> + <string name="kg_invalid_sim_puk_hint">PUK code should be 8 numbers or more.</string> + <!-- Message shown when the user enters an invalid PUK code --> + <string name="kg_invalid_puk">Re-enter the correct PUK code. Repeated attempts will permanently disable the SIM.</string> + <!-- String shown in PUK screen when PIN codes don't match --> + <string name="kg_invalid_confirm_pin_hint" product="default">PIN codes does not match</string> + <!-- Message shown when the user exceeds the maximum number of pattern attempts --> + <string name="kg_login_too_many_attempts">Too many pattern attempts</string> + <!-- Instructions show in account unlock screen allowing user to enter their email password --> + <string name="kg_login_instructions">To unlock, sign in with your Google account.</string> + <!-- Hint shown in TextView in account unlock screen of keyguard --> + <string name="kg_login_username_hint">Username (email)</string> + <!-- Hint shown in TextView in account unlock screen of keyguard --> + <string name="kg_login_password_hint">Password</string> + <!-- Label shown on sign in button on account unlock screen of keyguard --> + <string name="kg_login_submit_button">Sign in</string> + <!-- Message shown when the user enters an invalid username/password combination in account unlock screen of keyguard --> + <string name="kg_login_invalid_input">Invalid username or password.</string> + <!-- Hint text shown when user has too many failed password attempts in account unlock screen of keyguard --> + <string name="kg_login_account_recovery_hint">Forgot your username or password\?\nVisit <b>google.com/accounts/recovery</b>.</string> + <!-- Message shown while device checks username/password in account unlock screen of keyguard --> + <string name="kg_login_checking_password">Checking account\u2026</string> + <!-- Message shown in dialog when max number of attempts are reached for PIN screen of keyguard --> + <string name="kg_too_many_failed_pin_attempts_dialog_message"> + You have incorrectly typed your PIN <xliff:g id="number">%d</xliff:g> times. + \n\nTry again in <xliff:g id="number">%d</xliff:g> seconds. + </string> + <!-- Message shown in dialog when max number of attempts are reached for password screen of keyguard --> + <string name="kg_too_many_failed_password_attempts_dialog_message"> + You have incorrectly typed your password <xliff:g id="number">%d</xliff:g> times. + \n\nTry again in <xliff:g id="number">%d</xliff:g> seconds. + </string> + <string name="kg_too_many_failed_pattern_attempts_dialog_message"> + You have incorrectly drawn your unlock pattern <xliff:g id="number">%d</xliff:g> times. + \n\nTry again in <xliff:g id="number">%d</xliff:g> seconds. + </string> + <!-- Message shown when user is almost at the limit of password attempts where the device will be wiped. --> + <string name="kg_failed_attempts_almost_at_wipe" product="tablet"> + You have incorrectly attempted to unlock the tablet <xliff:g id="number">%d</xliff:g> times. + After <xliff:g id="number">%d</xliff:g> more unsuccessful attempts, + the tablet will be reset to factory default and all user data will be lost. + </string> + <!-- Message shown when user is almost at the limit of password attempts where the device will be wiped. --> + <string name="kg_failed_attempts_almost_at_wipe" product="default"> + You have incorrectly attempted to unlock the phone <xliff:g id="number">%d</xliff:g> times. + After <xliff:g id="number">%d</xliff:g> more unsuccessful attempts, + the phone will be reset to factory default and all user data will be lost. + </string> + <!-- Message shown in dialog when user has exceeded the maximum attempts and the device will now be wiped --> + <string name="kg_failed_attempts_now_wiping" product="tablet"> + You have incorrectly attempted to unlock the tablet <xliff:g id="number">%d</xliff:g> times. + The tablet will now be reset to factory default. + </string> + <!-- Message shown in dialog when user has exceeded the maximum attempts and the device will now be wiped --> + <string name="kg_failed_attempts_now_wiping" product="default"> + You have incorrectly attempted to unlock the phone <xliff:g id="number">%d</xliff:g> times. + The phone will now be reset to factory default. + </string> + <!-- Message shown in dialog when user is almost at the limit where they will be + locked out and may have to enter an alternate username/password to unlock the phone --> + <string name="kg_failed_attempts_almost_at_login" product="tablet"> + You have incorrectly drawn your unlock pattern <xliff:g id="number">%d</xliff:g> times. + After <xliff:g id="number">%d</xliff:g> more unsuccessful attempts, + you will be asked to unlock your tablet using an email account.\n\n + Try again in <xliff:g id="number">%d</xliff:g> seconds. + </string> + <!-- Message shown in dialog when user is almost at the limit where they will be + locked out and may have to enter an alternate username/password to unlock the phone --> + <string name="kg_failed_attempts_almost_at_login" product="default"> + You have incorrectly drawn your unlock pattern <xliff:g id="number">%d</xliff:g> times. + After <xliff:g id="number">%d</xliff:g> more unsuccessful attempts, + you will be asked to unlock your phone using an email account.\n\n + Try again in <xliff:g id="number">%d</xliff:g> seconds. + </string> + <!-- Sequence of characters used to separate message strings in keyguard. Typically just em-dash + with spaces on either side. [CHAR LIMIT=3] --> + <string name="kg_text_message_separator" product="default">" \u2014 "</string> + <!-- The delete-widget drop target button text --> + <string name="kg_reordering_delete_drop_target_text">Remove</string> + + <!-- Transport control strings --> + <!-- Shown on transport control of lockscreen. Pressing button goes to previous track. --> + <string name="keyguard_transport_prev_description">Previous track button</string> + <!-- Shown on transport control of lockscreen. Pressing button goes to next track. --> + <string name="keyguard_transport_next_description">Next track button</string> + <!-- Shown on transport control of lockscreen. Pressing button pauses playback --> + <string name="keyguard_transport_pause_description">Pause button</string> + <!-- Shown on transport control of lockscreen. Pressing button pauses playback --> + <string name="keyguard_transport_play_description">Play button</string> + <!-- Shown on transport control of lockscreen. Pressing button pauses playback --> + <string name="keyguard_transport_stop_description">Stop button</string> + + <!-- On the keyguard screen, it shows the carrier the phone is connected to. + This is displayed if the phone is not connected to a carrier.--> + <string name="keyguard_carrier_default">No service.</string> + +</resources> diff --git a/packages/Keyguard/res/values/styles.xml b/packages/Keyguard/res/values/styles.xml new file mode 100644 index 0000000..16a3f3f --- /dev/null +++ b/packages/Keyguard/res/values/styles.xml @@ -0,0 +1,55 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +** +** Copyright 2012, 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> + <!-- Keyguard PIN pad styles --> + <style name="Widget.Button.NumPadKey" + parent="@android:style/Widget.Button"> + <item name="android:singleLine">true</item> + <item name="android:padding">6dip</item> + <item name="android:gravity">left|center_vertical</item> + <item name="android:background">?android:attr/selectableItemBackground</item> + <item name="android:textSize">34dp</item> + <item name="android:fontFamily">sans-serif</item> + <item name="android:textStyle">normal</item> + <item name="android:textColor">#ffffff</item> + <item name="android:paddingBottom">10dp</item> + <item name="android:paddingLeft">20dp</item> + </style> + <style name="TextAppearance.NumPadKey" + parent="@android:style/TextAppearance"> + <item name="android:textSize">34dp</item> + <item name="android:fontFamily">sans-serif</item> + <item name="android:textStyle">normal</item> + <item name="android:textColor">#ffffff</item> + </style> + <style name="TextAppearance.NumPadKey.Klondike"> + <item name="android:textSize">20dp</item> + <item name="android:fontFamily">sans-serif-condensed</item> + <item name="android:textStyle">normal</item> + <item name="android:textColor">#80ffffff</item> + </style> + + <!-- Standard animations for a non-full-screen window or activity. --> + <style name="Animation.LockScreen" parent="@android:style/Animation"> + <item name="android:windowEnterAnimation">@anim/lock_screen_enter</item> + <item name="android:windowExitAnimation">@anim/lock_screen_exit</item> + </style> + +</resources> diff --git a/packages/Keyguard/scripts/copy_profile_icons.sh b/packages/Keyguard/scripts/copy_profile_icons.sh new file mode 100755 index 0000000..5416101 --- /dev/null +++ b/packages/Keyguard/scripts/copy_profile_icons.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +for user in `adb $* shell ls /data/system/users | grep -v xml` +do + user=${user/$'\r'/} + adb shell mkdir /data/user/${user}/users + for photo in `adb $* shell ls /data/system/users | grep -v xml` + do + photo=${photo/$'\r'/} + adb shell mkdir /data/user/${user}/users/${photo} + adb pull /data/system/users/${photo}/photo.png + adb push photo.png /data/user/${user}/users/${photo} + done +done diff --git a/packages/Keyguard/scripts/new_merge.py b/packages/Keyguard/scripts/new_merge.py new file mode 100755 index 0000000..70fafec --- /dev/null +++ b/packages/Keyguard/scripts/new_merge.py @@ -0,0 +1,165 @@ +#!/usr/bin/env python + +import os +import sys +import difflib +import filecmp +import tempfile +from optparse import OptionParser +from subprocess import call +from subprocess import Popen +from subprocess import PIPE + +def which(program): + def executable(path): + return os.path.isfile(path) and os.access(path, os.X_OK) + + path, file = os.path.split(program) + if path and executable(program): + return program + else: + for path in os.environ["PATH"].split(os.pathsep): + exe = os.path.join(path, program) + if executable(exe): + return exe + return "" + +DIFF_TOOLS=["meld", "kdiff3", "xdiff", "diffmerge.sh", "diff"] + +PROTO_SRC="./src/com/android/keyguard/" +PROTO_RES="./res/" + +TEMP_FILE1="/tmp/tempFile1.txt" +TEMP_FILE2="/tmp/tempFile2.txt" + +FW_SRC="../../../../frameworks/base/policy/src/com/android/internal/policy/impl/keyguard/" +FW_RES="../../../../frameworks/base/core/res/res/" + +FW_PKG="com.android.internal.policy.impl.keyguard" +PROTO_PKG="com.android.keyguard" + +FW_RES_IMPORT="import com.android.internal.R;" + +# Find a differ +DIFF_TOOL="" +if ("DIFF_TOOL" in os.environ and len(os.environ["DIFF_TOOL"]) > 0): + DIFF_TOOL=which(os.environ["DIFF_TOOL"]) +if len(DIFF_TOOL) == 0: + for differ in DIFF_TOOLS: + DIFF_TOOL=which(differ) + if len(DIFF_TOOL) > 0: + break + +print "Using differ", DIFF_TOOL + +#Anything file which contains any string in this list as a substring will be ommitted +IGNORE=["LockHotnessActivity.java", "unified_lock_activity.xml", "optionmenu.xml"] +WATCH=[] + +def dirCompare(sourceDir, destDir, ext, run_in_reverse): + sourceFiles = getFileList(sourceDir, ext) + destFiles = getFileList(destDir, ext) + for file in sourceFiles: + print file + destFile = destDir + file + sourceFile = sourceDir + file + if (file in destFiles): + if run_in_reverse: + prepareFileForCompare(sourceFile, TEMP_FILE1, FW_RES_IMPORT, FW_PKG, PROTO_PKG) + prepareFileForCompare(destFile, TEMP_FILE2, FW_RES_IMPORT,) + else: + prepareFileForCompare(destFile, TEMP_FILE1, FW_RES_IMPORT, FW_PKG, PROTO_PKG) + prepareFileForCompare(sourceFile, TEMP_FILE2, FW_RES_IMPORT,) + if (filecmp.cmp(TEMP_FILE1, TEMP_FILE2)): + print "File %s is the same in proto and framework" %(file) + else: + print "Running diff for: %s" %(file) + diff(sourceFile, destFile) + else: + print "File %s does not exist in framework" %(file) + if not run_in_reverse: + diff(sourceFile, destFile) + +def main(argv): + run_in_reverse = False + if len(argv) > 1: + if argv[1] == '--help' or argv[1] == '-h': + print ('Usage: %s [<commit>]' % argv[0]) + print ('\tdiff to framework, ' + + 'optionally restricting to files in <commit>') + sys.exit(0) + elif argv[1] == '--reverse': + print "Running in reverse" + run_in_reverse = True + else: + print ("**** Pulling file list from: %s" % argv[1]) + pipe = Popen(['git', 'diff', '--name-only', argv[1]], stdout=PIPE).stdout + for line in iter(pipe.readline,''): + path = line.rstrip() + file = path[path.rfind('/') + 1:] + print '**** watching: %s' % file + WATCH.append(file); + pipe.close() + + if run_in_reverse: + #dirCompare(FW_RES, PROTO_RES, ".xml", run_in_reverse) + print ("**** Source files:") + dirCompare(FW_SRC, PROTO_SRC, ".java", run_in_reverse) + else: + #dirCompare(PROTO_RES, FW_RES, ".xml", run_in_reverse) + print ("**** Source files:") + dirCompare(PROTO_SRC, FW_SRC, ".java", run_in_reverse) + + if (os.path.exists(TEMP_FILE1)): + os.remove(TEMP_FILE1) + + if (os.path.exists(TEMP_FILE2)): + os.remove(TEMP_FILE2) + +def getFileList(rootdir, extension): + fileList = [] + + for root, subFolders, files in os.walk(rootdir): + for file in files: + f = os.path.join(root,file) + if (os.path.splitext(f)[1] == extension and (not inIgnore(f))): + fileList.append(f[len(rootdir):]) + return fileList + + +def prepareFileForCompare(inFile, outFile, skip="", replace="", withText=""): + # Delete the outfile, so we're starting with a new file + if (os.path.exists(outFile)): + os.remove(outFile) + + fin = open(inFile) + fout = open(outFile, "w") + for line in fin: + # Ignore any lines containing the ignore string ("import com.android.internal.R;) and + # ignore any lines containing only whitespace. + if (line.find(skip) < 0 and len(line.strip(' \t\n\r')) > 0): + # For comparison, for framework files, we replace the fw package with the + # proto package, since these aren't relevant. + if len(replace) > 0: + fout.write(line.replace(replace, withText)) + else: + fout.write(line) + fin.close() + fout.close() + +def diff(file1, file2): + call([DIFF_TOOL, file1, file2]) + +def inIgnore(file): + for ignore in IGNORE: + if file.find(ignore) >= 0: + return True + if len(WATCH) > 0: + for watch in WATCH: + if file.find(watch) >= 0: + return False + return True + return False + +if __name__=="__main__": + main(sys.argv) diff --git a/packages/Keyguard/src/com/android/keyguard/BiometricSensorUnlock.java b/packages/Keyguard/src/com/android/keyguard/BiometricSensorUnlock.java index e65a716..230ef81 100644 --- a/packages/Keyguard/src/com/android/keyguard/BiometricSensorUnlock.java +++ b/packages/Keyguard/src/com/android/keyguard/BiometricSensorUnlock.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.android.internal.policy.impl.keyguard; +package com.android.keyguard; import android.view.View; diff --git a/packages/Keyguard/src/com/android/keyguard/CameraWidgetFrame.java b/packages/Keyguard/src/com/android/keyguard/CameraWidgetFrame.java index 762711d..146c092 100644 --- a/packages/Keyguard/src/com/android/keyguard/CameraWidgetFrame.java +++ b/packages/Keyguard/src/com/android/keyguard/CameraWidgetFrame.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.android.internal.policy.impl.keyguard; +package com.android.keyguard; import android.content.Context; import android.content.pm.PackageManager.NameNotFoundException; @@ -33,8 +33,7 @@ import android.widget.FrameLayout; import android.widget.ImageView; import android.widget.ImageView.ScaleType; -import com.android.internal.R; -import com.android.internal.policy.impl.keyguard.KeyguardActivityLauncher.CameraWidgetInfo; +import com.android.keyguard.KeyguardActivityLauncher.CameraWidgetInfo; public class CameraWidgetFrame extends KeyguardWidgetFrame implements View.OnClickListener { private static final String TAG = CameraWidgetFrame.class.getSimpleName(); @@ -204,7 +203,7 @@ public class CameraWidgetFrame extends KeyguardWidgetFrame implements View.OnCli private static View inflateGenericWidgetView(Context context) { if (DEBUG) Log.d(TAG, "inflateGenericWidgetView"); ImageView iv = new ImageView(context); - iv.setImageResource(com.android.internal.R.drawable.ic_lockscreen_camera); + iv.setImageResource(R.drawable.ic_lockscreen_camera); iv.setScaleType(ScaleType.CENTER); iv.setBackgroundColor(Color.argb(127, 0, 0, 0)); return iv; @@ -423,7 +422,7 @@ public class CameraWidgetFrame extends KeyguardWidgetFrame implements View.OnCli if (!(lp instanceof WindowManager.LayoutParams)) return; WindowManager.LayoutParams wlp = (WindowManager.LayoutParams) lp; - int newWindowAnimations = isEnabled ? com.android.internal.R.style.Animation_LockScreen : 0; + int newWindowAnimations = isEnabled ? R.style.Animation_LockScreen : 0; if (newWindowAnimations != wlp.windowAnimations) { if (DEBUG) Log.d(TAG, "setting windowAnimations to: " + newWindowAnimations + " at " + SystemClock.uptimeMillis()); diff --git a/packages/Keyguard/src/com/android/keyguard/CarrierText.java b/packages/Keyguard/src/com/android/keyguard/CarrierText.java index a38e86d..9f0a042 100644 --- a/packages/Keyguard/src/com/android/keyguard/CarrierText.java +++ b/packages/Keyguard/src/com/android/keyguard/CarrierText.java @@ -14,14 +14,13 @@ * limitations under the License. */ -package com.android.internal.policy.impl.keyguard; +package com.android.keyguard; import android.content.Context; import android.text.TextUtils; import android.util.AttributeSet; import android.widget.TextView; -import com.android.internal.R; import com.android.internal.telephony.IccCardConstants; import com.android.internal.telephony.IccCardConstants.State; import com.android.internal.widget.LockPatternUtils; @@ -124,7 +123,7 @@ public class CarrierText extends TextView { case NetworkLocked: carrierText = makeCarrierStringOnEmergencyCapable( - mContext.getText(R.string.lockscreen_network_locked_message), plmn); + mContext.getText(R.string.keyguard_network_locked_message), plmn); break; case SimMissing: @@ -133,30 +132,30 @@ public class CarrierText extends TextView { // has some connectivity. Otherwise, it should be null or empty and just show // "No SIM card" carrierText = makeCarrierStringOnEmergencyCapable( - getContext().getText(R.string.lockscreen_missing_sim_message_short), + getContext().getText(R.string.keyguard_missing_sim_message_short), plmn); break; case SimPermDisabled: carrierText = getContext().getText( - R.string.lockscreen_permanent_disabled_sim_message_short); + R.string.keyguard_permanent_disabled_sim_message_short); break; case SimMissingLocked: carrierText = makeCarrierStringOnEmergencyCapable( - getContext().getText(R.string.lockscreen_missing_sim_message_short), + getContext().getText(R.string.keyguard_missing_sim_message_short), plmn); break; case SimLocked: carrierText = makeCarrierStringOnEmergencyCapable( - getContext().getText(R.string.lockscreen_sim_locked_message), + getContext().getText(R.string.keyguard_sim_locked_message), plmn); break; case SimPukLocked: carrierText = makeCarrierStringOnEmergencyCapable( - getContext().getText(R.string.lockscreen_sim_puk_locked_message), + getContext().getText(R.string.keyguard_sim_puk_locked_message), plmn); break; } @@ -232,19 +231,19 @@ public class CarrierText extends TextView { StatusMode status = getStatusForIccState(simState); switch (status) { case NetworkLocked: - carrierHelpTextId = R.string.lockscreen_instructions_when_pattern_disabled; + carrierHelpTextId = R.string.keyguard_instructions_when_pattern_disabled; break; case SimMissing: - carrierHelpTextId = R.string.lockscreen_missing_sim_instructions_long; + carrierHelpTextId = R.string.keyguard_missing_sim_instructions_long; break; case SimPermDisabled: - carrierHelpTextId = R.string.lockscreen_permanent_disabled_sim_instructions; + carrierHelpTextId = R.string.keyguard_permanent_disabled_sim_instructions; break; case SimMissingLocked: - carrierHelpTextId = R.string.lockscreen_missing_sim_instructions; + carrierHelpTextId = R.string.keyguard_missing_sim_instructions; break; case Normal: diff --git a/packages/Keyguard/src/com/android/keyguard/ChallengeLayout.java b/packages/Keyguard/src/com/android/keyguard/ChallengeLayout.java index 8ece559..677f1f1 100644 --- a/packages/Keyguard/src/com/android/keyguard/ChallengeLayout.java +++ b/packages/Keyguard/src/com/android/keyguard/ChallengeLayout.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.android.internal.policy.impl.keyguard; +package com.android.keyguard; /** * Interface implemented by ViewGroup-derived layouts that implement diff --git a/packages/Keyguard/src/com/android/keyguard/CheckLongPressHelper.java b/packages/Keyguard/src/com/android/keyguard/CheckLongPressHelper.java index 4825e23..52e7cd5 100644 --- a/packages/Keyguard/src/com/android/keyguard/CheckLongPressHelper.java +++ b/packages/Keyguard/src/com/android/keyguard/CheckLongPressHelper.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.android.internal.policy.impl.keyguard; +package com.android.keyguard; import android.view.MotionEvent; import android.view.View; diff --git a/packages/Keyguard/src/com/android/keyguard/ClockView.java b/packages/Keyguard/src/com/android/keyguard/ClockView.java index 6c701c7..c2930cb 100644 --- a/packages/Keyguard/src/com/android/keyguard/ClockView.java +++ b/packages/Keyguard/src/com/android/keyguard/ClockView.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.android.internal.policy.impl.keyguard; +package com.android.keyguard; import android.content.BroadcastReceiver; import android.content.Context; @@ -34,7 +34,6 @@ import android.widget.TextView; import java.lang.ref.WeakReference; import java.text.DateFormatSymbols; import java.util.Calendar; -import com.android.internal.R; /** * Displays the time diff --git a/packages/Keyguard/src/com/android/keyguard/EmergencyButton.java b/packages/Keyguard/src/com/android/keyguard/EmergencyButton.java index cd7324c..3871cea 100644 --- a/packages/Keyguard/src/com/android/keyguard/EmergencyButton.java +++ b/packages/Keyguard/src/com/android/keyguard/EmergencyButton.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.android.internal.policy.impl.keyguard; +package com.android.keyguard; import android.content.Context; import android.content.Intent; diff --git a/packages/Keyguard/src/com/android/keyguard/FaceUnlock.java b/packages/Keyguard/src/com/android/keyguard/FaceUnlock.java index e58eb5b..689366b 100644 --- a/packages/Keyguard/src/com/android/keyguard/FaceUnlock.java +++ b/packages/Keyguard/src/com/android/keyguard/FaceUnlock.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.android.internal.policy.impl.keyguard; +package com.android.keyguard; import com.android.internal.policy.IFaceLockCallback; import com.android.internal.policy.IFaceLockInterface; diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardAbsKeyInputView.java b/packages/Keyguard/src/com/android/keyguard/KeyguardAbsKeyInputView.java index cc520dc..fb2eeda 100644 --- a/packages/Keyguard/src/com/android/keyguard/KeyguardAbsKeyInputView.java +++ b/packages/Keyguard/src/com/android/keyguard/KeyguardAbsKeyInputView.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.android.internal.policy.impl.keyguard; +package com.android.keyguard; import android.content.Context; import android.graphics.Rect; @@ -32,7 +32,6 @@ import android.widget.LinearLayout; import android.widget.TextView; import android.widget.TextView.OnEditorActionListener; -import com.android.internal.R; import com.android.internal.widget.LockPatternUtils; /** diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardAccountView.java b/packages/Keyguard/src/com/android/keyguard/KeyguardAccountView.java index e0e7128..6b8be69 100644 --- a/packages/Keyguard/src/com/android/keyguard/KeyguardAccountView.java +++ b/packages/Keyguard/src/com/android/keyguard/KeyguardAccountView.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.android.internal.policy.impl.keyguard; +package com.android.keyguard; import android.accounts.Account; import android.accounts.AccountManager; @@ -41,7 +41,6 @@ import android.widget.EditText; import android.widget.LinearLayout; import com.android.internal.widget.LockPatternUtils; -import com.android.internal.R; import java.io.IOException; diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardActivityLauncher.java b/packages/Keyguard/src/com/android/keyguard/KeyguardActivityLauncher.java index 6539db3..9a1aa5b 100644 --- a/packages/Keyguard/src/com/android/keyguard/KeyguardActivityLauncher.java +++ b/packages/Keyguard/src/com/android/keyguard/KeyguardActivityLauncher.java @@ -14,7 +14,9 @@ * limitations under the License. */ -package com.android.internal.policy.impl.keyguard; +package com.android.keyguard; + +import com.android.internal.widget.LockPatternUtils; import android.app.ActivityManagerNative; import android.app.ActivityOptions; @@ -35,8 +37,7 @@ import android.provider.MediaStore; import android.util.Log; import android.view.WindowManager; -import com.android.internal.policy.impl.keyguard.KeyguardHostView.OnDismissAction; -import com.android.internal.widget.LockPatternUtils; +import com.android.keyguard.KeyguardHostView.OnDismissAction; import java.util.List; diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardCircleFramedDrawable.java b/packages/Keyguard/src/com/android/keyguard/KeyguardCircleFramedDrawable.java index 79b66f4..ed3faea 100644 --- a/packages/Keyguard/src/com/android/keyguard/KeyguardCircleFramedDrawable.java +++ b/packages/Keyguard/src/com/android/keyguard/KeyguardCircleFramedDrawable.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.android.internal.policy.impl.keyguard; +package com.android.keyguard; import android.graphics.Bitmap; import android.graphics.Canvas; diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardFaceUnlockView.java b/packages/Keyguard/src/com/android/keyguard/KeyguardFaceUnlockView.java index 4df434c..041f7f2 100644 --- a/packages/Keyguard/src/com/android/keyguard/KeyguardFaceUnlockView.java +++ b/packages/Keyguard/src/com/android/keyguard/KeyguardFaceUnlockView.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.android.internal.policy.impl.keyguard; +package com.android.keyguard; import android.content.Context; import android.graphics.drawable.Drawable; @@ -25,8 +25,6 @@ import android.view.View; import android.widget.ImageButton; import android.widget.LinearLayout; -import com.android.internal.R; - import com.android.internal.widget.LockPatternUtils; public class KeyguardFaceUnlockView extends LinearLayout implements KeyguardSecurityView { diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardGlowStripView.java b/packages/Keyguard/src/com/android/keyguard/KeyguardGlowStripView.java index e1c95f0..98a44a6 100644 --- a/packages/Keyguard/src/com/android/keyguard/KeyguardGlowStripView.java +++ b/packages/Keyguard/src/com/android/keyguard/KeyguardGlowStripView.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.android.internal.policy.impl.keyguard; +package com.android.keyguard; import android.animation.Animator; import android.animation.AnimatorListenerAdapter; @@ -29,8 +29,6 @@ import android.view.animation.Interpolator; import android.view.animation.LinearInterpolator; import android.widget.LinearLayout; -import com.android.internal.R; - /** * A layout which animates a strip of horizontal, pulsing dots on request. This is used * to indicate the presence of pages to the left / right. diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardHostView.java b/packages/Keyguard/src/com/android/keyguard/KeyguardHostView.java index 06f06b5..544f18a 100644 --- a/packages/Keyguard/src/com/android/keyguard/KeyguardHostView.java +++ b/packages/Keyguard/src/com/android/keyguard/KeyguardHostView.java @@ -14,7 +14,10 @@ * limitations under the License. */ -package com.android.internal.policy.impl.keyguard; +package com.android.keyguard; + +import com.android.internal.widget.LockPatternUtils; +import com.android.keyguard.KeyguardSecurityModel.SecurityMode; import android.app.Activity; import android.app.ActivityManager; @@ -53,10 +56,6 @@ import android.view.WindowManager; import android.view.animation.AnimationUtils; import android.widget.RemoteViews.OnClickHandler; -import com.android.internal.R; -import com.android.internal.policy.impl.keyguard.KeyguardSecurityModel.SecurityMode; -import com.android.internal.widget.LockPatternUtils; - import java.io.File; import java.util.List; @@ -512,7 +511,7 @@ public class KeyguardHostView extends KeyguardViewBase { final AlertDialog dialog = new AlertDialog.Builder(mContext) .setTitle(title) .setMessage(message) - .setNeutralButton(com.android.internal.R.string.ok, null) + .setNeutralButton(R.string.ok, null) .create(); if (!(mContext instanceof Activity)) { dialog.getWindow().setType(WindowManager.LayoutParams.TYPE_KEYGUARD_DIALOG); @@ -863,8 +862,7 @@ public class KeyguardHostView extends KeyguardViewBase { KeyguardSecurityView newView = getSecurityView(securityMode); // Enter full screen mode if we're in SIM or Account screen - boolean fullScreenEnabled = getResources().getBoolean( - com.android.internal.R.bool.kg_sim_puk_account_full_screen); + boolean fullScreenEnabled = getResources().getBoolean(R.bool.kg_sim_puk_account_full_screen); boolean isSimOrAccount = securityMode == SecurityMode.SimPin || securityMode == SecurityMode.SimPuk || securityMode == SecurityMode.Account; @@ -1551,19 +1549,12 @@ public class KeyguardHostView extends KeyguardViewBase { private static final String ENABLE_MENU_KEY_FILE = "/data/local/enable_menu_key"; private boolean shouldEnableMenuKey() { final Resources res = getResources(); - final boolean configDisabled = res.getBoolean( - com.android.internal.R.bool.config_disableMenuKeyInLockScreen); + final boolean configDisabled = res.getBoolean(R.bool.config_disableMenuKeyInLockScreen); final boolean isTestHarness = ActivityManager.isRunningInTestHarness(); final boolean fileOverride = (new File(ENABLE_MENU_KEY_FILE)).exists(); return !configDisabled || isTestHarness || fileOverride; } - - - public void goToUserSwitcher() { - mAppWidgetContainer.setCurrentPage(getWidgetPosition(R.id.keyguard_multi_user_selector)); - } - public void goToWidget(int appWidgetId) { mAppWidgetToShow = appWidgetId; mSwitchPageRunnable.run(); diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardLinearLayout.java b/packages/Keyguard/src/com/android/keyguard/KeyguardLinearLayout.java index 0fc54cd..343fdcb 100644 --- a/packages/Keyguard/src/com/android/keyguard/KeyguardLinearLayout.java +++ b/packages/Keyguard/src/com/android/keyguard/KeyguardLinearLayout.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.android.internal.policy.impl.keyguard; +package com.android.keyguard; import android.content.Context; import android.util.AttributeSet; diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardMessageArea.java b/packages/Keyguard/src/com/android/keyguard/KeyguardMessageArea.java index 77359ff..194162a 100644 --- a/packages/Keyguard/src/com/android/keyguard/KeyguardMessageArea.java +++ b/packages/Keyguard/src/com/android/keyguard/KeyguardMessageArea.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.android.internal.policy.impl.keyguard; +package com.android.keyguard; import android.animation.Animator; import android.animation.AnimatorListenerAdapter; @@ -35,9 +35,6 @@ import android.widget.TextView; import libcore.util.MutableInt; import java.lang.ref.WeakReference; - -import com.android.internal.R; - /*** * Manages a number of views inside of the given layout. See below for a list of widgets. */ @@ -242,13 +239,12 @@ class KeyguardMessageArea extends TextView { if (mCharging) { // Charging, charged or waiting to charge. string = getContext().getString(mBatteryCharged - ? com.android.internal.R.string.lockscreen_charged - : com.android.internal.R.string.lockscreen_plugged_in, mBatteryLevel); + ? R.string.keyguard_charged + : R.string.keyguard_plugged_in, mBatteryLevel); icon.value = CHARGING_ICON; } else if (mBatteryIsLow) { // Battery is low - string = getContext().getString( - com.android.internal.R.string.lockscreen_low_battery); + string = getContext().getString(R.string.keyguard_low_battery); icon.value = BATTERY_LOW_ICON; } } diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardMultiUserAvatar.java b/packages/Keyguard/src/com/android/keyguard/KeyguardMultiUserAvatar.java index 9d1f041..7ef5b26 100644 --- a/packages/Keyguard/src/com/android/keyguard/KeyguardMultiUserAvatar.java +++ b/packages/Keyguard/src/com/android/keyguard/KeyguardMultiUserAvatar.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.android.internal.policy.impl.keyguard; +package com.android.keyguard; import android.animation.Animator; import android.animation.AnimatorListenerAdapter; @@ -26,6 +26,7 @@ import android.content.res.Resources; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Color; +import android.os.UserManager; import android.util.AttributeSet; import android.util.Log; import android.view.LayoutInflater; @@ -34,8 +35,6 @@ import android.widget.FrameLayout; import android.widget.ImageView; import android.widget.TextView; -import com.android.internal.R; - class KeyguardMultiUserAvatar extends FrameLayout { private static final String TAG = KeyguardMultiUserAvatar.class.getSimpleName(); private static final boolean DEBUG = KeyguardHostView.DEBUG; @@ -70,6 +69,7 @@ class KeyguardMultiUserAvatar extends FrameLayout { private KeyguardMultiUserSelectorView mUserSelector; private KeyguardCircleFramedDrawable mFramed; private boolean mPressLock; + private UserManager mUserManager; public static KeyguardMultiUserAvatar fromXml(int resId, Context context, KeyguardMultiUserSelectorView userSelector, UserInfo info) { @@ -104,6 +104,7 @@ class KeyguardMultiUserAvatar extends FrameLayout { mActiveScale = ACTIVE_SCALE; mActiveAlpha = ACTIVE_ALPHA; mInactiveAlpha = INACTIVE_ALPHA; + mUserManager = (UserManager) mContext.getSystemService(Context.USER_SERVICE); mTouched = false; @@ -111,9 +112,6 @@ class KeyguardMultiUserAvatar extends FrameLayout { } protected String rewriteIconPath(String path) { - if (!this.getClass().getName().contains("internal")) { - return path.replace("system", "data"); - } return path; } @@ -124,16 +122,12 @@ class KeyguardMultiUserAvatar extends FrameLayout { mUserImage = (ImageView) findViewById(R.id.keyguard_user_avatar); mUserName = (TextView) findViewById(R.id.keyguard_user_name); - Bitmap icon = null; - try { - icon = BitmapFactory.decodeFile(rewriteIconPath(user.iconPath)); - } catch (Exception e) { - if (DEBUG) Log.d(TAG, "failed to open profile icon " + user.iconPath, e); - } + Bitmap icon = mUserManager.getUserIcon(user.id); if (icon == null) { + if (DEBUG) Log.w(TAG, "Couldn't get user icon for user id " + user.id); icon = BitmapFactory.decodeResource(mContext.getResources(), - com.android.internal.R.drawable.ic_contact_picture); + R.drawable.ic_contact_picture); } mFramed = new KeyguardCircleFramedDrawable(icon, (int) mIconSize, mFrameColor, mStroke, diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardMultiUserSelectorView.java b/packages/Keyguard/src/com/android/keyguard/KeyguardMultiUserSelectorView.java index f9ea5bb..7975d8e 100644 --- a/packages/Keyguard/src/com/android/keyguard/KeyguardMultiUserSelectorView.java +++ b/packages/Keyguard/src/com/android/keyguard/KeyguardMultiUserSelectorView.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.android.internal.policy.impl.keyguard; +package com.android.keyguard; import android.app.ActivityManagerNative; import android.content.Context; @@ -27,8 +27,6 @@ import android.view.View; import android.view.ViewGroup; import android.widget.FrameLayout; -import com.android.internal.R; - import java.util.ArrayList; import java.util.Collection; import java.util.Collections; @@ -154,15 +152,11 @@ public class KeyguardMultiUserSelectorView extends FrameLayout implements View.O @Override public void run() { mActiveUserAvatar = avatar; - if (this.getClass().getName().contains("internal")) { - try { - ActivityManagerNative.getDefault() - .switchUser(avatar.getUserInfo().id); - } catch (RemoteException re) { - Log.e(TAG, "Couldn't switch user " + re); - } - } else { - setAllClickable(true); + try { + ActivityManagerNative.getDefault() + .switchUser(avatar.getUserInfo().id); + } catch (RemoteException re) { + Log.e(TAG, "Couldn't switch user " + re); } } }); diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardPINView.java b/packages/Keyguard/src/com/android/keyguard/KeyguardPINView.java index fa80352..3d1c3f3 100644 --- a/packages/Keyguard/src/com/android/keyguard/KeyguardPINView.java +++ b/packages/Keyguard/src/com/android/keyguard/KeyguardPINView.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.android.internal.policy.impl.keyguard; +package com.android.keyguard; import android.content.Context; import android.text.Editable; @@ -25,8 +25,6 @@ import android.util.AttributeSet; import android.view.View; import android.widget.TextView.OnEditorActionListener; -import com.android.internal.R; - /** * Displays a PIN pad for unlocking. */ diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardPasswordView.java b/packages/Keyguard/src/com/android/keyguard/KeyguardPasswordView.java index d52c993..4e3568b 100644 --- a/packages/Keyguard/src/com/android/keyguard/KeyguardPasswordView.java +++ b/packages/Keyguard/src/com/android/keyguard/KeyguardPasswordView.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.android.internal.policy.impl.keyguard; +package com.android.keyguard; import android.app.admin.DevicePolicyManager; import android.content.Context; @@ -31,7 +31,6 @@ import android.view.inputmethod.InputMethodManager; import android.view.inputmethod.InputMethodSubtype; import android.widget.TextView.OnEditorActionListener; -import com.android.internal.R; import com.android.internal.widget.PasswordEntryKeyboardHelper; import com.android.internal.widget.PasswordEntryKeyboardView; diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardPatternView.java b/packages/Keyguard/src/com/android/keyguard/KeyguardPatternView.java index e114b78..e7f1259 100644 --- a/packages/Keyguard/src/com/android/keyguard/KeyguardPatternView.java +++ b/packages/Keyguard/src/com/android/keyguard/KeyguardPatternView.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.android.internal.policy.impl.keyguard; +package com.android.keyguard; import android.accounts.Account; import android.accounts.AccountManager; @@ -37,7 +37,6 @@ import android.widget.LinearLayout; import com.android.internal.widget.LockPatternUtils; import com.android.internal.widget.LockPatternView; -import com.android.internal.R; import java.io.IOException; import java.util.List; diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityCallback.java b/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityCallback.java index 7e6c108..4f139ad 100644 --- a/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityCallback.java +++ b/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityCallback.java @@ -13,9 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.android.internal.policy.impl.keyguard; +package com.android.keyguard; -import com.android.internal.policy.impl.keyguard.KeyguardHostView.OnDismissAction; +import com.android.keyguard.KeyguardHostView.OnDismissAction; public interface KeyguardSecurityCallback { diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityContainer.java b/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityContainer.java index 375a96a..9d03c6a 100644 --- a/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityContainer.java +++ b/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityContainer.java @@ -1,12 +1,10 @@ -package com.android.internal.policy.impl.keyguard; +package com.android.keyguard; import android.content.Context; import android.util.AttributeSet; import android.view.View; import android.widget.FrameLayout; -import com.android.internal.R; - public class KeyguardSecurityContainer extends FrameLayout { public KeyguardSecurityContainer(Context context, AttributeSet attrs) { this(context, attrs, 0); diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityModel.java b/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityModel.java index 7a69586..4129e33 100644 --- a/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityModel.java +++ b/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityModel.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.android.internal.policy.impl.keyguard; +package com.android.keyguard; import android.app.admin.DevicePolicyManager; import android.content.Context; diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityView.java b/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityView.java index a3ac39c..dfeacf3 100644 --- a/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityView.java +++ b/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityView.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.android.internal.policy.impl.keyguard; +package com.android.keyguard; import com.android.internal.widget.LockPatternUtils; diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityViewFlipper.java b/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityViewFlipper.java index aa31b00..70a0e44 100644 --- a/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityViewFlipper.java +++ b/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityViewFlipper.java @@ -14,10 +14,7 @@ * limitations under the License. */ -package com.android.internal.policy.impl.keyguard; - -import com.android.internal.R; -import com.android.internal.widget.LockPatternUtils; +package com.android.keyguard; import android.content.Context; import android.content.res.TypedArray; @@ -32,6 +29,8 @@ import android.view.WindowManager; import android.widget.FrameLayout; import android.widget.ViewFlipper; +import com.android.internal.widget.LockPatternUtils; + /** * Subclass of the current view flipper that allows us to overload dispatchTouchEvent() so * we can emulate {@link WindowManager.LayoutParams#FLAG_SLIPPERY} within a view hierarchy. diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityViewHelper.java b/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityViewHelper.java index 3d59f8d..67a6f52 100644 --- a/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityViewHelper.java +++ b/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityViewHelper.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.android.internal.policy.impl.keyguard; +package com.android.keyguard; import android.animation.Animator; import android.animation.AnimatorListenerAdapter; diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardSelectorView.java b/packages/Keyguard/src/com/android/keyguard/KeyguardSelectorView.java index 6859042..4d891be 100644 --- a/packages/Keyguard/src/com/android/keyguard/KeyguardSelectorView.java +++ b/packages/Keyguard/src/com/android/keyguard/KeyguardSelectorView.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.android.internal.policy.impl.keyguard; +package com.android.keyguard; import android.animation.ObjectAnimator; import android.app.SearchManager; @@ -34,7 +34,6 @@ import com.android.internal.telephony.IccCardConstants.State; import com.android.internal.widget.LockPatternUtils; import com.android.internal.widget.multiwaveview.GlowPadView; import com.android.internal.widget.multiwaveview.GlowPadView.OnTriggerListener; -import com.android.internal.R; public class KeyguardSelectorView extends LinearLayout implements KeyguardSecurityView { private static final boolean DEBUG = KeyguardHostView.DEBUG; @@ -58,7 +57,7 @@ public class KeyguardSelectorView extends LinearLayout implements KeyguardSecuri public void onTrigger(View v, int target) { final int resId = mGlowPadView.getResourceIdForTarget(target); switch (resId) { - case com.android.internal.R.drawable.ic_action_assist_generic: + case R.drawable.ic_action_assist_generic: Intent assistIntent = ((SearchManager) mContext.getSystemService(Context.SEARCH_SERVICE)) .getAssistIntent(mContext, true, UserHandle.USER_CURRENT); @@ -70,13 +69,13 @@ public class KeyguardSelectorView extends LinearLayout implements KeyguardSecuri mCallback.userActivity(0); break; - case com.android.internal.R.drawable.ic_lockscreen_camera: + case R.drawable.ic_lockscreen_camera: mActivityLauncher.launchCamera(null, null); mCallback.userActivity(0); break; - case com.android.internal.R.drawable.ic_lockscreen_unlock_phantom: - case com.android.internal.R.drawable.ic_lockscreen_unlock: + case R.drawable.ic_lockscreen_unlock_phantom: + case R.drawable.ic_lockscreen_unlock: mCallback.userActivity(0); mCallback.dismiss(false); break; @@ -179,9 +178,9 @@ public class KeyguardSelectorView extends LinearLayout implements KeyguardSecuri final KeyguardUpdateMonitor monitor = KeyguardUpdateMonitor.getInstance(getContext()); boolean disabledBySimState = monitor.isSimLocked(); boolean cameraTargetPresent = - isTargetPresent(com.android.internal.R.drawable.ic_lockscreen_camera); + isTargetPresent(R.drawable.ic_lockscreen_camera); boolean searchTargetPresent = - isTargetPresent(com.android.internal.R.drawable.ic_action_assist_generic); + isTargetPresent(R.drawable.ic_action_assist_generic); if (cameraDisabledByAdmin) { Log.v(TAG, "Camera disabled by Device Policy"); @@ -214,21 +213,17 @@ public class KeyguardSelectorView extends LinearLayout implements KeyguardSecuri // DON'T USE IT! ComponentName component = intent.getComponent(); boolean replaced = mGlowPadView.replaceTargetDrawablesIfPresent(component, - ASSIST_ICON_METADATA_NAME + "_google", - com.android.internal.R.drawable.ic_action_assist_generic); + ASSIST_ICON_METADATA_NAME + "_google", R.drawable.ic_action_assist_generic); if (!replaced && !mGlowPadView.replaceTargetDrawablesIfPresent(component, - ASSIST_ICON_METADATA_NAME, - com.android.internal.R.drawable.ic_action_assist_generic)) { + ASSIST_ICON_METADATA_NAME, R.drawable.ic_action_assist_generic)) { Slog.w(TAG, "Couldn't grab icon from package " + component); } } } - mGlowPadView.setEnableTarget(com.android.internal.R.drawable - .ic_lockscreen_camera, !mCameraDisabled); - mGlowPadView.setEnableTarget(com.android.internal.R.drawable - .ic_action_assist_generic, !mSearchDisabled); + mGlowPadView.setEnableTarget(R.drawable.ic_lockscreen_camera, !mCameraDisabled); + mGlowPadView.setEnableTarget(R.drawable.ic_action_assist_generic, !mSearchDisabled); } void doTransition(View view, float to) { diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardService.java b/packages/Keyguard/src/com/android/keyguard/KeyguardService.java new file mode 100644 index 0000000..8fb3923 --- /dev/null +++ b/packages/Keyguard/src/com/android/keyguard/KeyguardService.java @@ -0,0 +1,127 @@ +/* + * Copyright (C) 2010 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. + */ + +package com.android.keyguard; + +import java.io.FileDescriptor; +import java.io.PrintWriter; + +import android.app.Service; +import android.content.Intent; +import android.os.Bundle; +import android.os.IBinder; +import android.util.Log; +import android.view.accessibility.AccessibilityManager; + +import com.android.internal.policy.IKeyguardService; +import com.android.internal.policy.IKeyguardResult; +import com.android.internal.widget.LockPatternUtils; + +public class KeyguardService extends Service { + static final String TAG = "KeyguardService"; + private KeyguardViewMediator mKeyguardViewMediator; + + @Override + public void onCreate() { + if (mKeyguardViewMediator == null) { + mKeyguardViewMediator = new KeyguardViewMediator( + KeyguardService.this, new LockPatternUtils(KeyguardService.this)); + } + Log.v(TAG, "onCreate()"); + } + + @Override + public IBinder onBind(Intent intent) { + return mBinder; + } + + @Override + protected void dump(FileDescriptor fd, PrintWriter pw, String[] args) { + // TODO + } + + private final IKeyguardService.Stub mBinder = new IKeyguardService.Stub() { + public boolean isShowing() { + return mKeyguardViewMediator.isShowing(); + } + public boolean isSecure() { + return mKeyguardViewMediator.isSecure(); + } + public boolean isShowingAndNotHidden() { + return mKeyguardViewMediator.isShowingAndNotHidden(); + } + public boolean isInputRestricted() { + return mKeyguardViewMediator.isInputRestricted(); + } + public void userActivity() { + mKeyguardViewMediator.userActivity(); + } + public void verifyUnlock(IKeyguardResult result) { + mKeyguardViewMediator.verifyUnlock(result); + } + public void keyguardDone(boolean authenticated, boolean wakeup) { + mKeyguardViewMediator.keyguardDone(authenticated, wakeup); + } + public void setHidden(boolean isHidden) { + mKeyguardViewMediator.setHidden(isHidden); + } + public void dismiss() { + mKeyguardViewMediator.dismiss(); + } + public void onWakeKeyWhenKeyguardShowingTq(int keyCode) { + mKeyguardViewMediator.onWakeKeyWhenKeyguardShowingTq(keyCode); + } + public void onWakeMotionWhenKeyguardShowingTq() { + mKeyguardViewMediator.onWakeMotionWhenKeyguardShowingTq(); + } + public void onDreamingStarted() { + mKeyguardViewMediator.onDreamingStarted(); + } + public void onDreamingStopped() { + mKeyguardViewMediator.onDreamingStopped(); + } + public void onScreenTurnedOff(int reason) { + mKeyguardViewMediator.onScreenTurnedOff(reason); + } + public void onScreenTurnedOn(IKeyguardResult result) { + mKeyguardViewMediator.onScreenTurnedOn(result); + } + public void setKeyguardEnabled(boolean enabled) { + mKeyguardViewMediator.setKeyguardEnabled(enabled); + } + public boolean isDismissable() { + return mKeyguardViewMediator.isDismissable(); + } + public void onSystemReady() { + // Tell the accessibility layer that this process will + // run as the current user, i.e. run across users. + AccessibilityManager.createAsSharedAcrossUsers(KeyguardService.this); + + mKeyguardViewMediator.onSystemReady(); + } + public void doKeyguardTimeout(Bundle options) { + mKeyguardViewMediator.doKeyguardTimeout(options); + } + public void setCurrentUser(int userId) { + mKeyguardViewMediator.setCurrentUser(userId); + } + public void showAssistant() { + mKeyguardViewMediator.showAssistant(); + } + }; + +} + diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardSimPinView.java b/packages/Keyguard/src/com/android/keyguard/KeyguardSimPinView.java index ab364ee..865a7c4 100644 --- a/packages/Keyguard/src/com/android/keyguard/KeyguardSimPinView.java +++ b/packages/Keyguard/src/com/android/keyguard/KeyguardSimPinView.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.android.internal.policy.impl.keyguard; +package com.android.keyguard; import com.android.internal.telephony.ITelephony; @@ -33,8 +33,6 @@ import android.view.View; import android.view.WindowManager; import android.widget.TextView.OnEditorActionListener; -import com.android.internal.R; - /** * Displays a PIN pad for unlocking. */ diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardSimPukView.java b/packages/Keyguard/src/com/android/keyguard/KeyguardSimPukView.java index e5b4b73..7424fab 100644 --- a/packages/Keyguard/src/com/android/keyguard/KeyguardSimPukView.java +++ b/packages/Keyguard/src/com/android/keyguard/KeyguardSimPukView.java @@ -13,12 +13,15 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.android.internal.policy.impl.keyguard; +package com.android.keyguard; + +import com.android.internal.telephony.ITelephony; + +import android.content.Context; import android.app.Activity; import android.app.Dialog; import android.app.ProgressDialog; -import android.content.Context; import android.os.RemoteException; import android.os.ServiceManager; import android.text.Editable; @@ -30,10 +33,6 @@ import android.view.View; import android.view.WindowManager; import android.widget.TextView.OnEditorActionListener; -import com.android.internal.telephony.ITelephony; - -import com.android.internal.R; - /** * Displays a PIN pad for entering a PUK (Pin Unlock Kode) provided by a carrier. */ @@ -72,8 +71,7 @@ public class KeyguardSimPukView extends KeyguardAbsKeyInputView } else if (state == CONFIRM_PIN) { if (confirmPin()) { state = DONE; - msg = - com.android.internal.R.string.lockscreen_sim_unlock_progress_dialog_message; + msg = R.string.keyguard_sim_unlock_progress_dialog_message; updateSim(); } else { state = ENTER_PIN; // try again? diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardStatusView.java b/packages/Keyguard/src/com/android/keyguard/KeyguardStatusView.java index d938cec..29f76f3 100644 --- a/packages/Keyguard/src/com/android/keyguard/KeyguardStatusView.java +++ b/packages/Keyguard/src/com/android/keyguard/KeyguardStatusView.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.android.internal.policy.impl.keyguard; +package com.android.keyguard; import android.content.Context; import android.content.res.Resources; @@ -26,7 +26,6 @@ import android.view.View; import android.widget.GridLayout; import android.widget.TextView; -import com.android.internal.R; import com.android.internal.widget.LockPatternUtils; import java.text.SimpleDateFormat; @@ -40,7 +39,7 @@ public class KeyguardStatusView extends GridLayout { private static final String TAG = "KeyguardStatusView"; public static final int LOCK_ICON = 0; // R.drawable.ic_lock_idle_lock; - public static final int ALARM_ICON = com.android.internal.R.drawable.ic_lock_idle_alarm; + public static final int ALARM_ICON = R.drawable.ic_lock_idle_alarm; public static final int CHARGING_ICON = 0; //R.drawable.ic_lock_idle_charging; public static final int BATTERY_LOW_ICON = 0; //R.drawable.ic_lock_idle_low_battery; @@ -84,8 +83,7 @@ public class KeyguardStatusView extends GridLayout { super.onFinishInflate(); Resources res = getContext().getResources(); final Locale locale = Locale.getDefault(); - final String datePattern = - res.getString(com.android.internal.R.string.system_ui_date_pattern); + final String datePattern = res.getString(R.string.system_ui_date_pattern); final String bestFormat = ICU.getBestDateTimePattern(datePattern, locale.toString()); mDateFormat = new SimpleDateFormat(bestFormat, locale); mDateView = (TextView) findViewById(R.id.date); diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardStatusViewManager.java b/packages/Keyguard/src/com/android/keyguard/KeyguardStatusViewManager.java new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/packages/Keyguard/src/com/android/keyguard/KeyguardStatusViewManager.java diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardTestActivity.java b/packages/Keyguard/src/com/android/keyguard/KeyguardTestActivity.java new file mode 100644 index 0000000..3deaeed --- /dev/null +++ b/packages/Keyguard/src/com/android/keyguard/KeyguardTestActivity.java @@ -0,0 +1,350 @@ +/* + * Copyright (C) 2012 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. + */ + +package com.android.keyguard; + +import com.android.internal.policy.IKeyguardResult; +import com.android.internal.policy.IKeyguardService; + +import android.app.Activity; +import android.app.AlertDialog; +import android.app.admin.DevicePolicyManager; +import android.content.ComponentName; +import android.content.Context; +import android.content.Intent; +import android.content.ServiceConnection; +import android.os.Bundle; +import android.os.IBinder; +import android.os.RemoteException; +import android.os.SystemClock; +import android.provider.Settings; +import android.util.Log; +import android.view.Menu; +import android.view.MenuInflater; +import android.view.MenuItem; +import android.view.View; +import android.view.View.OnClickListener; +import android.view.WindowManagerPolicy; + +import com.android.internal.widget.LockPatternUtils; +import com.android.internal.widget.LockPatternView.Cell; + +import java.util.List; + +public class KeyguardTestActivity extends Activity implements OnClickListener { + private static final String KEYGUARD_PACKAGE = "com.android.keyguard"; + private static final String KEYGUARD_CLASS = "com.android.keyguard.KeyguardService"; + private static final String TAG = "LockScreenTestActivity"; + private static final int MODE_NONE = 0; + private static final int MODE_PIN = 1; + private static final int MODE_PASSWORD = 2; + private static final int MODE_PATTERN = 3; + private static final int MODE_SIM_PIN = 4; + private static final int MODE_SIM_PUK = 5; + private static final String SECURITY_MODE = "security_mode"; + + IKeyguardService mService = null; + + KeyguardResult mKeyguardResult = new KeyguardResult(); + RemoteServiceConnection mConnection; + private boolean mSentSystemReady; + + class KeyguardResult extends IKeyguardResult.Stub { + + @Override + public void onShown(IBinder windowToken) throws RemoteException { + Log.v(TAG, "Keyguard is shown, windowToken = " + windowToken); + } + + @Override + public void onKeyguardExitResult(boolean success) throws RemoteException { + new AlertDialog.Builder(KeyguardTestActivity.this) + .setMessage("Result: " + success) + .setPositiveButton("OK", null) + .show(); + } + + }; + + private class RemoteServiceConnection implements ServiceConnection { + public void onServiceConnected(ComponentName className, IBinder service) { + Log.v(TAG, "onServiceConnected()"); + mService = IKeyguardService.Stub.asInterface(service); + try { + mService.asBinder().linkToDeath(new IBinder.DeathRecipient() { + @Override + public void binderDied() { + new AlertDialog.Builder(KeyguardTestActivity.this) + .setMessage("Oops! Keygued died") + .setPositiveButton("OK", null) + .show(); + } + }, 0); + } catch (RemoteException e) { + Log.w(TAG, "Couldn't linkToDeath"); + e.printStackTrace(); + } +// try { +// mService.onSystemReady(); +// } catch (RemoteException e) { +// Log.v(TAG, "Remote service died trying to call onSystemReady"); +// e.printStackTrace(); +// } + } + + public void onServiceDisconnected(ComponentName className) { + Log.v(TAG, "onServiceDisconnected()"); + mService = null; + } + }; + + private void bindService() { + if (mConnection == null) { + mConnection = new RemoteServiceConnection(); + Intent intent = new Intent(); + intent.setClassName(KEYGUARD_PACKAGE, KEYGUARD_CLASS); + Log.v(TAG, "BINDING SERVICE: " + KEYGUARD_CLASS); + if (!bindService(intent, mConnection, Context.BIND_AUTO_CREATE)) { + Log.v(TAG, "FAILED TO BIND TO KEYGUARD!"); + } + } else { + Log.v(TAG, "Service already bound"); + } + } + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.keyguard_test_activity); + final int[] buttons = { + R.id.on_screen_turned_off, R.id.on_screen_turned_on, + R.id.do_keyguard, R.id.verify_unlock + }; + for (int i = 0; i < buttons.length; i++) { + findViewById(buttons[i]).setOnClickListener(this); + } + Log.v(TAG, "Binding service..."); + bindService(); + } + + @Override + protected void onSaveInstanceState(Bundle outState) { + super.onSaveInstanceState(outState); + outState.putInt(SECURITY_MODE, mSecurityMode); + } + + @Override + protected void onRestoreInstanceState(Bundle savedInstanceState) { + super.onRestoreInstanceState(savedInstanceState); + setMode(savedInstanceState.getInt(SECURITY_MODE)); + } + + @Override + public boolean onCreateOptionsMenu(Menu menu) { + MenuInflater inflater = getMenuInflater(); + inflater.inflate(R.menu.optionmenu, menu); + return true; + } + + private void setMode(int mode) { + mTestSimPin = false; + mTestSimPuk = false; + mLockPasswordEnabled = false; + mLockPatternEnabled = false; + switch(mode) { + case MODE_NONE: + mSecurityModeMock = DevicePolicyManager.PASSWORD_QUALITY_UNSPECIFIED; + break; + case MODE_PIN: + mSecurityModeMock = DevicePolicyManager.PASSWORD_QUALITY_NUMERIC; + mLockPasswordEnabled = true; + break; + case MODE_PASSWORD: + mSecurityModeMock = DevicePolicyManager.PASSWORD_QUALITY_ALPHABETIC; + mLockPasswordEnabled = true; + break; + case MODE_PATTERN: + mSecurityModeMock = DevicePolicyManager.PASSWORD_QUALITY_SOMETHING; + mLockPatternEnabled = true; + break; + case MODE_SIM_PIN: + mTestSimPin = true; + break; + case MODE_SIM_PUK: + mTestSimPuk = true; + break; + } + mSecurityMode = mode; + } + + @Override + public boolean onOptionsItemSelected(MenuItem item) { + // Handle item selection + switch (item.getItemId()) { + case R.id.none_menu_item: + setMode(MODE_NONE); + break; + case R.id.pin_menu_item: + setMode(MODE_PIN); + break; + case R.id.password_menu_item: + setMode(MODE_PASSWORD); + break; + case R.id.pattern_menu_item: + setMode(MODE_PATTERN); + break; + case R.id.sim_pin_menu_item: + setMode(MODE_SIM_PIN); + break; + case R.id.sim_puk_menu_item: + setMode(MODE_SIM_PUK); + break; + case R.id.add_widget_item: + startWidgetPicker(); + break; + default: + return super.onOptionsItemSelected(item); + } + try { + mService.doKeyguardTimeout(null); + } catch (RemoteException e) { + Log.e(TAG, "Remote service died"); + e.printStackTrace(); + } + return true; + } + + private void startWidgetPicker() { + startActivity(new Intent(Settings.ACTION_SECURITY_SETTINGS)); + } + + @Override + public void onClick(View v) { + try { + switch (v.getId()) { + case R.id.on_screen_turned_on: + mService.onScreenTurnedOn(mKeyguardResult); + break; + case R.id.on_screen_turned_off: + mService.onScreenTurnedOff(WindowManagerPolicy.OFF_BECAUSE_OF_USER); + break; + case R.id.do_keyguard: + if (!mSentSystemReady) { + mSentSystemReady = true; + mService.onSystemReady(); + } + mService.doKeyguardTimeout(null); + break; + case R.id.verify_unlock: + mService.verifyUnlock(mKeyguardResult); + break; + } + } catch (RemoteException e) { + Log.e(TAG, "Remote service died"); + e.printStackTrace(); + } + } + + @Override + protected void onPause() { + super.onPause(); + try { + if (mService != null) { + mService.setHidden(true); + } + } catch (RemoteException e) { + Log.e(TAG, "Remote service died"); + e.printStackTrace(); + } + } + + protected void onResume() { + super.onResume(); + try { + if (mService != null) { + mService.setHidden(false); + } + } catch (RemoteException e) { + Log.e(TAG, "Remote service died"); + e.printStackTrace(); + } + } + + public int mSecurityModeMock; + private boolean mTestSimPin; + private boolean mTestSimPuk; + private boolean mLockPasswordEnabled; + public boolean mLockPatternEnabled; + private int mSecurityMode; + + class LockPatternUtilsMock extends LockPatternUtils { + private long mDeadline; + public LockPatternUtilsMock(Context context) { + super(context); + } + + @Override + public boolean checkPattern(List<Cell> pattern) { + return pattern.size() > 4; + } + + @Override + public boolean checkPassword(String password) { + return password.length() > 4; + } + @Override + public long setLockoutAttemptDeadline() { + final long deadline = SystemClock.elapsedRealtime() + FAILED_ATTEMPT_TIMEOUT_MS; + mDeadline = deadline; + return deadline; + } + @Override + public boolean isLockScreenDisabled() { + return false; + } + @Override + public long getLockoutAttemptDeadline() { + return mDeadline; + } + @Override + public void reportFailedPasswordAttempt() { + // Ignored + } + @Override + public void reportSuccessfulPasswordAttempt() { + // Ignored + } + @Override + public boolean isLockPatternEnabled() { + return mLockPatternEnabled; + } + + @Override + public boolean isLockPasswordEnabled() { + return mLockPasswordEnabled; + } + + @Override + public int getKeyguardStoredPasswordQuality() { + return mSecurityModeMock; + } + + public boolean isSecure() { + return mLockPatternEnabled || mLockPasswordEnabled || mTestSimPin || mTestSimPuk; + } + + } +} diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardTransportControlView.java b/packages/Keyguard/src/com/android/keyguard/KeyguardTransportControlView.java index ffa88d5..07be2cc 100644 --- a/packages/Keyguard/src/com/android/keyguard/KeyguardTransportControlView.java +++ b/packages/Keyguard/src/com/android/keyguard/KeyguardTransportControlView.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.android.internal.policy.impl.keyguard; +package com.android.keyguard; import android.app.PendingIntent; import android.app.PendingIntent.CanceledException; @@ -44,8 +44,6 @@ import android.widget.FrameLayout; import android.widget.ImageView; import android.widget.TextView; -import com.android.internal.R; - import java.lang.ref.WeakReference; /** * This is the widget responsible for showing music controls in keyguard. @@ -356,26 +354,26 @@ public class KeyguardTransportControlView extends FrameLayout implements OnClick final int imageDescId; switch (state) { case RemoteControlClient.PLAYSTATE_ERROR: - imageResId = com.android.internal.R.drawable.stat_sys_warning; + imageResId = R.drawable.stat_sys_warning; // TODO use more specific image description string for warning, but here the "play" // message is still valid because this button triggers a play command. - imageDescId = com.android.internal.R.string.lockscreen_transport_play_description; + imageDescId = R.string.keyguard_transport_play_description; break; case RemoteControlClient.PLAYSTATE_PLAYING: - imageResId = com.android.internal.R.drawable.ic_media_pause; - imageDescId = com.android.internal.R.string.lockscreen_transport_pause_description; + imageResId = R.drawable.ic_media_pause; + imageDescId = R.string.keyguard_transport_pause_description; break; case RemoteControlClient.PLAYSTATE_BUFFERING: - imageResId = com.android.internal.R.drawable.ic_media_stop; - imageDescId = com.android.internal.R.string.lockscreen_transport_stop_description; + imageResId = R.drawable.ic_media_stop; + imageDescId = R.string.keyguard_transport_stop_description; break; case RemoteControlClient.PLAYSTATE_PAUSED: default: - imageResId = com.android.internal.R.drawable.ic_media_play; - imageDescId = com.android.internal.R.string.lockscreen_transport_play_description; + imageResId = R.drawable.ic_media_play; + imageDescId = R.string.keyguard_transport_play_description; break; } mBtnPlay.setImageResource(imageResId); diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java b/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java index c9bffbe..ff0dee7 100644 --- a/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java +++ b/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.android.internal.policy.impl.keyguard; +package com.android.keyguard; import android.app.ActivityManagerNative; import android.app.IUserSwitchObserver; @@ -37,7 +37,6 @@ import android.os.Handler; import android.os.IRemoteCallback; import android.os.Message; import android.os.RemoteException; -import android.os.UserHandle; import android.provider.Settings; import com.android.internal.telephony.IccCardConstants; @@ -45,7 +44,6 @@ import com.android.internal.telephony.TelephonyIntents; import android.telephony.TelephonyManager; import android.util.Log; -import com.android.internal.R; import com.google.android.collect.Lists; import java.lang.ref.WeakReference; @@ -466,7 +464,7 @@ public class KeyguardUpdateMonitor { } /** - * We need to store this state in the KeyguardUpdateMonitor since this class will not be + * We need to store this state in the KeyguardUpdateMonitor since this class will not be * destroyed. */ public boolean hasBootCompleted() { @@ -675,7 +673,7 @@ public class KeyguardUpdateMonitor { * @return The default plmn (no service) */ private CharSequence getDefaultPlmn() { - return mContext.getResources().getText(R.string.lockscreen_carrier_default); + return mContext.getResources().getText(R.string.keyguard_carrier_default); } /** diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitorCallback.java b/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitorCallback.java index 2126f06..12ffcc3 100644 --- a/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitorCallback.java +++ b/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitorCallback.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.android.internal.policy.impl.keyguard; +package com.android.keyguard; import android.app.admin.DevicePolicyManager; import android.media.AudioManager; diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardViewBase.java b/packages/Keyguard/src/com/android/keyguard/KeyguardViewBase.java index 6fcacd3..200fb3c 100644 --- a/packages/Keyguard/src/com/android/keyguard/KeyguardViewBase.java +++ b/packages/Keyguard/src/com/android/keyguard/KeyguardViewBase.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.android.internal.policy.impl.keyguard; +package com.android.keyguard; import android.app.Activity; import android.content.Context; @@ -260,5 +260,4 @@ public abstract class KeyguardViewBase extends FrameLayout { KeyguardViewMediator.ViewMediatorCallback viewMediatorCallback) { mViewMediatorCallback = viewMediatorCallback; } - } diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardViewManager.java b/packages/Keyguard/src/com/android/keyguard/KeyguardViewManager.java index 8562f0c..dac52ad 100644 --- a/packages/Keyguard/src/com/android/keyguard/KeyguardViewManager.java +++ b/packages/Keyguard/src/com/android/keyguard/KeyguardViewManager.java @@ -14,7 +14,10 @@ * limitations under the License. */ -package com.android.internal.policy.impl.keyguard; +package com.android.keyguard; + +import com.android.internal.policy.IKeyguardResult; +import com.android.internal.widget.LockPatternUtils; import android.app.Activity; import android.app.ActivityManager; @@ -28,6 +31,7 @@ import android.graphics.Rect; import android.os.Bundle; import android.os.IBinder; import android.os.Parcelable; +import android.os.RemoteException; import android.os.SystemProperties; import android.util.Log; import android.util.Slog; @@ -40,9 +44,6 @@ import android.view.ViewManager; import android.view.WindowManager; import android.widget.FrameLayout; -import com.android.internal.R; -import com.android.internal.widget.LockPatternUtils; - /** * Manages creating, showing, hiding and resetting the keyguard. Calls back * via {@link KeyguardViewMediator.ViewMediatorCallback} to poke @@ -119,7 +120,7 @@ public class KeyguardViewManager { private boolean shouldEnableScreenRotation() { Resources res = mContext.getResources(); return SystemProperties.getBoolean("lockscreen.rot_override",false) - || res.getBoolean(com.android.internal.R.bool.config_enableLockScreenRotation); + || res.getBoolean(R.bool.config_enableLockScreenRotation); } class ViewManagerHost extends FrameLayout { @@ -194,12 +195,11 @@ public class KeyguardViewManager { } final int stretch = ViewGroup.LayoutParams.MATCH_PARENT; - final int type = isActivity ? WindowManager.LayoutParams.TYPE_APPLICATION - : WindowManager.LayoutParams.TYPE_KEYGUARD; + final int type = WindowManager.LayoutParams.TYPE_KEYGUARD; WindowManager.LayoutParams lp = new WindowManager.LayoutParams( stretch, stretch, type, flags, PixelFormat.TRANSLUCENT); lp.softInputMode = WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE; - lp.windowAnimations = com.android.internal.R.style.Animation_LockScreen; + lp.windowAnimations = R.style.Animation_LockScreen; if (ActivityManager.isHighEndGfx()) { lp.flags |= WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED; lp.privateFlags |= @@ -331,8 +331,7 @@ public class KeyguardViewManager { } } - public synchronized void onScreenTurnedOn( - final KeyguardViewManager.ShowListener showListener) { + public synchronized void onScreenTurnedOn(final IKeyguardResult result) { if (DEBUG) Log.d(TAG, "onScreenTurnedOn()"); mScreenOn = true; if (mKeyguardView != null) { @@ -340,26 +339,41 @@ public class KeyguardViewManager { // Caller should wait for this window to be shown before turning // on the screen. - if (showListener != null) { + if (result != null) { if (mKeyguardHost.getVisibility() == View.VISIBLE) { // Keyguard may be in the process of being shown, but not yet // updated with the window manager... give it a chance to do so. mKeyguardHost.post(new Runnable() { @Override public void run() { + IBinder token = null; if (mKeyguardHost.getVisibility() == View.VISIBLE) { - showListener.onShown(mKeyguardHost.getWindowToken()); - } else { - showListener.onShown(null); + token = mKeyguardHost.getWindowToken(); + } + try { + result.onShown(token); + } catch (RemoteException e) { + // TODO Auto-generated catch block + e.printStackTrace(); } } }); } else { - showListener.onShown(null); + try { + result.onShown(null); + } catch (RemoteException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } } } - } else if (showListener != null) { - showListener.onShown(null); + } else if (result != null) { + try { + result.onShown(null); + } catch (RemoteException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } } } diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardViewMediator.java b/packages/Keyguard/src/com/android/keyguard/KeyguardViewMediator.java index 8e10528..f8fbddf 100644 --- a/packages/Keyguard/src/com/android/keyguard/KeyguardViewMediator.java +++ b/packages/Keyguard/src/com/android/keyguard/KeyguardViewMediator.java @@ -14,8 +14,9 @@ * limitations under the License. */ -package com.android.internal.policy.impl.keyguard; +package com.android.keyguard; +import com.android.internal.policy.IKeyguardResult; import static android.provider.Settings.System.SCREEN_OFF_TIMEOUT; import android.app.Activity; @@ -219,7 +220,7 @@ public class KeyguardViewMediator { * how we'll ultimately let them know whether it was successful. We use this * var being non-null as an indicator that there is an in progress request. */ - private WindowManagerPolicy.OnKeyguardExitResult mExitSecureCallback; + private IKeyguardResult mExitSecureCallback; // the properties of the keyguard @@ -347,7 +348,7 @@ public class KeyguardViewMediator { // flicker while turning back on the screen and disabling the keyguard again). if (DEBUG) Log.d(TAG, "screen is off and call ended, let's make sure the " + "keyguard is showing"); - doKeyguardLocked(); + doKeyguardLocked(null); } } }; @@ -377,7 +378,7 @@ public class KeyguardViewMediator { if (DEBUG) Log.d(TAG, "ICC_ABSENT isn't showing," + " we need to show the keyguard since the " + "device isn't provisioned yet."); - doKeyguardLocked(); + doKeyguardLocked(null); } else { resetStateLocked(null); } @@ -390,7 +391,7 @@ public class KeyguardViewMediator { if (!isShowing()) { if (DEBUG) Log.d(TAG, "INTENT_VALUE_ICC_LOCKED and keygaurd isn't " + "showing; need to show keyguard so user can enter sim pin"); - doKeyguardLocked(); + doKeyguardLocked(null); } else { resetStateLocked(null); } @@ -401,7 +402,7 @@ public class KeyguardViewMediator { if (!isShowing()) { if (DEBUG) Log.d(TAG, "PERM_DISABLED and " + "keygaurd isn't showing."); - doKeyguardLocked(); + doKeyguardLocked(null); } else { if (DEBUG) Log.d(TAG, "PERM_DISABLED, resetStateLocked to" + "show permanently disabled message in lockscreen."); @@ -558,7 +559,7 @@ public class KeyguardViewMediator { mUpdateMonitor.setAlternateUnlockEnabled(true); } - doKeyguardLocked(); + doKeyguardLocked(null); } // Most services aren't available until the system reaches the ready state, so we // send it here when the device first boots. @@ -586,7 +587,11 @@ public class KeyguardViewMediator { if (mExitSecureCallback != null) { if (DEBUG) Log.d(TAG, "pending exit secure callback cancelled"); - mExitSecureCallback.onKeyguardExitResult(false); + try { + mExitSecureCallback.onKeyguardExitResult(false); + } catch (RemoteException e) { + e.printStackTrace(); + } mExitSecureCallback = null; if (!mExternallyEnabled) { hideLocked(); @@ -600,7 +605,7 @@ public class KeyguardViewMediator { } else if (why == WindowManagerPolicy.OFF_BECAUSE_OF_PROX_SENSOR) { // Do not enable the keyguard if the prox sensor forced the screen off. } else { - doKeyguardLocked(); + doKeyguardLocked(null); } } } @@ -638,7 +643,7 @@ public class KeyguardViewMediator { if (timeout <= 0) { // Lock now mSuppressNextLockSound = true; - doKeyguardLocked(); + doKeyguardLocked(null); } else { // Lock in the future long when = SystemClock.elapsedRealtime() + timeout; @@ -659,13 +664,13 @@ public class KeyguardViewMediator { /** * Let's us know the screen was turned on. */ - public void onScreenTurnedOn(KeyguardViewManager.ShowListener showListener) { + public void onScreenTurnedOn(IKeyguardResult result) { synchronized (this) { mScreenOn = true; cancelDoKeyguardLaterLocked(); if (DEBUG) Log.d(TAG, "onScreenTurnedOn, seq = " + mDelayedShowingSequence); - if (showListener != null) { - notifyScreenOnLocked(showListener); + if (result != null) { + notifyScreenOnLocked(result); } } maybeSendUserPresentBroadcast(); @@ -736,7 +741,11 @@ public class KeyguardViewMediator { if (mExitSecureCallback != null) { if (DEBUG) Log.d(TAG, "onKeyguardExitResult(false), resetting"); - mExitSecureCallback.onKeyguardExitResult(false); + try { + mExitSecureCallback.onKeyguardExitResult(false); + } catch (RemoteException e) { + e.printStackTrace(); + } mExitSecureCallback = null; resetStateLocked(null); } else { @@ -764,24 +773,36 @@ public class KeyguardViewMediator { /** * @see android.app.KeyguardManager#exitKeyguardSecurely */ - public void verifyUnlock(WindowManagerPolicy.OnKeyguardExitResult callback) { + public void verifyUnlock(IKeyguardResult result) { synchronized (this) { if (DEBUG) Log.d(TAG, "verifyUnlock"); if (!mUpdateMonitor.isDeviceProvisioned()) { // don't allow this api when the device isn't provisioned if (DEBUG) Log.d(TAG, "ignoring because device isn't provisioned"); - callback.onKeyguardExitResult(false); + try { + result.onKeyguardExitResult(false); + } catch (RemoteException e) { + e.printStackTrace(); + } } else if (mExternallyEnabled) { // this only applies when the user has externally disabled the // keyguard. this is unexpected and means the user is not // using the api properly. Log.w(TAG, "verifyUnlock called when not externally disabled"); - callback.onKeyguardExitResult(false); + try { + result.onKeyguardExitResult(false); + } catch (RemoteException e) { + e.printStackTrace(); + } } else if (mExitSecureCallback != null) { // already in progress with someone else - callback.onKeyguardExitResult(false); + try { + result.onKeyguardExitResult(false); + } catch (RemoteException e) { + e.printStackTrace(); + } } else { - mExitSecureCallback = callback; + mExitSecureCallback = result; verifyUnlockLocked(); } } @@ -844,10 +865,6 @@ public class KeyguardViewMediator { return mShowing || mNeedToReshowWhenReenabled || !mUpdateMonitor.isDeviceProvisioned(); } - private void doKeyguardLocked() { - doKeyguardLocked(null); - } - /** * Enable the keyguard if the settings are appropriate. */ @@ -945,9 +962,9 @@ public class KeyguardViewMediator { * @see #onScreenTurnedOn() * @see #handleNotifyScreenOn */ - private void notifyScreenOnLocked(KeyguardViewManager.ShowListener showListener) { + private void notifyScreenOnLocked(IKeyguardResult result) { if (DEBUG) Log.d(TAG, "notifyScreenOnLocked"); - Message msg = mHandler.obtainMessage(NOTIFY_SCREEN_ON, showListener); + Message msg = mHandler.obtainMessage(NOTIFY_SCREEN_ON, result); mHandler.sendMessage(msg); } @@ -1020,7 +1037,7 @@ public class KeyguardViewMediator { if (mDelayedShowingSequence == sequence) { // Don't play lockscreen SFX if the screen went off due to timeout. mSuppressNextLockSound = true; - doKeyguardLocked(); + doKeyguardLocked(null); } } } @@ -1080,7 +1097,12 @@ public class KeyguardViewMediator { } if (mExitSecureCallback != null) { - mExitSecureCallback.onKeyguardExitResult(authenticated); + try { + mExitSecureCallback.onKeyguardExitResult(authenticated); + } catch (RemoteException e) { + e.printStackTrace(); + } + mExitSecureCallback = null; if (authenticated) { @@ -1120,7 +1142,7 @@ public class KeyguardViewMediator { handleNotifyScreenOff(); return; case NOTIFY_SCREEN_ON: - handleNotifyScreenOn((KeyguardViewManager.ShowListener)msg.obj); + handleNotifyScreenOn((IKeyguardResult) msg.obj); return; case WAKE_WHEN_READY: handleWakeWhenReady(msg.arg1); @@ -1164,10 +1186,11 @@ public class KeyguardViewMediator { } private void sendUserPresentBroadcast() { - if (!(mContext instanceof Activity)) { - final UserHandle currentUser = new UserHandle(mLockPatternUtils.getCurrentUser()); - mContext.sendBroadcastAsUser(mUserPresentIntent, currentUser); - } + // TODO +// if (!(mContext instanceof Activity)) { +// final UserHandle currentUser = new UserHandle(mLockPatternUtils.getCurrentUser()); +// mContext.sendBroadcastAsUser(mUserPresentIntent, currentUser); +// } } /** @@ -1176,7 +1199,7 @@ public class KeyguardViewMediator { */ private void handleKeyguardDoneDrawing() { synchronized(this) { - if (false) Log.d(TAG, "handleKeyguardDoneDrawing"); + if (DEBUG) Log.d(TAG, "handleKeyguardDoneDrawing"); if (mWaitingUntilKeyguardVisible) { if (DEBUG) Log.d(TAG, "handleKeyguardDoneDrawing: notifying mWaitingUntilKeyguardVisible"); mWaitingUntilKeyguardVisible = false; @@ -1232,8 +1255,12 @@ public class KeyguardViewMediator { */ private void handleShow(Bundle options) { synchronized (KeyguardViewMediator.this) { - if (DEBUG) Log.d(TAG, "handleShow"); - if (!mSystemReady) return; + if (!mSystemReady) { + if (DEBUG) Log.d(TAG, "ignoring handleShow because system is not ready."); + return; + } else { + if (DEBUG) Log.d(TAG, "handleShow"); + } mKeyguardViewManager.show(options); mShowing = true; @@ -1406,10 +1433,10 @@ public class KeyguardViewMediator { * Handle message sent by {@link #notifyScreenOnLocked()} * @see #NOTIFY_SCREEN_ON */ - private void handleNotifyScreenOn(KeyguardViewManager.ShowListener showListener) { + private void handleNotifyScreenOn(IKeyguardResult result) { synchronized (KeyguardViewMediator.this) { if (DEBUG) Log.d(TAG, "handleNotifyScreenOn"); - mKeyguardViewManager.onScreenTurnedOn(showListener); + mKeyguardViewManager.onScreenTurnedOn(result); } } diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardViewStateManager.java b/packages/Keyguard/src/com/android/keyguard/KeyguardViewStateManager.java index 0a166e1..880fddd 100644 --- a/packages/Keyguard/src/com/android/keyguard/KeyguardViewStateManager.java +++ b/packages/Keyguard/src/com/android/keyguard/KeyguardViewStateManager.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.android.internal.policy.impl.keyguard; +package com.android.keyguard; import android.appwidget.AppWidgetManager; import android.os.Handler; diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardWidgetCarousel.java b/packages/Keyguard/src/com/android/keyguard/KeyguardWidgetCarousel.java index 257fd27..98b31b7 100644 --- a/packages/Keyguard/src/com/android/keyguard/KeyguardWidgetCarousel.java +++ b/packages/Keyguard/src/com/android/keyguard/KeyguardWidgetCarousel.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.android.internal.policy.impl.keyguard; +package com.android.keyguard; import android.animation.Animator; import android.animation.AnimatorSet; @@ -26,8 +26,6 @@ import android.view.animation.AccelerateInterpolator; import android.view.animation.DecelerateInterpolator; import android.view.animation.Interpolator; -import com.android.internal.R; - import java.util.ArrayList; public class KeyguardWidgetCarousel extends KeyguardWidgetPager { diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardWidgetFrame.java b/packages/Keyguard/src/com/android/keyguard/KeyguardWidgetFrame.java index babb9cb..81f6221 100644 --- a/packages/Keyguard/src/com/android/keyguard/KeyguardWidgetFrame.java +++ b/packages/Keyguard/src/com/android/keyguard/KeyguardWidgetFrame.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.android.internal.policy.impl.keyguard; +package com.android.keyguard; import android.animation.Animator; import android.animation.ObjectAnimator; @@ -37,8 +37,6 @@ import android.view.MotionEvent; import android.view.View; import android.widget.FrameLayout; -import com.android.internal.R; - public class KeyguardWidgetFrame extends FrameLayout { private final static PorterDuffXfermode sAddBlendMode = new PorterDuffXfermode(PorterDuff.Mode.ADD); @@ -114,9 +112,9 @@ public class KeyguardWidgetFrame extends FrameLayout { // This will be overriden on phones based on the current security mode, however on tablets // we need to specify a height. mSmallWidgetHeight = - res.getDimensionPixelSize(com.android.internal.R.dimen.kg_small_widget_height); + res.getDimensionPixelSize(R.dimen.kg_small_widget_height); mBackgroundDrawable = res.getDrawable(R.drawable.kg_widget_bg_padded); - mGradientColor = res.getColor(com.android.internal.R.color.kg_widget_pager_gradient); + mGradientColor = res.getColor(R.color.kg_widget_pager_gradient); mGradientPaint.setXfermode(sAddBlendMode); } diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardWidgetPager.java b/packages/Keyguard/src/com/android/keyguard/KeyguardWidgetPager.java index ad5e257..0d92e11 100644 --- a/packages/Keyguard/src/com/android/keyguard/KeyguardWidgetPager.java +++ b/packages/Keyguard/src/com/android/keyguard/KeyguardWidgetPager.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.android.internal.policy.impl.keyguard; +package com.android.keyguard; import android.animation.Animator; import android.animation.AnimatorListenerAdapter; @@ -350,7 +350,7 @@ public class KeyguardWidgetPager extends PagedView implements PagedView.PageSwit View content = (widget == frame) ? frame.getContent() : widget; if (content != null) { String contentDescription = mContext.getString( - com.android.internal.R.string.keyguard_accessibility_widget, + R.string.keyguard_accessibility_widget, content.getContentDescription()); frame.setContentDescription(contentDescription); } @@ -846,7 +846,7 @@ public class KeyguardWidgetPager extends PagedView implements PagedView.PageSwit setCurrentPage(mCurrentPage + 1); mAddWidgetView = null; } else if (mAddWidgetView == null && !enabled) { - View addWidget = findViewById(com.android.internal.R.id.keyguard_add_widget); + View addWidget = findViewById(R.id.keyguard_add_widget); if (addWidget != null) { mAddWidgetView = addWidget; removeView(addWidget); @@ -856,7 +856,7 @@ public class KeyguardWidgetPager extends PagedView implements PagedView.PageSwit boolean isAddPage(int pageIndex) { View v = getChildAt(pageIndex); - return v != null && v.getId() == com.android.internal.R.id.keyguard_add_widget; + return v != null && v.getId() == R.id.keyguard_add_widget; } boolean isCameraPage(int pageIndex) { diff --git a/packages/Keyguard/src/com/android/keyguard/LiftToActivateListener.java b/packages/Keyguard/src/com/android/keyguard/LiftToActivateListener.java index 818108c..e59602b 100644 --- a/packages/Keyguard/src/com/android/keyguard/LiftToActivateListener.java +++ b/packages/Keyguard/src/com/android/keyguard/LiftToActivateListener.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.android.internal.policy.impl.keyguard; +package com.android.keyguard; import android.content.Context; import android.view.MotionEvent; diff --git a/packages/Keyguard/src/com/android/keyguard/MultiPaneChallengeLayout.java b/packages/Keyguard/src/com/android/keyguard/MultiPaneChallengeLayout.java index 0ca46c3..8fd39c0 100644 --- a/packages/Keyguard/src/com/android/keyguard/MultiPaneChallengeLayout.java +++ b/packages/Keyguard/src/com/android/keyguard/MultiPaneChallengeLayout.java @@ -14,9 +14,7 @@ * limitations under the License. */ -package com.android.internal.policy.impl.keyguard; - -import com.android.internal.R; +package com.android.keyguard; import android.animation.Animator; import android.animation.AnimatorListenerAdapter; @@ -72,7 +70,7 @@ public class MultiPaneChallengeLayout extends ViewGroup implements ChallengeLayo final TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.MultiPaneChallengeLayout, defStyleAttr, 0); - mOrientation = a.getInt(R.styleable.MultiPaneChallengeLayout_orientation, + mOrientation = a.getInt(R.styleable.MultiPaneChallengeLayout_android_orientation, HORIZONTAL); a.recycle(); diff --git a/packages/Keyguard/src/com/android/keyguard/NumPadKey.java b/packages/Keyguard/src/com/android/keyguard/NumPadKey.java index a0038bc..532670f 100644 --- a/packages/Keyguard/src/com/android/keyguard/NumPadKey.java +++ b/packages/Keyguard/src/com/android/keyguard/NumPadKey.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.android.internal.policy.impl.keyguard; +package com.android.keyguard; import android.content.Context; import android.content.res.TypedArray; @@ -26,7 +26,6 @@ import android.view.View; import android.widget.Button; import android.widget.TextView; -import com.android.internal.R; import com.android.internal.widget.LockPatternUtils; public class NumPadKey extends Button { diff --git a/packages/Keyguard/src/com/android/keyguard/ObscureSpeechDelegate.java b/packages/Keyguard/src/com/android/keyguard/ObscureSpeechDelegate.java index af043ab..573122a 100644 --- a/packages/Keyguard/src/com/android/keyguard/ObscureSpeechDelegate.java +++ b/packages/Keyguard/src/com/android/keyguard/ObscureSpeechDelegate.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.android.internal.policy.impl.keyguard; +package com.android.keyguard; import android.content.ContentResolver; import android.content.Context; diff --git a/packages/Keyguard/src/com/android/keyguard/PagedView.java b/packages/Keyguard/src/com/android/keyguard/PagedView.java index 539ec1a..5c2413a 100644 --- a/packages/Keyguard/src/com/android/keyguard/PagedView.java +++ b/packages/Keyguard/src/com/android/keyguard/PagedView.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.android.internal.policy.impl.keyguard; +package com.android.keyguard; import android.animation.Animator; import android.animation.AnimatorListenerAdapter; @@ -53,8 +53,6 @@ import android.view.animation.Interpolator; import android.view.animation.LinearInterpolator; import android.widget.Scroller; -import com.android.internal.R; - import java.util.ArrayList; /** diff --git a/packages/Keyguard/src/com/android/keyguard/SecurityMessageDisplay.java b/packages/Keyguard/src/com/android/keyguard/SecurityMessageDisplay.java index 7760279..e2f91e3 100644 --- a/packages/Keyguard/src/com/android/keyguard/SecurityMessageDisplay.java +++ b/packages/Keyguard/src/com/android/keyguard/SecurityMessageDisplay.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.android.internal.policy.impl.keyguard; +package com.android.keyguard; public interface SecurityMessageDisplay { public void setMessage(CharSequence msg, boolean important); diff --git a/packages/Keyguard/src/com/android/keyguard/SlidingChallengeLayout.java b/packages/Keyguard/src/com/android/keyguard/SlidingChallengeLayout.java index 073225f..05b35a1 100644 --- a/packages/Keyguard/src/com/android/keyguard/SlidingChallengeLayout.java +++ b/packages/Keyguard/src/com/android/keyguard/SlidingChallengeLayout.java @@ -14,9 +14,7 @@ * limitations under the License. */ -package com.android.internal.policy.impl.keyguard; - -import com.android.internal.R; +package com.android.keyguard; import android.animation.Animator; import android.animation.AnimatorListenerAdapter; |