summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJim Miller <jaggies@google.com>2013-01-09 18:50:26 -0800
committerJim Miller <jaggies@google.com>2013-02-27 17:27:53 -0800
commit5ecd81154fa039961f65bb4e36d18ac555b0d1d6 (patch)
treece0d9d0e4ade28d865fb5005fa03fed78ad9ff91
parent25a272a9f6323f6a3513bb522d45e839449878ce (diff)
downloadframeworks_base-5ecd81154fa039961f65bb4e36d18ac555b0d1d6.zip
frameworks_base-5ecd81154fa039961f65bb4e36d18ac555b0d1d6.tar.gz
frameworks_base-5ecd81154fa039961f65bb4e36d18ac555b0d1d6.tar.bz2
Move keyguard to its own process.
This is in preparation to moving keyguard into its own process. Moved keyguard source and resources into new .apk. Got basic test app working. Still need to implement MockPatternUtils and means to pass it into KeyguardService with local binder interface. Added new ACCESS_KEYGUARD_SECURE_STORAGE permission. Temporarily disabled USER_PRESENT broadcast. Remove unintentional whitespace changes in PhoneWindowManager, etc. Checkpoint basic working version. Move to systemui process. Synchronize with TOT. Sync with recent user API changes. Fix bug with returing interface instead of stub for IKeyguardResult. Create KeyguardServiceDelegate to allow for runtime-selectable local or remote interface. More keyguard crash robustness. Keyguard crash recovery working. Currently fails safe (locked). Fix selector view which was still using frameworks resources. Remove more references to internal framework variables. Use aliases for those we should move but currently have dependencies. Allow runtime switching between service and local mode. Fix layout issue on tablets where orientation was reading the incorrect constant from the framework. Remove more framework dependencies. Fix PIN keyboard input. Remove unnecessary copy of orientation attrs. Remove unused user selector widget and attempt to get multi user working again. Fix multi-user avatar icon by grabbing it from UserManager rather than directly since keyguard can no longer read it. Merge with AppWidget userId changes in master. Change-Id: I254d6fc6423ae40f6d7fef50aead4caa701e5ad2
-rw-r--r--Android.mk2
-rw-r--r--core/java/android/appwidget/AppWidgetHost.java1
-rw-r--r--core/java/android/view/WindowManager.java8
-rw-r--r--core/java/com/android/internal/policy/IKeyguardResult.aidl21
-rw-r--r--core/java/com/android/internal/policy/IKeyguardService.aidl44
-rw-r--r--core/java/com/android/internal/widget/TransportControlView.java514
-rw-r--r--core/res/AndroidManifest.xml7
-rw-r--r--core/res/res/anim/lock_screen_behind_enter.xml (renamed from packages/Keyguard/res/anim/lock_screen_behind_enter.xml)0
-rw-r--r--core/res/res/anim/lock_screen_enter.xml24
-rw-r--r--core/res/res/anim/lock_screen_exit.xml36
-rw-r--r--core/res/res/anim/lock_screen_wallpaper_behind_enter.xml (renamed from packages/Keyguard/res/anim/lock_screen_wallpaper_behind_enter.xml)0
-rw-r--r--core/res/res/drawable-hdpi/ic_action_assist_generic_activated.pngbin0 -> 9647 bytes
-rw-r--r--core/res/res/drawable-hdpi/ic_action_assist_generic_normal.pngbin0 -> 2455 bytes
-rw-r--r--core/res/res/drawable-hdpi/ic_input_delete.pngbin0 -> 1031 bytes
-rw-r--r--core/res/res/drawable-hdpi/ic_lockscreen_glowdot.pngbin0 -> 738 bytes
-rw-r--r--core/res/res/drawable-hdpi/ic_lockscreen_handle_pressed.pngbin0 -> 8378 bytes
-rw-r--r--core/res/res/drawable-ldpi/ic_input_delete.pngbin0 -> 825 bytes
-rw-r--r--core/res/res/drawable-mdpi/ic_action_assist_generic_activated.pngbin0 -> 5808 bytes
-rw-r--r--core/res/res/drawable-mdpi/ic_action_assist_generic_normal.pngbin0 -> 1601 bytes
-rw-r--r--core/res/res/drawable-mdpi/ic_input_delete.pngbin0 -> 786 bytes
-rw-r--r--core/res/res/drawable-mdpi/ic_lockscreen_glowdot.pngbin0 -> 538 bytes
-rw-r--r--core/res/res/drawable-mdpi/ic_lockscreen_handle_pressed.pngbin0 -> 4299 bytes
-rw-r--r--core/res/res/drawable-sw600dp-hdpi/ic_lockscreen_handle_pressed.pngbin0 -> 15564 bytes
-rw-r--r--core/res/res/drawable-sw600dp-mdpi/ic_lockscreen_handle_pressed.pngbin0 -> 8147 bytes
-rw-r--r--core/res/res/drawable-sw600dp-xhdpi/ic_lockscreen_handle_pressed.pngbin0 -> 25531 bytes
-rw-r--r--core/res/res/drawable-xhdpi/ic_action_assist_generic_activated.pngbin0 -> 13973 bytes
-rw-r--r--core/res/res/drawable-xhdpi/ic_action_assist_generic_normal.pngbin0 -> 3230 bytes
-rw-r--r--core/res/res/drawable-xhdpi/ic_input_delete.pngbin0 -> 1307 bytes
-rw-r--r--core/res/res/drawable-xhdpi/ic_lockscreen_glowdot.pngbin0 -> 964 bytes
-rw-r--r--core/res/res/drawable-xhdpi/ic_lockscreen_handle_pressed.pngbin0 -> 12182 bytes
-rw-r--r--core/res/res/drawable/ic_action_assist_generic.xml36
-rw-r--r--core/res/res/drawable/ic_lockscreen_outerring.xml24
-rw-r--r--core/res/res/values-land/arrays.xml50
-rw-r--r--core/res/res/values-sw600dp-land/arrays.xml50
-rw-r--r--core/res/res/values/arrays.xml71
-rw-r--r--core/res/res/values/strings.xml5
-rw-r--r--core/res/res/values/symbols.xml201
-rw-r--r--packages/Keyguard/Android.mk24
-rw-r--r--packages/Keyguard/AndroidManifest.xml61
-rw-r--r--packages/Keyguard/NOTICE190
-rw-r--r--packages/Keyguard/res/anim/keyguard_security_fade_in.xml2
-rw-r--r--packages/Keyguard/res/anim/keyguard_security_fade_out.xml2
-rw-r--r--packages/Keyguard/res/anim/lock_screen_enter.xml4
-rw-r--r--packages/Keyguard/res/anim/lock_screen_exit.xml6
-rw-r--r--packages/Keyguard/res/drawable-hdpi/ic_media_next.pngbin0 -> 1073 bytes
-rw-r--r--packages/Keyguard/res/drawable-hdpi/ic_media_play.pngbin0 -> 1163 bytes
-rw-r--r--packages/Keyguard/res/drawable-hdpi/ic_media_previous.pngbin0 -> 1067 bytes
-rw-r--r--packages/Keyguard/res/drawable-hdpi/kg_add_widget.pngbin970 -> 1648 bytes
-rw-r--r--packages/Keyguard/res/drawable-hdpi/kg_security_lock_focused.pngbin2007 -> 2377 bytes
-rw-r--r--packages/Keyguard/res/drawable-hdpi/kg_security_lock_normal.pngbin1385 -> 2688 bytes
-rw-r--r--packages/Keyguard/res/drawable-hdpi/kg_security_lock_pressed.pngbin1511 -> 1760 bytes
-rw-r--r--packages/Keyguard/res/drawable-ldpi/ic_media_next.pngbin0 -> 735 bytes
-rw-r--r--packages/Keyguard/res/drawable-ldpi/ic_media_play.pngbin0 -> 673 bytes
-rw-r--r--packages/Keyguard/res/drawable-ldpi/ic_media_previous.pngbin0 -> 770 bytes
-rw-r--r--packages/Keyguard/res/drawable-mdpi/ic_media_next.pngbin0 -> 843 bytes
-rw-r--r--packages/Keyguard/res/drawable-mdpi/ic_media_play.pngbin0 -> 897 bytes
-rw-r--r--packages/Keyguard/res/drawable-mdpi/ic_media_previous.pngbin0 -> 837 bytes
-rw-r--r--packages/Keyguard/res/drawable-mdpi/kg_add_widget.pngbin788 -> 1185 bytes
-rw-r--r--packages/Keyguard/res/drawable-mdpi/kg_security_lock_focused.pngbin1391 -> 1567 bytes
-rw-r--r--packages/Keyguard/res/drawable-mdpi/kg_security_lock_normal.pngbin1060 -> 1899 bytes
-rw-r--r--packages/Keyguard/res/drawable-mdpi/kg_security_lock_pressed.pngbin1149 -> 1347 bytes
-rw-r--r--packages/Keyguard/res/drawable-nodpi/app_icon.pngbin0 -> 154535 bytes
-rw-r--r--packages/Keyguard/res/drawable-xhdpi/ic_media_next.pngbin0 -> 1364 bytes
-rw-r--r--packages/Keyguard/res/drawable-xhdpi/ic_media_play.pngbin0 -> 1617 bytes
-rw-r--r--packages/Keyguard/res/drawable-xhdpi/ic_media_previous.pngbin0 -> 1372 bytes
-rw-r--r--packages/Keyguard/res/drawable-xhdpi/kg_add_widget.pngbin1228 -> 2220 bytes
-rw-r--r--packages/Keyguard/res/drawable-xhdpi/kg_security_lock_focused.pngbin2744 -> 3277 bytes
-rw-r--r--packages/Keyguard/res/drawable-xhdpi/kg_security_lock_normal.pngbin1843 -> 3517 bytes
-rw-r--r--packages/Keyguard/res/drawable-xhdpi/kg_security_lock_pressed.pngbin2021 -> 2173 bytes
-rw-r--r--packages/Keyguard/res/drawable/lockscreen_password_field_dark.xml26
-rw-r--r--packages/Keyguard/res/layout-land/keyguard_host_view.xml19
-rw-r--r--packages/Keyguard/res/layout-land/keyguard_widget_pager.xml6
-rw-r--r--packages/Keyguard/res/layout-port/keyguard_host_view.xml20
-rw-r--r--packages/Keyguard/res/layout-port/keyguard_widget_pager.xml6
-rw-r--r--packages/Keyguard/res/layout-sw600dp-port/keyguard_host_view.xml18
-rw-r--r--packages/Keyguard/res/layout-sw600dp-port/keyguard_status_area.xml56
-rw-r--r--packages/Keyguard/res/layout-sw600dp/keyguard_transport_control.xml111
-rw-r--r--packages/Keyguard/res/layout/keyguard_account_view.xml9
-rw-r--r--packages/Keyguard/res/layout/keyguard_add_widget.xml4
-rw-r--r--packages/Keyguard/res/layout/keyguard_emergency_carrier_area.xml8
-rw-r--r--packages/Keyguard/res/layout/keyguard_face_unlock_view.xml17
-rw-r--r--packages/Keyguard/res/layout/keyguard_glow_pad_container.xml2
-rw-r--r--packages/Keyguard/res/layout/keyguard_glow_pad_view.xml16
-rw-r--r--packages/Keyguard/res/layout/keyguard_message_area.xml2
-rw-r--r--packages/Keyguard/res/layout/keyguard_message_area_large.xml2
-rw-r--r--packages/Keyguard/res/layout/keyguard_multi_user_avatar.xml4
-rw-r--r--packages/Keyguard/res/layout/keyguard_multi_user_selector.xml10
-rw-r--r--packages/Keyguard/res/layout/keyguard_password_view.xml15
-rw-r--r--packages/Keyguard/res/layout/keyguard_pattern_view.xml11
-rw-r--r--packages/Keyguard/res/layout/keyguard_pin_view.xml36
-rw-r--r--packages/Keyguard/res/layout/keyguard_selector_view.xml12
-rw-r--r--packages/Keyguard/res/layout/keyguard_sim_pin_view.xml36
-rw-r--r--packages/Keyguard/res/layout/keyguard_sim_puk_view.xml36
-rw-r--r--packages/Keyguard/res/layout/keyguard_status_view.xml19
-rw-r--r--packages/Keyguard/res/layout/keyguard_test_activity.xml47
-rw-r--r--packages/Keyguard/res/layout/keyguard_transport_control_view.xml20
-rw-r--r--packages/Keyguard/res/menu/optionmenu.xml17
-rw-r--r--packages/Keyguard/res/values-land/alias.xml (renamed from core/res/res/values-port/alias.xml)2
-rw-r--r--packages/Keyguard/res/values-land/arrays.xml72
-rw-r--r--packages/Keyguard/res/values-land/bools.xml22
-rw-r--r--packages/Keyguard/res/values-land/dimens.xml51
-rw-r--r--packages/Keyguard/res/values-land/integers.xml26
-rw-r--r--packages/Keyguard/res/values-large/dimens.xml35
-rw-r--r--packages/Keyguard/res/values-port/alias.xml (renamed from core/res/res/values-sw600dp/alias.xml)2
-rw-r--r--packages/Keyguard/res/values-port/bools.xml21
-rw-r--r--packages/Keyguard/res/values-port/integers.xml23
-rw-r--r--packages/Keyguard/res/values-sw380dp-land/dimens.xml23
-rw-r--r--packages/Keyguard/res/values-sw380dp/dimens.xml23
-rw-r--r--packages/Keyguard/res/values-sw600dp-land/arrays.xml72
-rw-r--r--packages/Keyguard/res/values-sw600dp-land/dimens.xml (renamed from packages/Keyguard/res/layout-land/keyguard_glow_pad_container.xml)17
-rw-r--r--packages/Keyguard/res/values-sw600dp-land/integers.xml23
-rw-r--r--packages/Keyguard/res/values-sw600dp-port/integers.xml (renamed from packages/Keyguard/res/layout-sw600dp/keyguard_sim_puk_pin_navigation.xml)11
-rw-r--r--packages/Keyguard/res/values-sw600dp/alias.xml (renamed from core/res/res/values-land/alias.xml)2
-rw-r--r--packages/Keyguard/res/values-sw600dp/bools.xml27
-rw-r--r--packages/Keyguard/res/values-sw600dp/dimens.xml71
-rw-r--r--packages/Keyguard/res/values-sw600dp/integers.xml (renamed from packages/Keyguard/res/layout-sw600dp/keyguard_navigation.xml)10
-rw-r--r--packages/Keyguard/res/values-sw720dp-land/dimens.xml29
-rw-r--r--packages/Keyguard/res/values-sw720dp-port/integers.xml (renamed from packages/Keyguard/res/layout/keyguard_sim_puk_pin_account_navigation.xml)11
-rw-r--r--packages/Keyguard/res/values-sw720dp/dimens.xml66
-rw-r--r--packages/Keyguard/res/values-xlarge/dimens.xml27
-rw-r--r--packages/Keyguard/res/values/activitystrings.xml34
-rw-r--r--packages/Keyguard/res/values/alias.xml52
-rw-r--r--packages/Keyguard/res/values/arrays.xml93
-rw-r--r--packages/Keyguard/res/values/attrs.xml136
-rw-r--r--packages/Keyguard/res/values/bools.xml22
-rw-r--r--packages/Keyguard/res/values/colors.xml26
-rw-r--r--packages/Keyguard/res/values/config.xml (renamed from packages/Keyguard/res/layout/keyguard_multi_user_selector_widget.xml)24
-rw-r--r--packages/Keyguard/res/values/dimens.xml167
-rw-r--r--packages/Keyguard/res/values/integers.xml24
-rw-r--r--packages/Keyguard/res/values/strings.xml327
-rw-r--r--packages/Keyguard/res/values/styles.xml55
-rwxr-xr-xpackages/Keyguard/scripts/copy_profile_icons.sh14
-rwxr-xr-xpackages/Keyguard/scripts/new_merge.py165
-rw-r--r--packages/Keyguard/src/com/android/keyguard/BiometricSensorUnlock.java2
-rw-r--r--packages/Keyguard/src/com/android/keyguard/CameraWidgetFrame.java9
-rw-r--r--packages/Keyguard/src/com/android/keyguard/CarrierText.java23
-rw-r--r--packages/Keyguard/src/com/android/keyguard/ChallengeLayout.java2
-rw-r--r--packages/Keyguard/src/com/android/keyguard/CheckLongPressHelper.java2
-rw-r--r--packages/Keyguard/src/com/android/keyguard/ClockView.java3
-rw-r--r--packages/Keyguard/src/com/android/keyguard/EmergencyButton.java2
-rw-r--r--packages/Keyguard/src/com/android/keyguard/FaceUnlock.java2
-rw-r--r--packages/Keyguard/src/com/android/keyguard/KeyguardAbsKeyInputView.java3
-rw-r--r--packages/Keyguard/src/com/android/keyguard/KeyguardAccountView.java3
-rw-r--r--packages/Keyguard/src/com/android/keyguard/KeyguardActivityLauncher.java7
-rw-r--r--packages/Keyguard/src/com/android/keyguard/KeyguardCircleFramedDrawable.java2
-rw-r--r--packages/Keyguard/src/com/android/keyguard/KeyguardFaceUnlockView.java4
-rw-r--r--packages/Keyguard/src/com/android/keyguard/KeyguardGlowStripView.java4
-rw-r--r--packages/Keyguard/src/com/android/keyguard/KeyguardHostView.java23
-rw-r--r--packages/Keyguard/src/com/android/keyguard/KeyguardLinearLayout.java2
-rw-r--r--packages/Keyguard/src/com/android/keyguard/KeyguardMessageArea.java12
-rw-r--r--packages/Keyguard/src/com/android/keyguard/KeyguardMultiUserAvatar.java20
-rw-r--r--packages/Keyguard/src/com/android/keyguard/KeyguardMultiUserSelectorView.java18
-rw-r--r--packages/Keyguard/src/com/android/keyguard/KeyguardPINView.java4
-rw-r--r--packages/Keyguard/src/com/android/keyguard/KeyguardPasswordView.java3
-rw-r--r--packages/Keyguard/src/com/android/keyguard/KeyguardPatternView.java3
-rw-r--r--packages/Keyguard/src/com/android/keyguard/KeyguardSecurityCallback.java4
-rw-r--r--packages/Keyguard/src/com/android/keyguard/KeyguardSecurityContainer.java4
-rw-r--r--packages/Keyguard/src/com/android/keyguard/KeyguardSecurityModel.java2
-rw-r--r--packages/Keyguard/src/com/android/keyguard/KeyguardSecurityView.java2
-rw-r--r--packages/Keyguard/src/com/android/keyguard/KeyguardSecurityViewFlipper.java7
-rw-r--r--packages/Keyguard/src/com/android/keyguard/KeyguardSecurityViewHelper.java2
-rw-r--r--packages/Keyguard/src/com/android/keyguard/KeyguardSelectorView.java27
-rw-r--r--packages/Keyguard/src/com/android/keyguard/KeyguardService.java127
-rw-r--r--packages/Keyguard/src/com/android/keyguard/KeyguardSimPinView.java4
-rw-r--r--packages/Keyguard/src/com/android/keyguard/KeyguardSimPukView.java14
-rw-r--r--packages/Keyguard/src/com/android/keyguard/KeyguardStatusView.java8
-rw-r--r--packages/Keyguard/src/com/android/keyguard/KeyguardStatusViewManager.java0
-rw-r--r--packages/Keyguard/src/com/android/keyguard/KeyguardTestActivity.java350
-rw-r--r--packages/Keyguard/src/com/android/keyguard/KeyguardTransportControlView.java20
-rw-r--r--packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java8
-rw-r--r--packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitorCallback.java2
-rw-r--r--packages/Keyguard/src/com/android/keyguard/KeyguardViewBase.java3
-rw-r--r--packages/Keyguard/src/com/android/keyguard/KeyguardViewManager.java48
-rw-r--r--packages/Keyguard/src/com/android/keyguard/KeyguardViewMediator.java101
-rw-r--r--packages/Keyguard/src/com/android/keyguard/KeyguardViewStateManager.java2
-rw-r--r--packages/Keyguard/src/com/android/keyguard/KeyguardWidgetCarousel.java4
-rw-r--r--packages/Keyguard/src/com/android/keyguard/KeyguardWidgetFrame.java8
-rw-r--r--packages/Keyguard/src/com/android/keyguard/KeyguardWidgetPager.java8
-rw-r--r--packages/Keyguard/src/com/android/keyguard/LiftToActivateListener.java2
-rw-r--r--packages/Keyguard/src/com/android/keyguard/MultiPaneChallengeLayout.java6
-rw-r--r--packages/Keyguard/src/com/android/keyguard/NumPadKey.java3
-rw-r--r--packages/Keyguard/src/com/android/keyguard/ObscureSpeechDelegate.java2
-rw-r--r--packages/Keyguard/src/com/android/keyguard/PagedView.java4
-rw-r--r--packages/Keyguard/src/com/android/keyguard/SecurityMessageDisplay.java2
-rw-r--r--packages/Keyguard/src/com/android/keyguard/SlidingChallengeLayout.java4
-rw-r--r--packages/SystemUI/AndroidManifest.xml2
-rw-r--r--policy/src/com/android/internal/policy/impl/KeyguardServiceWrapper.java217
-rw-r--r--policy/src/com/android/internal/policy/impl/PhoneWindowManager.java187
-rw-r--r--policy/src/com/android/internal/policy/impl/keyguard/KeyguardServiceDelegate.java272
-rw-r--r--services/java/com/android/server/LockSettingsService.java26
-rw-r--r--services/java/com/android/server/SystemServer.java6
191 files changed, 3795 insertions, 1619 deletions
diff --git a/Android.mk b/Android.mk
index b9cd7bf..c454cf0 100644
--- a/Android.mk
+++ b/Android.mk
@@ -177,6 +177,8 @@ LOCAL_SRC_FILES += \
core/java/com/android/internal/backup/IBackupTransport.aidl \
core/java/com/android/internal/policy/IFaceLockCallback.aidl \
core/java/com/android/internal/policy/IFaceLockInterface.aidl \
+ core/java/com/android/internal/policy/IKeyguardResult.aidl \
+ core/java/com/android/internal/policy/IKeyguardService.aidl \
core/java/com/android/internal/os/IDropBoxManagerService.aidl \
core/java/com/android/internal/os/IResultReceiver.aidl \
core/java/com/android/internal/statusbar/IStatusBar.aidl \
diff --git a/core/java/android/appwidget/AppWidgetHost.java b/core/java/android/appwidget/AppWidgetHost.java
index a470e70..7794949 100644
--- a/core/java/android/appwidget/AppWidgetHost.java
+++ b/core/java/android/appwidget/AppWidgetHost.java
@@ -198,7 +198,6 @@ public class AppWidgetHost {
* @return a appWidgetId
*/
public int allocateAppWidgetId() {
-
try {
if (mPackageName == null) {
mPackageName = mContext.getPackageName();
diff --git a/core/java/android/view/WindowManager.java b/core/java/android/view/WindowManager.java
index 792188b..4cc9adb 100644
--- a/core/java/android/view/WindowManager.java
+++ b/core/java/android/view/WindowManager.java
@@ -527,6 +527,14 @@ public interface WindowManager extends ViewManager {
*/
public static final int TYPE_RECENTS_OVERLAY = FIRST_SYSTEM_WINDOW+28;
+
+ /**
+ * Window type: keyguard scrim window. Shows if keyguard needs to be restarted.
+ * In multiuser systems shows on all users' windows.
+ * @hide
+ */
+ public static final int TYPE_KEYGUARD_SCRIM = FIRST_SYSTEM_WINDOW+29;
+
/**
* End of types of system windows.
*/
diff --git a/core/java/com/android/internal/policy/IKeyguardResult.aidl b/core/java/com/android/internal/policy/IKeyguardResult.aidl
new file mode 100644
index 0000000..998cd61
--- /dev/null
+++ b/core/java/com/android/internal/policy/IKeyguardResult.aidl
@@ -0,0 +1,21 @@
+/*
+ * 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.internal.policy;
+
+oneway interface IKeyguardResult {
+ void onShown(IBinder windowToken);
+ void onKeyguardExitResult(boolean success);
+}
diff --git a/core/java/com/android/internal/policy/IKeyguardService.aidl b/core/java/com/android/internal/policy/IKeyguardService.aidl
new file mode 100644
index 0000000..76a4cfa
--- /dev/null
+++ b/core/java/com/android/internal/policy/IKeyguardService.aidl
@@ -0,0 +1,44 @@
+/*
+ * 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.internal.policy;
+
+import com.android.internal.policy.IKeyguardResult;
+
+import android.os.Bundle;
+
+interface IKeyguardService {
+ boolean isShowing();
+ boolean isSecure();
+ boolean isShowingAndNotHidden();
+ boolean isInputRestricted();
+ boolean isDismissable();
+ oneway void userActivity();
+ oneway void verifyUnlock(IKeyguardResult result);
+ oneway void keyguardDone(boolean authenticated, boolean wakeup);
+ oneway void setHidden(boolean isHidden);
+ oneway void dismiss();
+ oneway void onWakeKeyWhenKeyguardShowingTq(int keyCode);
+ oneway void onWakeMotionWhenKeyguardShowingTq();
+ oneway void onDreamingStarted();
+ oneway void onDreamingStopped();
+ oneway void onScreenTurnedOff(int reason);
+ oneway void onScreenTurnedOn(IKeyguardResult result);
+ oneway void setKeyguardEnabled(boolean enabled);
+ oneway void onSystemReady();
+ oneway void doKeyguardTimeout(in Bundle options);
+ oneway void setCurrentUser(int userId);
+ oneway void showAssistant();
+}
diff --git a/core/java/com/android/internal/widget/TransportControlView.java b/core/java/com/android/internal/widget/TransportControlView.java
deleted file mode 100644
index c33f038..0000000
--- a/core/java/com/android/internal/widget/TransportControlView.java
+++ /dev/null
@@ -1,514 +0,0 @@
-/*
- * 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.
- */
-
-package com.android.internal.widget;
-
-import java.lang.ref.WeakReference;
-
-import com.android.internal.widget.LockScreenWidgetCallback;
-import com.android.internal.widget.LockScreenWidgetInterface;
-
-import android.app.PendingIntent;
-import android.app.PendingIntent.CanceledException;
-import android.content.Context;
-import android.content.Intent;
-import android.graphics.Bitmap;
-import android.media.AudioManager;
-import android.media.MediaMetadataRetriever;
-import android.media.RemoteControlClient;
-import android.media.IRemoteControlDisplay;
-import android.os.Bundle;
-import android.os.Handler;
-import android.os.Message;
-import android.os.Parcel;
-import android.os.Parcelable;
-import android.os.RemoteException;
-import android.os.SystemClock;
-import android.text.Spannable;
-import android.text.TextUtils;
-import android.text.style.ForegroundColorSpan;
-import android.util.AttributeSet;
-import android.util.Log;
-import android.view.KeyEvent;
-import android.view.View;
-import android.view.View.OnClickListener;
-import android.widget.FrameLayout;
-import android.widget.ImageView;
-import android.widget.TextView;
-
-
-import com.android.internal.R;
-
-public class TransportControlView extends FrameLayout implements OnClickListener,
- LockScreenWidgetInterface {
-
- private static final int MSG_UPDATE_STATE = 100;
- private static final int MSG_SET_METADATA = 101;
- private static final int MSG_SET_TRANSPORT_CONTROLS = 102;
- private static final int MSG_SET_ARTWORK = 103;
- private static final int MSG_SET_GENERATION_ID = 104;
- private static final int MAXDIM = 512;
- private static final int DISPLAY_TIMEOUT_MS = 5000; // 5s
- protected static final boolean DEBUG = false;
- protected static final String TAG = "TransportControlView";
-
- private ImageView mAlbumArt;
- private TextView mTrackTitle;
- private ImageView mBtnPrev;
- private ImageView mBtnPlay;
- private ImageView mBtnNext;
- private int mClientGeneration;
- private Metadata mMetadata = new Metadata();
- private boolean mAttached;
- private PendingIntent mClientIntent;
- private int mTransportControlFlags;
- private int mCurrentPlayState;
- private AudioManager mAudioManager;
- private LockScreenWidgetCallback mWidgetCallbacks;
- private IRemoteControlDisplayWeak mIRCD;
-
- /**
- * The metadata which should be populated into the view once we've been attached
- */
- private Bundle mPopulateMetadataWhenAttached = null;
-
- // This handler is required to ensure messages from IRCD are handled in sequence and on
- // the UI thread.
- private Handler mHandler = new Handler() {
- @Override
- public void handleMessage(Message msg) {
- switch (msg.what) {
- case MSG_UPDATE_STATE:
- if (mClientGeneration == msg.arg1) updatePlayPauseState(msg.arg2);
- break;
-
- case MSG_SET_METADATA:
- if (mClientGeneration == msg.arg1) updateMetadata((Bundle) msg.obj);
- break;
-
- case MSG_SET_TRANSPORT_CONTROLS:
- if (mClientGeneration == msg.arg1) updateTransportControls(msg.arg2);
- break;
-
- case MSG_SET_ARTWORK:
- if (mClientGeneration == msg.arg1) {
- if (mMetadata.bitmap != null) {
- mMetadata.bitmap.recycle();
- }
- mMetadata.bitmap = (Bitmap) msg.obj;
- mAlbumArt.setImageBitmap(mMetadata.bitmap);
- }
- break;
-
- case MSG_SET_GENERATION_ID:
- if (msg.arg2 != 0) {
- // This means nobody is currently registered. Hide the view.
- if (mWidgetCallbacks != null) {
- mWidgetCallbacks.requestHide(TransportControlView.this);
- }
- }
- if (DEBUG) Log.v(TAG, "New genId = " + msg.arg1 + ", clearing = " + msg.arg2);
- mClientGeneration = msg.arg1;
- mClientIntent = (PendingIntent) msg.obj;
- break;
-
- }
- }
- };
-
- /**
- * This class is required to have weak linkage to the current TransportControlView
- * because the remote process can hold a strong reference to this binder object and
- * we can't predict when it will be GC'd in the remote process. Without this code, it
- * would allow a heavyweight object to be held on this side of the binder when there's
- * no requirement to run a GC on the other side.
- */
- private static class IRemoteControlDisplayWeak extends IRemoteControlDisplay.Stub {
- private WeakReference<Handler> mLocalHandler;
-
- IRemoteControlDisplayWeak(Handler handler) {
- mLocalHandler = new WeakReference<Handler>(handler);
- }
-
- public void setPlaybackState(int generationId, int state, long stateChangeTimeMs) {
- Handler handler = mLocalHandler.get();
- if (handler != null) {
- handler.obtainMessage(MSG_UPDATE_STATE, generationId, state).sendToTarget();
- }
- }
-
- public void setMetadata(int generationId, Bundle metadata) {
- Handler handler = mLocalHandler.get();
- if (handler != null) {
- handler.obtainMessage(MSG_SET_METADATA, generationId, 0, metadata).sendToTarget();
- }
- }
-
- public void setTransportControlFlags(int generationId, int flags) {
- Handler handler = mLocalHandler.get();
- if (handler != null) {
- handler.obtainMessage(MSG_SET_TRANSPORT_CONTROLS, generationId, flags)
- .sendToTarget();
- }
- }
-
- public void setArtwork(int generationId, Bitmap bitmap) {
- Handler handler = mLocalHandler.get();
- if (handler != null) {
- handler.obtainMessage(MSG_SET_ARTWORK, generationId, 0, bitmap).sendToTarget();
- }
- }
-
- public void setAllMetadata(int generationId, Bundle metadata, Bitmap bitmap) {
- Handler handler = mLocalHandler.get();
- if (handler != null) {
- handler.obtainMessage(MSG_SET_METADATA, generationId, 0, metadata).sendToTarget();
- handler.obtainMessage(MSG_SET_ARTWORK, generationId, 0, bitmap).sendToTarget();
- }
- }
-
- public void setCurrentClientId(int clientGeneration, PendingIntent mediaIntent,
- boolean clearing) throws RemoteException {
- Handler handler = mLocalHandler.get();
- if (handler != null) {
- handler.obtainMessage(MSG_SET_GENERATION_ID,
- clientGeneration, (clearing ? 1 : 0), mediaIntent).sendToTarget();
- }
- }
- };
-
- public TransportControlView(Context context, AttributeSet attrs) {
- super(context, attrs);
- if (DEBUG) Log.v(TAG, "Create TCV " + this);
- mAudioManager = new AudioManager(mContext);
- mCurrentPlayState = RemoteControlClient.PLAYSTATE_NONE; // until we get a callback
- mIRCD = new IRemoteControlDisplayWeak(mHandler);
- }
-
- private void updateTransportControls(int transportControlFlags) {
- mTransportControlFlags = transportControlFlags;
- }
-
- @Override
- public void onFinishInflate() {
- super.onFinishInflate();
- mTrackTitle = (TextView) findViewById(R.id.title);
- mTrackTitle.setSelected(true); // enable marquee
- mAlbumArt = (ImageView) findViewById(R.id.albumart);
- mBtnPrev = (ImageView) findViewById(R.id.btn_prev);
- mBtnPlay = (ImageView) findViewById(R.id.btn_play);
- mBtnNext = (ImageView) findViewById(R.id.btn_next);
- final View buttons[] = { mBtnPrev, mBtnPlay, mBtnNext };
- for (View view : buttons) {
- view.setOnClickListener(this);
- }
- }
-
- @Override
- public void onAttachedToWindow() {
- super.onAttachedToWindow();
- if (mPopulateMetadataWhenAttached != null) {
- updateMetadata(mPopulateMetadataWhenAttached);
- mPopulateMetadataWhenAttached = null;
- }
- if (!mAttached) {
- if (DEBUG) Log.v(TAG, "Registering TCV " + this);
- mAudioManager.registerRemoteControlDisplay(mIRCD);
- }
- mAttached = true;
- }
-
- @Override
- public void onDetachedFromWindow() {
- super.onDetachedFromWindow();
- if (mAttached) {
- if (DEBUG) Log.v(TAG, "Unregistering TCV " + this);
- mAudioManager.unregisterRemoteControlDisplay(mIRCD);
- }
- mAttached = false;
- }
-
- @Override
- protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
- super.onMeasure(widthMeasureSpec, heightMeasureSpec);
- int dim = Math.min(MAXDIM, Math.max(getWidth(), getHeight()));
-// Log.v(TAG, "setting max bitmap size: " + dim + "x" + dim);
-// mAudioManager.remoteControlDisplayUsesBitmapSize(mIRCD, dim, dim);
- }
-
- class Metadata {
- private String artist;
- private String trackTitle;
- private String albumTitle;
- private Bitmap bitmap;
-
- public String toString() {
- return "Metadata[artist=" + artist + " trackTitle=" + trackTitle + " albumTitle=" + albumTitle + "]";
- }
- }
-
- private String getMdString(Bundle data, int id) {
- return data.getString(Integer.toString(id));
- }
-
- private void updateMetadata(Bundle data) {
- if (mAttached) {
- mMetadata.artist = getMdString(data, MediaMetadataRetriever.METADATA_KEY_ALBUMARTIST);
- mMetadata.trackTitle = getMdString(data, MediaMetadataRetriever.METADATA_KEY_TITLE);
- mMetadata.albumTitle = getMdString(data, MediaMetadataRetriever.METADATA_KEY_ALBUM);
- populateMetadata();
- } else {
- mPopulateMetadataWhenAttached = data;
- }
- }
-
- /**
- * Populates the given metadata into the view
- */
- private void populateMetadata() {
- StringBuilder sb = new StringBuilder();
- int trackTitleLength = 0;
- if (!TextUtils.isEmpty(mMetadata.trackTitle)) {
- sb.append(mMetadata.trackTitle);
- trackTitleLength = mMetadata.trackTitle.length();
- }
- if (!TextUtils.isEmpty(mMetadata.artist)) {
- if (sb.length() != 0) {
- sb.append(" - ");
- }
- sb.append(mMetadata.artist);
- }
- if (!TextUtils.isEmpty(mMetadata.albumTitle)) {
- if (sb.length() != 0) {
- sb.append(" - ");
- }
- sb.append(mMetadata.albumTitle);
- }
- mTrackTitle.setText(sb.toString(), TextView.BufferType.SPANNABLE);
- Spannable str = (Spannable) mTrackTitle.getText();
- if (trackTitleLength != 0) {
- str.setSpan(new ForegroundColorSpan(0xffffffff), 0, trackTitleLength,
- Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
- trackTitleLength++;
- }
- if (sb.length() > trackTitleLength) {
- str.setSpan(new ForegroundColorSpan(0x7fffffff), trackTitleLength, sb.length(),
- Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
- }
-
- mAlbumArt.setImageBitmap(mMetadata.bitmap);
- final int flags = mTransportControlFlags;
- setVisibilityBasedOnFlag(mBtnPrev, flags, RemoteControlClient.FLAG_KEY_MEDIA_PREVIOUS);
- setVisibilityBasedOnFlag(mBtnNext, flags, RemoteControlClient.FLAG_KEY_MEDIA_NEXT);
- setVisibilityBasedOnFlag(mBtnPlay, flags,
- RemoteControlClient.FLAG_KEY_MEDIA_PLAY
- | RemoteControlClient.FLAG_KEY_MEDIA_PAUSE
- | RemoteControlClient.FLAG_KEY_MEDIA_PLAY_PAUSE
- | RemoteControlClient.FLAG_KEY_MEDIA_STOP);
-
- updatePlayPauseState(mCurrentPlayState);
- }
-
- private static void setVisibilityBasedOnFlag(View view, int flags, int flag) {
- if ((flags & flag) != 0) {
- view.setVisibility(View.VISIBLE);
- } else {
- view.setVisibility(View.GONE);
- }
- }
-
- private void updatePlayPauseState(int state) {
- if (DEBUG) Log.v(TAG,
- "updatePlayPauseState(), old=" + mCurrentPlayState + ", state=" + state);
- if (state == mCurrentPlayState) {
- return;
- }
- final int imageResId;
- final int imageDescId;
- boolean showIfHidden = false;
- switch (state) {
- case RemoteControlClient.PLAYSTATE_ERROR:
- imageResId = com.android.internal.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;
- break;
-
- case RemoteControlClient.PLAYSTATE_PLAYING:
- imageResId = com.android.internal.R.drawable.ic_media_pause;
- imageDescId = com.android.internal.R.string.lockscreen_transport_pause_description;
- showIfHidden = true;
- break;
-
- case RemoteControlClient.PLAYSTATE_BUFFERING:
- imageResId = com.android.internal.R.drawable.ic_media_stop;
- imageDescId = com.android.internal.R.string.lockscreen_transport_stop_description;
- showIfHidden = true;
- 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;
- showIfHidden = false;
- break;
- }
- mBtnPlay.setImageResource(imageResId);
- mBtnPlay.setContentDescription(getResources().getString(imageDescId));
- if (showIfHidden && mWidgetCallbacks != null && !mWidgetCallbacks.isVisible(this)) {
- mWidgetCallbacks.requestShow(this);
- }
- mCurrentPlayState = state;
- }
-
- static class SavedState extends BaseSavedState {
- boolean wasShowing;
-
- SavedState(Parcelable superState) {
- super(superState);
- }
-
- private SavedState(Parcel in) {
- super(in);
- this.wasShowing = in.readInt() != 0;
- }
-
- @Override
- public void writeToParcel(Parcel out, int flags) {
- super.writeToParcel(out, flags);
- out.writeInt(this.wasShowing ? 1 : 0);
- }
-
- public static final Parcelable.Creator<SavedState> CREATOR
- = new Parcelable.Creator<SavedState>() {
- public SavedState createFromParcel(Parcel in) {
- return new SavedState(in);
- }
-
- public SavedState[] newArray(int size) {
- return new SavedState[size];
- }
- };
- }
-
- @Override
- public Parcelable onSaveInstanceState() {
- if (DEBUG) Log.v(TAG, "onSaveInstanceState()");
- Parcelable superState = super.onSaveInstanceState();
- SavedState ss = new SavedState(superState);
- ss.wasShowing = mWidgetCallbacks != null && mWidgetCallbacks.isVisible(this);
- return ss;
- }
-
- @Override
- public void onRestoreInstanceState(Parcelable state) {
- if (DEBUG) Log.v(TAG, "onRestoreInstanceState()");
- if (!(state instanceof SavedState)) {
- super.onRestoreInstanceState(state);
- return;
- }
- SavedState ss = (SavedState) state;
- super.onRestoreInstanceState(ss.getSuperState());
- if (ss.wasShowing && mWidgetCallbacks != null) {
- mWidgetCallbacks.requestShow(this);
- }
- }
-
- public void onClick(View v) {
- int keyCode = -1;
- if (v == mBtnPrev) {
- keyCode = KeyEvent.KEYCODE_MEDIA_PREVIOUS;
- } else if (v == mBtnNext) {
- keyCode = KeyEvent.KEYCODE_MEDIA_NEXT;
- } else if (v == mBtnPlay) {
- keyCode = KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE;
-
- }
- if (keyCode != -1) {
- sendMediaButtonClick(keyCode);
- if (mWidgetCallbacks != null) {
- mWidgetCallbacks.userActivity(this);
- }
- }
- }
-
- private void sendMediaButtonClick(int keyCode) {
- if (mClientIntent == null) {
- // Shouldn't be possible because this view should be hidden in this case.
- Log.e(TAG, "sendMediaButtonClick(): No client is currently registered");
- return;
- }
- // use the registered PendingIntent that will be processed by the registered
- // media button event receiver, which is the component of mClientIntent
- KeyEvent keyEvent = new KeyEvent(KeyEvent.ACTION_DOWN, keyCode);
- Intent intent = new Intent(Intent.ACTION_MEDIA_BUTTON);
- intent.putExtra(Intent.EXTRA_KEY_EVENT, keyEvent);
- try {
- mClientIntent.send(getContext(), 0, intent);
- } catch (CanceledException e) {
- Log.e(TAG, "Error sending intent for media button down: "+e);
- e.printStackTrace();
- }
-
- keyEvent = new KeyEvent(KeyEvent.ACTION_UP, keyCode);
- intent = new Intent(Intent.ACTION_MEDIA_BUTTON);
- intent.putExtra(Intent.EXTRA_KEY_EVENT, keyEvent);
- try {
- mClientIntent.send(getContext(), 0, intent);
- } catch (CanceledException e) {
- Log.e(TAG, "Error sending intent for media button up: "+e);
- e.printStackTrace();
- }
- }
-
- public void setCallback(LockScreenWidgetCallback callback) {
- mWidgetCallbacks = callback;
- }
-
- public boolean providesClock() {
- return false;
- }
-
- private boolean wasPlayingRecently(int state, long stateChangeTimeMs) {
- switch (state) {
- case RemoteControlClient.PLAYSTATE_PLAYING:
- case RemoteControlClient.PLAYSTATE_FAST_FORWARDING:
- case RemoteControlClient.PLAYSTATE_REWINDING:
- case RemoteControlClient.PLAYSTATE_SKIPPING_FORWARDS:
- case RemoteControlClient.PLAYSTATE_SKIPPING_BACKWARDS:
- case RemoteControlClient.PLAYSTATE_BUFFERING:
- // actively playing or about to play
- return true;
- case RemoteControlClient.PLAYSTATE_NONE:
- return false;
- case RemoteControlClient.PLAYSTATE_STOPPED:
- case RemoteControlClient.PLAYSTATE_PAUSED:
- case RemoteControlClient.PLAYSTATE_ERROR:
- // we have stopped playing, check how long ago
- if (DEBUG) {
- if ((SystemClock.elapsedRealtime() - stateChangeTimeMs) < DISPLAY_TIMEOUT_MS) {
- Log.v(TAG, "wasPlayingRecently: time < TIMEOUT was playing recently");
- } else {
- Log.v(TAG, "wasPlayingRecently: time > TIMEOUT");
- }
- }
- return ((SystemClock.elapsedRealtime() - stateChangeTimeMs) < DISPLAY_TIMEOUT_MS);
- default:
- Log.e(TAG, "Unknown playback state " + state + " in wasPlayingRecently()");
- return false;
- }
- }
-}
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index 8a53cc3..bedb33c 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -2187,6 +2187,13 @@
android:description="@string/permdesc_accessNotifications"
android:protectionLevel="signature|system" />
+ <!-- Allows access to keyguard secure storage. Only allowed for system processes.
+ @hide -->
+ <permission android:name="android.permission.ACCESS_KEYGUARD_SECURE_STORAGE"
+ android:protectionLevel="signature"
+ android:label="@string/permlab_access_keyguard_secure_storage"
+ android:description="@string/permdesc_access_keyguard_secure_storage" />
+
<!-- The system process is explicitly the only one allowed to launch the
confirmation UI for full backup/restore -->
<uses-permission android:name="android.permission.CONFIRM_FULL_BACKUP"/>
diff --git a/packages/Keyguard/res/anim/lock_screen_behind_enter.xml b/core/res/res/anim/lock_screen_behind_enter.xml
index cb47b3c..cb47b3c 100644
--- a/packages/Keyguard/res/anim/lock_screen_behind_enter.xml
+++ b/core/res/res/anim/lock_screen_behind_enter.xml
diff --git a/core/res/res/anim/lock_screen_enter.xml b/core/res/res/anim/lock_screen_enter.xml
new file mode 100644
index 0000000..3a6c5b6
--- /dev/null
+++ b/core/res/res/anim/lock_screen_enter.xml
@@ -0,0 +1,24 @@
+<?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:interpolator="@interpolator/accelerate_cubic">
+ <alpha android:fromAlpha="0.0" android:toAlpha="1.0"
+ android:duration="@android:integer/config_activityDefaultDur" />
+</set>
diff --git a/core/res/res/anim/lock_screen_exit.xml b/core/res/res/anim/lock_screen_exit.xml
new file mode 100644
index 0000000..37383d9
--- /dev/null
+++ b/core/res/res/anim/lock_screen_exit.xml
@@ -0,0 +1,36 @@
+<?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:zAdjustment="top"
+ android:shareInterpolator="false">
+ <scale
+ android:fromXScale="1.0" android:toXScale="1.10"
+ 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: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:duration="@android:integer/config_shortAnimTime"/>
+</set> \ No newline at end of file
diff --git a/packages/Keyguard/res/anim/lock_screen_wallpaper_behind_enter.xml b/core/res/res/anim/lock_screen_wallpaper_behind_enter.xml
index c29fd1a..c29fd1a 100644
--- a/packages/Keyguard/res/anim/lock_screen_wallpaper_behind_enter.xml
+++ b/core/res/res/anim/lock_screen_wallpaper_behind_enter.xml
diff --git a/core/res/res/drawable-hdpi/ic_action_assist_generic_activated.png b/core/res/res/drawable-hdpi/ic_action_assist_generic_activated.png
new file mode 100644
index 0000000..c0e2098
--- /dev/null
+++ b/core/res/res/drawable-hdpi/ic_action_assist_generic_activated.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_action_assist_generic_normal.png b/core/res/res/drawable-hdpi/ic_action_assist_generic_normal.png
new file mode 100644
index 0000000..a852e2c
--- /dev/null
+++ b/core/res/res/drawable-hdpi/ic_action_assist_generic_normal.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_input_delete.png b/core/res/res/drawable-hdpi/ic_input_delete.png
new file mode 100644
index 0000000..5d638bd
--- /dev/null
+++ b/core/res/res/drawable-hdpi/ic_input_delete.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_lockscreen_glowdot.png b/core/res/res/drawable-hdpi/ic_lockscreen_glowdot.png
new file mode 100644
index 0000000..983c45e
--- /dev/null
+++ b/core/res/res/drawable-hdpi/ic_lockscreen_glowdot.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_lockscreen_handle_pressed.png b/core/res/res/drawable-hdpi/ic_lockscreen_handle_pressed.png
new file mode 100644
index 0000000..58a5f16
--- /dev/null
+++ b/core/res/res/drawable-hdpi/ic_lockscreen_handle_pressed.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_input_delete.png b/core/res/res/drawable-ldpi/ic_input_delete.png
new file mode 100644
index 0000000..d7eff17
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_input_delete.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_action_assist_generic_activated.png b/core/res/res/drawable-mdpi/ic_action_assist_generic_activated.png
new file mode 100644
index 0000000..f88f7e1
--- /dev/null
+++ b/core/res/res/drawable-mdpi/ic_action_assist_generic_activated.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_action_assist_generic_normal.png b/core/res/res/drawable-mdpi/ic_action_assist_generic_normal.png
new file mode 100644
index 0000000..7426994
--- /dev/null
+++ b/core/res/res/drawable-mdpi/ic_action_assist_generic_normal.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_input_delete.png b/core/res/res/drawable-mdpi/ic_input_delete.png
new file mode 100644
index 0000000..47c8708
--- /dev/null
+++ b/core/res/res/drawable-mdpi/ic_input_delete.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_lockscreen_glowdot.png b/core/res/res/drawable-mdpi/ic_lockscreen_glowdot.png
new file mode 100644
index 0000000..056c3f17
--- /dev/null
+++ b/core/res/res/drawable-mdpi/ic_lockscreen_glowdot.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_lockscreen_handle_pressed.png b/core/res/res/drawable-mdpi/ic_lockscreen_handle_pressed.png
new file mode 100644
index 0000000..0187a02
--- /dev/null
+++ b/core/res/res/drawable-mdpi/ic_lockscreen_handle_pressed.png
Binary files differ
diff --git a/core/res/res/drawable-sw600dp-hdpi/ic_lockscreen_handle_pressed.png b/core/res/res/drawable-sw600dp-hdpi/ic_lockscreen_handle_pressed.png
new file mode 100644
index 0000000..728fc67
--- /dev/null
+++ b/core/res/res/drawable-sw600dp-hdpi/ic_lockscreen_handle_pressed.png
Binary files differ
diff --git a/core/res/res/drawable-sw600dp-mdpi/ic_lockscreen_handle_pressed.png b/core/res/res/drawable-sw600dp-mdpi/ic_lockscreen_handle_pressed.png
new file mode 100644
index 0000000..c7da024
--- /dev/null
+++ b/core/res/res/drawable-sw600dp-mdpi/ic_lockscreen_handle_pressed.png
Binary files differ
diff --git a/core/res/res/drawable-sw600dp-xhdpi/ic_lockscreen_handle_pressed.png b/core/res/res/drawable-sw600dp-xhdpi/ic_lockscreen_handle_pressed.png
new file mode 100644
index 0000000..534c10b
--- /dev/null
+++ b/core/res/res/drawable-sw600dp-xhdpi/ic_lockscreen_handle_pressed.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_action_assist_generic_activated.png b/core/res/res/drawable-xhdpi/ic_action_assist_generic_activated.png
new file mode 100644
index 0000000..500b157
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_action_assist_generic_activated.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_action_assist_generic_normal.png b/core/res/res/drawable-xhdpi/ic_action_assist_generic_normal.png
new file mode 100644
index 0000000..d0e4cf3
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_action_assist_generic_normal.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_input_delete.png b/core/res/res/drawable-xhdpi/ic_input_delete.png
new file mode 100644
index 0000000..8b822d9
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_input_delete.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_lockscreen_glowdot.png b/core/res/res/drawable-xhdpi/ic_lockscreen_glowdot.png
new file mode 100644
index 0000000..cbd039a
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_lockscreen_glowdot.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_lockscreen_handle_pressed.png b/core/res/res/drawable-xhdpi/ic_lockscreen_handle_pressed.png
new file mode 100644
index 0000000..2d28009
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_lockscreen_handle_pressed.png
Binary files differ
diff --git a/core/res/res/drawable/ic_action_assist_generic.xml b/core/res/res/drawable/ic_action_assist_generic.xml
new file mode 100644
index 0000000..60f5d5d
--- /dev/null
+++ b/core/res/res/drawable/ic_action_assist_generic.xml
@@ -0,0 +1,36 @@
+<?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.
+-->
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <item
+ android:state_enabled="true"
+ android:state_active="false"
+ android:state_focused="false"
+ android:drawable="@drawable/ic_action_assist_generic_normal" />
+
+ <item
+ android:state_enabled="true"
+ android:state_active="true"
+ android:state_focused="false"
+ android:drawable="@drawable/ic_action_assist_generic_activated" />
+
+ <item
+ android:state_enabled="true"
+ android:state_active="false"
+ android:state_focused="true"
+ android:drawable="@drawable/ic_action_assist_generic_activated" />
+
+</selector>
diff --git a/core/res/res/drawable/ic_lockscreen_outerring.xml b/core/res/res/drawable/ic_lockscreen_outerring.xml
new file mode 100644
index 0000000..75bea70
--- /dev/null
+++ b/core/res/res/drawable/ic_lockscreen_outerring.xml
@@ -0,0 +1,24 @@
+<?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.
+-->
+
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+ android:shape="oval"
+ >
+ <size android:height="@dimen/keyguard_lockscreen_outerring_diameter"
+ android:width="@dimen/keyguard_lockscreen_outerring_diameter" />
+ <solid android:color="#00000000" />
+ <stroke android:color="#1affffff" android:width="2dp" />
+</shape>
diff --git a/core/res/res/values-land/arrays.xml b/core/res/res/values-land/arrays.xml
index 240b9e4..5602a1c 100644
--- a/core/res/res/values-land/arrays.xml
+++ b/core/res/res/values-land/arrays.xml
@@ -19,54 +19,4 @@
-->
<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/core/res/res/values-sw600dp-land/arrays.xml b/core/res/res/values-sw600dp-land/arrays.xml
index 5550216..5602a1c 100644
--- a/core/res/res/values-sw600dp-land/arrays.xml
+++ b/core/res/res/values-sw600dp-land/arrays.xml
@@ -19,54 +19,4 @@
-->
<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/core/res/res/values/arrays.xml b/core/res/res/values/arrays.xml
index f7ff77b..7cdc7bb 100644
--- a/core/res/res/values/arrays.xml
+++ b/core/res/res/values/arrays.xml
@@ -342,75 +342,4 @@
<item>中文 (繁體)</item>
</string-array>
- <!-- 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>@*android:drawable/ic_lockscreen_unlock</item>
- </array>
-
- <array name="lockscreen_target_descriptions_unlock_only">
- <item>@*android: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/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
index 5fc26fc..a96a6e9 100644
--- a/core/res/res/values/strings.xml
+++ b/core/res/res/values/strings.xml
@@ -3429,6 +3429,11 @@
<!-- Description of an application permission that lets an application route media output. -->
<string name="permdesc_route_media_output">Allows an application to route media output to other external devices.</string>
+ <!-- Title of an application permission that lets an application access keyguard secure storage. -->
+ <string name="permlab_access_keyguard_secure_storage">Access keyguard secure storage</string>
+ <!-- Description of an application permission that lets an application access keyguard secure storage. -->
+ <string name="permdesc_access_keyguard_secure_storage">Allows an application to access keguard secure storage.</string>
+
<!-- Shown in the tutorial for tap twice for zoom control. -->
<string name="tutorial_double_tap_to_zoom_message_short">Touch twice for zoom control</string>
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index c87cb27..a26f67a 100644
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -38,16 +38,12 @@
<java-symbol type="id" name="action_menu_presenter" />
<java-symbol type="id" name="action_mode_close_button" />
<java-symbol type="id" name="activity_chooser_view_content" />
- <java-symbol type="id" name="albumart" />
<java-symbol type="id" name="alertTitle" />
<java-symbol type="id" name="allow_button" />
<java-symbol type="id" name="alwaysUse" />
<java-symbol type="id" name="amPm" />
<java-symbol type="id" name="authtoken_type" />
<java-symbol type="id" name="back_button" />
- <java-symbol type="id" name="btn_next" />
- <java-symbol type="id" name="btn_play" />
- <java-symbol type="id" name="btn_prev" />
<java-symbol type="id" name="button_bar" />
<java-symbol type="id" name="buttonPanel" />
<java-symbol type="id" name="by_common" />
@@ -558,26 +554,6 @@
<java-symbol type="string" name="keyboardview_keycode_enter" />
<java-symbol type="string" name="keyboardview_keycode_mode_change" />
<java-symbol type="string" name="keyboardview_keycode_shift" />
- <java-symbol type="string" name="keyguard_accessibility_add_widget" />
- <java-symbol type="string" name="keyguard_accessibility_camera" />
- <java-symbol type="string" name="keyguard_accessibility_expand_lock_area" />
- <java-symbol type="string" name="keyguard_accessibility_face_unlock" />
- <java-symbol type="string" name="keygaurd_accessibility_media_controls" />
- <java-symbol type="string" name="keyguard_accessibility_pattern_area" />
- <java-symbol type="string" name="keyguard_accessibility_pattern_unlock" />
- <java-symbol type="string" name="keyguard_accessibility_password_unlock" />
- <java-symbol type="string" name="keyguard_accessibility_pin_unlock" />
- <java-symbol type="string" name="keyguard_accessibility_slide_area" />
- <java-symbol type="string" name="keyguard_accessibility_slide_unlock" />
- <java-symbol type="string" name="keyguard_accessibility_status" />
- <java-symbol type="string" name="keyguard_accessibility_user_selector" />
- <java-symbol type="string" name="keyguard_accessibility_widget" />
- <java-symbol type="string" name="keyguard_accessibility_widget_deleted" />
- <java-symbol type="string" name="keyguard_accessibility_widget_empty_slot" />
- <java-symbol type="string" name="keyguard_accessibility_widget_reorder_start" />
- <java-symbol type="string" name="keyguard_accessibility_widget_reorder_end" />
- <java-symbol type="string" name="keyguard_accessibility_unlock_area_collapsed" />
- <java-symbol type="string" name="keyguard_accessibility_unlock_area_expanded" />
<java-symbol type="string" name="kilobyteShort" />
<java-symbol type="string" name="last_month" />
<java-symbol type="string" name="launchBrowserDefault" />
@@ -587,9 +563,6 @@
<java-symbol type="string" name="lockscreen_access_pattern_start" />
<java-symbol type="string" name="lockscreen_emergency_call" />
<java-symbol type="string" name="lockscreen_return_to_call" />
- <java-symbol type="string" name="lockscreen_transport_pause_description" />
- <java-symbol type="string" name="lockscreen_transport_play_description" />
- <java-symbol type="string" name="lockscreen_transport_stop_description" />
<java-symbol type="string" name="low_memory" />
<java-symbol type="string" name="media_bad_removal" />
<java-symbol type="string" name="media_checking" />
@@ -1000,16 +973,11 @@
<java-symbol type="drawable" name="unlock_halo" />
<java-symbol type="drawable" name="unlock_ring" />
<java-symbol type="drawable" name="unlock_wave" />
- <java-symbol type="drawable" name="ic_lockscreen_camera" />
- <java-symbol type="drawable" name="ic_lockscreen_silent" />
- <java-symbol type="drawable" name="ic_lockscreen_unlock" />
<java-symbol type="drawable" name="ic_action_assist_generic" />
- <java-symbol type="drawable" name="ic_lockscreen_alarm" />
<java-symbol type="drawable" name="notification_bg" />
<java-symbol type="drawable" name="notification_bg_low" />
<java-symbol type="drawable" name="notification_template_icon_bg" />
<java-symbol type="drawable" name="notification_template_icon_low_bg" />
- <java-symbol type="drawable" name="ic_lockscreen_unlock_phantom" />
<java-symbol type="drawable" name="ic_media_route_on_holo_dark" />
<java-symbol type="drawable" name="ic_media_route_disabled_holo_dark" />
@@ -1109,10 +1077,7 @@
<java-symbol type="layout" name="notification_template_part_time" />
<java-symbol type="layout" name="notification_template_part_chronometer" />
<java-symbol type="layout" name="notification_template_inbox" />
- <java-symbol type="layout" name="keyguard_multi_user_avatar" />
- <java-symbol type="layout" name="keyguard_multi_user_selector_widget" />
<java-symbol type="layout" name="sms_short_code_confirmation_dialog" />
- <java-symbol type="layout" name="keyguard_add_widget" />
<java-symbol type="layout" name="action_bar_up_container" />
<java-symbol type="anim" name="slide_in_child_bottom" />
@@ -1129,7 +1094,6 @@
<java-symbol type="xml" name="password_kbd_qwerty_shifted" />
<java-symbol type="xml" name="password_kbd_symbols" />
<java-symbol type="xml" name="password_kbd_symbols_shift" />
- <java-symbol type="xml" name="kg_password_kbd_numeric" />
<java-symbol type="xml" name="power_profile" />
<java-symbol type="xml" name="time_zones_by_country" />
<java-symbol type="xml" name="sms_short_codes" />
@@ -1181,8 +1145,6 @@
<!-- From android.policy -->
<java-symbol type="anim" name="app_starting_exit" />
- <java-symbol type="anim" name="lock_screen_behind_enter" />
- <java-symbol type="anim" name="lock_screen_wallpaper_behind_enter" />
<java-symbol type="anim" name="dock_top_enter" />
<java-symbol type="anim" name="dock_top_exit" />
<java-symbol type="anim" name="dock_bottom_enter" />
@@ -1191,22 +1153,12 @@
<java-symbol type="anim" name="dock_left_exit" />
<java-symbol type="anim" name="dock_right_enter" />
<java-symbol type="anim" name="dock_right_exit" />
- <java-symbol type="anim" name="keyguard_security_animate_in" />
- <java-symbol type="anim" name="keyguard_security_animate_out" />
- <java-symbol type="anim" name="keyguard_security_fade_in" />
- <java-symbol type="anim" name="keyguard_security_fade_out" />
- <java-symbol type="anim" name="keyguard_action_assist_exit" />
- <java-symbol type="anim" name="keyguard_action_assist_enter" />
<java-symbol type="array" name="config_keyboardTapVibePattern" />
<java-symbol type="array" name="config_longPressVibePattern" />
<java-symbol type="array" name="config_safeModeDisabledVibePattern" />
<java-symbol type="array" name="config_safeModeEnabledVibePattern" />
<java-symbol type="array" name="config_virtualKeyVibePattern" />
- <java-symbol type="array" name="lockscreen_targets_when_silent" />
- <java-symbol type="array" name="lockscreen_targets_when_soundon" />
- <java-symbol type="array" name="lockscreen_targets_with_camera" />
- <java-symbol type="array" name="lockscreen_num_pad_klondike" />
<java-symbol type="attr" name="actionModePopupWindowStyle" />
<java-symbol type="attr" name="dialogCustomTitleDecorLayout" />
<java-symbol type="attr" name="dialogTitleDecorLayout" />
@@ -1221,33 +1173,11 @@
<java-symbol type="bool" name="config_lidControlsSleep" />
<java-symbol type="bool" name="config_reverseDefaultRotation" />
<java-symbol type="bool" name="config_showNavigationBar" />
- <java-symbol type="bool" name="kg_enable_camera_default_widget" />
- <java-symbol type="bool" name="kg_share_status_area" />
- <java-symbol type="bool" name="kg_sim_puk_account_full_screen" />
- <java-symbol type="bool" name="kg_top_align_page_shrink_on_bouncer_visible" />
<java-symbol type="bool" name="target_honeycomb_needs_options_menu" />
- <java-symbol type="bool" name="kg_center_small_widgets_vertically" />
- <java-symbol type="bool" name="kg_show_ime_at_screen_on" />
- <java-symbol type="color" name="kg_multi_user_text_active" />
- <java-symbol type="color" name="kg_multi_user_text_inactive" />
- <java-symbol type="color" name="kg_widget_pager_gradient" />
- <java-symbol type="color" name="keyguard_avatar_frame_color" />
- <java-symbol type="color" name="keyguard_avatar_frame_pressed_color" />
- <java-symbol type="color" name="keyguard_avatar_frame_shadow_color" />
- <java-symbol type="color" name="keyguard_avatar_nick_color" />
<java-symbol type="dimen" name="navigation_bar_height" />
<java-symbol type="dimen" name="navigation_bar_height_landscape" />
<java-symbol type="dimen" name="navigation_bar_width" />
<java-symbol type="dimen" name="status_bar_height" />
- <java-symbol type="dimen" name="kg_widget_pager_horizontal_padding" />
- <java-symbol type="dimen" name="kg_widget_pager_top_padding" />
- <java-symbol type="dimen" name="kg_widget_pager_bottom_padding" />
- <java-symbol type="dimen" name="keyguard_avatar_size" />
- <java-symbol type="dimen" name="keyguard_avatar_frame_stroke_width" />
- <java-symbol type="dimen" name="keyguard_avatar_frame_shadow_radius" />
- <java-symbol type="dimen" name="kg_edge_swipe_region_size" />
- <java-symbol type="dimen" name="kg_squashed_layout_threshold" />
- <java-symbol type="dimen" name="kg_small_widget_height" />
<java-symbol type="drawable" name="ic_jog_dial_sound_off" />
<java-symbol type="drawable" name="ic_jog_dial_sound_on" />
<java-symbol type="drawable" name="ic_jog_dial_unlock" />
@@ -1266,9 +1196,7 @@
<java-symbol type="drawable" name="magnified_region_frame" />
<java-symbol type="drawable" name="menu_background" />
<java-symbol type="drawable" name="stat_sys_secure" />
- <java-symbol type="drawable" name="kg_widget_bg_padded" />
<java-symbol type="id" name="action_mode_bar_stub" />
- <java-symbol type="id" name="alarm_status" />
<java-symbol type="id" name="button0" />
<java-symbol type="id" name="button4" />
<java-symbol type="id" name="button5" />
@@ -1276,15 +1204,12 @@
<java-symbol type="id" name="button7" />
<java-symbol type="id" name="date" />
<java-symbol type="id" name="eight" />
- <java-symbol type="id" name="face_unlock_area_view" />
- <java-symbol type="id" name="face_unlock_cancel_button" />
<java-symbol type="id" name="five" />
<java-symbol type="id" name="four" />
<java-symbol type="id" name="icon_menu_presenter" />
<java-symbol type="id" name="keyboard" />
<java-symbol type="id" name="list_menu_presenter" />
<java-symbol type="id" name="lock_screen" />
- <java-symbol type="id" name="login" />
<java-symbol type="id" name="nine" />
<java-symbol type="id" name="no_applications_message" />
<java-symbol type="id" name="ok" />
@@ -1292,56 +1217,14 @@
<java-symbol type="id" name="option1" />
<java-symbol type="id" name="option2" />
<java-symbol type="id" name="option3" />
- <java-symbol type="id" name="password" />
- <java-symbol type="id" name="passwordEntry" />
- <java-symbol type="id" name="pinEntry" />
<java-symbol type="id" name="right_icon" />
<java-symbol type="id" name="seven" />
<java-symbol type="id" name="six" />
<java-symbol type="id" name="status" />
- <java-symbol type="id" name="switch_ime_button" />
<java-symbol type="id" name="three" />
<java-symbol type="id" name="title_container" />
<java-symbol type="id" name="two" />
<java-symbol type="id" name="zero" />
- <java-symbol type="id" name="keyguard_message_area" />
- <java-symbol type="id" name="keyguard_click_area" />
- <java-symbol type="id" name="keyguard_selector_view" />
- <java-symbol type="id" name="keyguard_pattern_view" />
- <java-symbol type="id" name="keyguard_password_view" />
- <java-symbol type="id" name="keyguard_pin_view" />
- <java-symbol type="id" name="keyguard_face_unlock_view" />
- <java-symbol type="id" name="keyguard_sim_pin_view" />
- <java-symbol type="id" name="keyguard_sim_puk_view" />
- <java-symbol type="id" name="keyguard_account_view" />
- <java-symbol type="id" name="keyguard_selector_fade_container" />
- <java-symbol type="id" name="keyguard_widget_pager_delete_target" />
- <java-symbol type="id" name="keyguard_bouncer_frame" />
- <java-symbol type="id" name="app_widget_container" />
- <java-symbol type="id" name="view_flipper" />
- <java-symbol type="id" name="emergency_call_button" />
- <java-symbol type="id" name="keyguard_host_view" />
- <java-symbol type="id" name="delete_button" />
- <java-symbol type="id" name="lockPatternView" />
- <java-symbol type="id" name="forgot_password_button" />
- <java-symbol type="id" name="glow_pad_view" />
- <java-symbol type="id" name="delete_button" />
- <java-symbol type="id" name="keyguard_user_avatar" />
- <java-symbol type="id" name="keyguard_user_name" />
- <java-symbol type="id" name="keyguard_transport_control" />
- <java-symbol type="id" name="keyguard_status_view" />
- <java-symbol type="id" name="keyguard_status_view_face_palm" />
- <java-symbol type="id" name="keyguard_users_grid" />
- <java-symbol type="id" name="clock_text" />
- <java-symbol type="id" name="clock_view" />
- <java-symbol type="id" name="keyguard_multi_user_selector" />
- <java-symbol type="id" name="sliding_layout" />
- <java-symbol type="id" name="keyguard_add_widget" />
- <java-symbol type="id" name="keyguard_add_widget_view" />
- <java-symbol type="id" name="multi_pane_challenge" />
- <java-symbol type="id" name="keyguard_user_selector" />
- <java-symbol type="id" name="key_enter" />
- <java-symbol type="id" name="keyguard_selector_view_frame" />
<java-symbol type="integer" name="config_carDockRotation" />
<java-symbol type="integer" name="config_defaultUiModeType" />
<java-symbol type="integer" name="config_deskDockRotation" />
@@ -1349,18 +1232,8 @@
<java-symbol type="integer" name="config_lidNavigationAccessibility" />
<java-symbol type="integer" name="config_lidOpenRotation" />
<java-symbol type="integer" name="config_longPressOnHomeBehavior" />
- <java-symbol type="integer" name="kg_security_flip_duration" />
- <java-symbol type="integer" name="kg_carousel_angle" />
<java-symbol type="layout" name="global_actions_item" />
<java-symbol type="layout" name="global_actions_silent_mode" />
- <java-symbol type="layout" name="keyguard_selector_view" />
- <java-symbol type="layout" name="keyguard_pattern_view" />
- <java-symbol type="layout" name="keyguard_password_view" />
- <java-symbol type="layout" name="keyguard_pin_view" />
- <java-symbol type="layout" name="keyguard_face_unlock_view" />
- <java-symbol type="layout" name="keyguard_sim_pin_view" />
- <java-symbol type="layout" name="keyguard_sim_puk_view" />
- <java-symbol type="layout" name="keyguard_account_view" />
<java-symbol type="layout" name="recent_apps_dialog" />
<java-symbol type="layout" name="screen_action_bar" />
<java-symbol type="layout" name="screen_action_bar_overlay" />
@@ -1370,9 +1243,6 @@
<java-symbol type="layout" name="screen_simple_overlay_action_mode" />
<java-symbol type="layout" name="screen_title" />
<java-symbol type="layout" name="screen_title_icons" />
- <java-symbol type="layout" name="keyguard_host_view" />
- <java-symbol type="layout" name="keyguard_transport_control_view" />
- <java-symbol type="layout" name="keyguard_status_view" />
<java-symbol type="string" name="abbrev_wday_month_day_no_year" />
<java-symbol type="string" name="system_ui_date_pattern" />
<java-symbol type="string" name="android_upgrading_title" />
@@ -1388,41 +1258,7 @@
<java-symbol type="string" name="global_action_silent_mode_on_status" />
<java-symbol type="string" name="global_action_toggle_silent_mode" />
<java-symbol type="string" name="invalidPuk" />
- <java-symbol type="string" name="keyguard_password_enter_pin_code" />
- <java-symbol type="string" name="keyguard_password_enter_puk_code" />
- <java-symbol type="string" name="keyguard_password_wrong_pin_code" />
<java-symbol type="string" name="lockscreen_carrier_default" />
- <java-symbol type="string" name="lockscreen_charged" />
- <java-symbol type="string" name="lockscreen_failed_attempts_almost_at_wipe" />
- <java-symbol type="string" name="lockscreen_failed_attempts_almost_glogin" />
- <java-symbol type="string" name="lockscreen_failed_attempts_now_wiping" />
- <java-symbol type="string" name="lockscreen_forgot_pattern_button_text" />
- <java-symbol type="string" name="lockscreen_glogin_checking_password" />
- <java-symbol type="string" name="lockscreen_glogin_forgot_pattern" />
- <java-symbol type="string" name="lockscreen_glogin_invalid_input" />
- <java-symbol type="string" name="lockscreen_glogin_too_many_attempts" />
- <java-symbol type="string" name="lockscreen_instructions_when_pattern_disabled" />
- <java-symbol type="string" name="lockscreen_low_battery" />
- <java-symbol type="string" name="lockscreen_missing_sim_instructions" />
- <java-symbol type="string" name="lockscreen_missing_sim_instructions_long" />
- <java-symbol type="string" name="lockscreen_missing_sim_message_short" />
- <java-symbol type="string" name="lockscreen_network_locked_message" />
- <java-symbol type="string" name="lockscreen_password_wrong" />
- <java-symbol type="string" name="lockscreen_pattern_instructions" />
- <java-symbol type="string" name="lockscreen_pattern_wrong" />
- <java-symbol type="string" name="lockscreen_permanent_disabled_sim_message_short" />
- <java-symbol type="string" name="lockscreen_permanent_disabled_sim_instructions" />
- <java-symbol type="string" name="lockscreen_plugged_in" />
- <java-symbol type="string" name="lockscreen_sim_locked_message" />
- <java-symbol type="string" name="lockscreen_sim_puk_locked_message" />
- <java-symbol type="string" name="lockscreen_sim_unlock_progress_dialog_message" />
- <java-symbol type="string" name="lockscreen_sound_off_label" />
- <java-symbol type="string" name="lockscreen_sound_on_label" />
- <java-symbol type="string" name="lockscreen_too_many_failed_attempts_countdown" />
- <java-symbol type="string" name="lockscreen_too_many_failed_attempts_dialog_message" />
- <java-symbol type="string" name="lockscreen_too_many_failed_password_attempts_dialog_message" />
- <java-symbol type="string" name="lockscreen_too_many_failed_pin_attempts_dialog_message" />
- <java-symbol type="string" name="lockscreen_unlock_label" />
<java-symbol type="string" name="status_bar_device_locked" />
<java-symbol type="style" name="Animation.LockScreen" />
<java-symbol type="style" name="Theme.Dialog.RecentApplications" />
@@ -1430,40 +1266,6 @@
<java-symbol type="style" name="Widget.Button.NumPadKey" />
<java-symbol type="style" name="TextAppearance.NumPadKey" />
<java-symbol type="style" name="TextAppearance.NumPadKey.Klondike" />
- <java-symbol type="string" name="kg_emergency_call_label" />
- <java-symbol type="string" name="kg_forgot_pattern_button_text" />
- <java-symbol type="string" name="kg_wrong_pattern" />
- <java-symbol type="string" name="kg_wrong_password" />
- <java-symbol type="string" name="kg_wrong_pin" />
- <java-symbol type="string" name="kg_too_many_failed_attempts_countdown" />
- <java-symbol type="string" name="kg_pattern_instructions" />
- <java-symbol type="string" name="kg_sim_pin_instructions" />
- <java-symbol type="string" name="kg_pin_instructions" />
- <java-symbol type="string" name="kg_password_instructions" />
- <java-symbol type="string" name="kg_puk_enter_puk_hint" />
- <java-symbol type="string" name="kg_puk_enter_pin_hint" />
- <java-symbol type="string" name="kg_sim_unlock_progress_dialog_message" />
- <java-symbol type="string" name="kg_password_wrong_pin_code" />
- <java-symbol type="string" name="kg_invalid_sim_pin_hint" />
- <java-symbol type="string" name="kg_invalid_sim_puk_hint" />
- <java-symbol type="string" name="kg_invalid_puk" />
- <java-symbol type="string" name="kg_login_too_many_attempts" />
- <java-symbol type="string" name="kg_login_instructions" />
- <java-symbol type="string" name="kg_login_username_hint" />
- <java-symbol type="string" name="kg_login_password_hint" />
- <java-symbol type="string" name="kg_login_submit_button" />
- <java-symbol type="string" name="kg_login_invalid_input" />
- <java-symbol type="string" name="kg_login_account_recovery_hint" />
- <java-symbol type="string" name="kg_login_checking_password" />
- <java-symbol type="string" name="kg_too_many_failed_pin_attempts_dialog_message" />
- <java-symbol type="string" name="kg_too_many_failed_pattern_attempts_dialog_message" />
- <java-symbol type="string" name="kg_too_many_failed_password_attempts_dialog_message" />
- <java-symbol type="string" name="kg_failed_attempts_almost_at_wipe" />
- <java-symbol type="string" name="kg_failed_attempts_now_wiping" />
- <java-symbol type="string" name="kg_failed_attempts_almost_at_login" />
- <java-symbol type="string" name="kg_enter_confirm_pin_hint" />
- <java-symbol type="string" name="kg_invalid_confirm_pin_hint" />
- <java-symbol type="string" name="kg_text_message_separator" />
<!-- From services -->
<java-symbol type="anim" name="screen_rotate_0_enter" />
@@ -1680,6 +1482,9 @@
<java-symbol type="anim" name="push_down_out" />
<java-symbol type="anim" name="push_up_in" />
<java-symbol type="anim" name="push_up_out" />
+ <java-symbol type="anim" name="lock_screen_wallpaper_behind_enter" />
+ <java-symbol type="anim" name="lock_screen_behind_enter" />
+
<java-symbol type="bool" name="config_alwaysUseCdmaRssi" />
<java-symbol type="dimen" name="status_bar_icon_size" />
<java-symbol type="dimen" name="system_bar_icon_size" />
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/drawable-hdpi/ic_media_next.png b/packages/Keyguard/res/drawable-hdpi/ic_media_next.png
new file mode 100644
index 0000000..6e27b81
--- /dev/null
+++ b/packages/Keyguard/res/drawable-hdpi/ic_media_next.png
Binary files differ
diff --git a/packages/Keyguard/res/drawable-hdpi/ic_media_play.png b/packages/Keyguard/res/drawable-hdpi/ic_media_play.png
new file mode 100644
index 0000000..2746d17
--- /dev/null
+++ b/packages/Keyguard/res/drawable-hdpi/ic_media_play.png
Binary files differ
diff --git a/packages/Keyguard/res/drawable-hdpi/ic_media_previous.png b/packages/Keyguard/res/drawable-hdpi/ic_media_previous.png
new file mode 100644
index 0000000..85b3766
--- /dev/null
+++ b/packages/Keyguard/res/drawable-hdpi/ic_media_previous.png
Binary files differ
diff --git a/packages/Keyguard/res/drawable-hdpi/kg_add_widget.png b/packages/Keyguard/res/drawable-hdpi/kg_add_widget.png
index 68971a5..7456705 100644
--- a/packages/Keyguard/res/drawable-hdpi/kg_add_widget.png
+++ b/packages/Keyguard/res/drawable-hdpi/kg_add_widget.png
Binary files differ
diff --git a/packages/Keyguard/res/drawable-hdpi/kg_security_lock_focused.png b/packages/Keyguard/res/drawable-hdpi/kg_security_lock_focused.png
index 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
Binary files differ
diff --git a/packages/Keyguard/res/drawable-hdpi/kg_security_lock_normal.png b/packages/Keyguard/res/drawable-hdpi/kg_security_lock_normal.png
index 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
Binary files differ
diff --git a/packages/Keyguard/res/drawable-hdpi/kg_security_lock_pressed.png b/packages/Keyguard/res/drawable-hdpi/kg_security_lock_pressed.png
index 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
Binary files differ
diff --git a/packages/Keyguard/res/drawable-ldpi/ic_media_next.png b/packages/Keyguard/res/drawable-ldpi/ic_media_next.png
new file mode 100644
index 0000000..99927fd
--- /dev/null
+++ b/packages/Keyguard/res/drawable-ldpi/ic_media_next.png
Binary files differ
diff --git a/packages/Keyguard/res/drawable-ldpi/ic_media_play.png b/packages/Keyguard/res/drawable-ldpi/ic_media_play.png
new file mode 100644
index 0000000..e7c1972
--- /dev/null
+++ b/packages/Keyguard/res/drawable-ldpi/ic_media_play.png
Binary files differ
diff --git a/packages/Keyguard/res/drawable-ldpi/ic_media_previous.png b/packages/Keyguard/res/drawable-ldpi/ic_media_previous.png
new file mode 100644
index 0000000..df04322
--- /dev/null
+++ b/packages/Keyguard/res/drawable-ldpi/ic_media_previous.png
Binary files differ
diff --git a/packages/Keyguard/res/drawable-mdpi/ic_media_next.png b/packages/Keyguard/res/drawable-mdpi/ic_media_next.png
new file mode 100644
index 0000000..fcd73d9
--- /dev/null
+++ b/packages/Keyguard/res/drawable-mdpi/ic_media_next.png
Binary files differ
diff --git a/packages/Keyguard/res/drawable-mdpi/ic_media_play.png b/packages/Keyguard/res/drawable-mdpi/ic_media_play.png
new file mode 100644
index 0000000..7966bbc
--- /dev/null
+++ b/packages/Keyguard/res/drawable-mdpi/ic_media_play.png
Binary files differ
diff --git a/packages/Keyguard/res/drawable-mdpi/ic_media_previous.png b/packages/Keyguard/res/drawable-mdpi/ic_media_previous.png
new file mode 100644
index 0000000..b653d05
--- /dev/null
+++ b/packages/Keyguard/res/drawable-mdpi/ic_media_previous.png
Binary files differ
diff --git a/packages/Keyguard/res/drawable-mdpi/kg_add_widget.png b/packages/Keyguard/res/drawable-mdpi/kg_add_widget.png
index 136ae17..1cab0d9 100644
--- a/packages/Keyguard/res/drawable-mdpi/kg_add_widget.png
+++ b/packages/Keyguard/res/drawable-mdpi/kg_add_widget.png
Binary files differ
diff --git a/packages/Keyguard/res/drawable-mdpi/kg_security_lock_focused.png b/packages/Keyguard/res/drawable-mdpi/kg_security_lock_focused.png
index 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
Binary files differ
diff --git a/packages/Keyguard/res/drawable-mdpi/kg_security_lock_normal.png b/packages/Keyguard/res/drawable-mdpi/kg_security_lock_normal.png
index 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
Binary files differ
diff --git a/packages/Keyguard/res/drawable-mdpi/kg_security_lock_pressed.png b/packages/Keyguard/res/drawable-mdpi/kg_security_lock_pressed.png
index 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
Binary files differ
diff --git a/packages/Keyguard/res/drawable-nodpi/app_icon.png b/packages/Keyguard/res/drawable-nodpi/app_icon.png
new file mode 100644
index 0000000..ea31bd8
--- /dev/null
+++ b/packages/Keyguard/res/drawable-nodpi/app_icon.png
Binary files differ
diff --git a/packages/Keyguard/res/drawable-xhdpi/ic_media_next.png b/packages/Keyguard/res/drawable-xhdpi/ic_media_next.png
new file mode 100644
index 0000000..4def965
--- /dev/null
+++ b/packages/Keyguard/res/drawable-xhdpi/ic_media_next.png
Binary files differ
diff --git a/packages/Keyguard/res/drawable-xhdpi/ic_media_play.png b/packages/Keyguard/res/drawable-xhdpi/ic_media_play.png
new file mode 100644
index 0000000..ccfef18
--- /dev/null
+++ b/packages/Keyguard/res/drawable-xhdpi/ic_media_play.png
Binary files differ
diff --git a/packages/Keyguard/res/drawable-xhdpi/ic_media_previous.png b/packages/Keyguard/res/drawable-xhdpi/ic_media_previous.png
new file mode 100644
index 0000000..c4472ae
--- /dev/null
+++ b/packages/Keyguard/res/drawable-xhdpi/ic_media_previous.png
Binary files differ
diff --git a/packages/Keyguard/res/drawable-xhdpi/kg_add_widget.png b/packages/Keyguard/res/drawable-xhdpi/kg_add_widget.png
index ca48be2..d71905f 100644
--- a/packages/Keyguard/res/drawable-xhdpi/kg_add_widget.png
+++ b/packages/Keyguard/res/drawable-xhdpi/kg_add_widget.png
Binary files differ
diff --git a/packages/Keyguard/res/drawable-xhdpi/kg_security_lock_focused.png b/packages/Keyguard/res/drawable-xhdpi/kg_security_lock_focused.png
index 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
Binary files differ
diff --git a/packages/Keyguard/res/drawable-xhdpi/kg_security_lock_normal.png b/packages/Keyguard/res/drawable-xhdpi/kg_security_lock_normal.png
index 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
Binary files differ
diff --git a/packages/Keyguard/res/drawable-xhdpi/kg_security_lock_pressed.png b/packages/Keyguard/res/drawable-xhdpi/kg_security_lock_pressed.png
index 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
Binary files differ
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/core/res/res/values-port/alias.xml b/packages/Keyguard/res/values-land/alias.xml
index bf3eecb..7aac5b4 100644
--- a/core/res/res/values-port/alias.xml
+++ b/packages/Keyguard/res/values-land/alias.xml
@@ -19,5 +19,5 @@
-->
<resources>
<!-- Alias used to reference one of two possible layouts in keyguard. -->
- <item type="layout" name="keyguard_eca">@android:layout/keyguard_emergency_carrier_area</item>
+ <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/core/res/res/values-sw600dp/alias.xml b/packages/Keyguard/res/values-port/alias.xml
index bf3eecb..c3ecbb9 100644
--- a/core/res/res/values-sw600dp/alias.xml
+++ b/packages/Keyguard/res/values-port/alias.xml
@@ -19,5 +19,5 @@
-->
<resources>
<!-- Alias used to reference one of two possible layouts in keyguard. -->
- <item type="layout" name="keyguard_eca">@android:layout/keyguard_emergency_carrier_area</item>
+ <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/values-sw380dp/dimens.xml b/packages/Keyguard/res/values-sw380dp/dimens.xml
new file mode 100644
index 0000000..fc0e85d
--- /dev/null
+++ b/packages/Keyguard/res/values-sw380dp/dimens.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>
+ <!-- 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/layout-land/keyguard_glow_pad_container.xml b/packages/Keyguard/res/values-sw600dp-land/dimens.xml
index f8364f1..5507e5f 100644
--- a/packages/Keyguard/res/layout-land/keyguard_glow_pad_container.xml
+++ b/packages/Keyguard/res/values-sw600dp-land/dimens.xml
@@ -1,9 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
+/* //device/apps/common/assets/res/any/dimens.xml
**
-** Copyright 2012, The Android Open Source Project
+** Copyright 2006, 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,10 +17,10 @@
** limitations under the License.
*/
-->
+<resources>
+ <!-- Top margin for the clock view -->
+ <dimen name="kg_clock_top_margin">85dp</dimen>
-<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
+ <!-- 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/core/res/res/values-land/alias.xml b/packages/Keyguard/res/values-sw600dp/alias.xml
index eac5ece..c3ecbb9 100644
--- a/core/res/res/values-land/alias.xml
+++ b/packages/Keyguard/res/values-sw600dp/alias.xml
@@ -19,5 +19,5 @@
-->
<resources>
<!-- Alias used to reference one of two possible layouts in keyguard. -->
- <item type="layout" name="keyguard_eca">@android:layout/keyguard_emergency_carrier_area_empty</item>
+ <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-sw600dp/keyguard_navigation.xml b/packages/Keyguard/res/values-sw600dp/integers.xml
index 2e6fa37..de9829c 100644
--- a/packages/Keyguard/res/layout-sw600dp/keyguard_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/keyguard_sim_puk_pin_account_navigation.xml b/packages/Keyguard/res/values-sw720dp-port/integers.xml
index 2e6fa37..5f85f71 100644
--- a/packages/Keyguard/res/layout/keyguard_sim_puk_pin_account_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/values-xlarge/dimens.xml b/packages/Keyguard/res/values-xlarge/dimens.xml
new file mode 100644
index 0000000..b8cf287
--- /dev/null
+++ b/packages/Keyguard/res/values-xlarge/dimens.xml
@@ -0,0 +1,27 @@
+<?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 -->
+ <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;
diff --git a/packages/SystemUI/AndroidManifest.xml b/packages/SystemUI/AndroidManifest.xml
index 66080f3..4bb44af 100644
--- a/packages/SystemUI/AndroidManifest.xml
+++ b/packages/SystemUI/AndroidManifest.xml
@@ -1,6 +1,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
package="com.android.systemui"
+ android:sharedUserId="android.uid.systemui"
coreApp="true">
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
@@ -71,6 +72,7 @@
android:hardwareAccelerated="true"
android:label="@string/app_label"
android:icon="@*android:drawable/platlogo"
+ android:process="com.android.systemui"
android:supportsRtl="true">
<!-- Broadcast receiver that gets the broadcast at boot time and starts
diff --git a/policy/src/com/android/internal/policy/impl/KeyguardServiceWrapper.java b/policy/src/com/android/internal/policy/impl/KeyguardServiceWrapper.java
new file mode 100644
index 0000000..b87acfd
--- /dev/null
+++ b/policy/src/com/android/internal/policy/impl/KeyguardServiceWrapper.java
@@ -0,0 +1,217 @@
+/*
+ * Copyright (C) 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.
+ */
+
+package com.android.internal.policy.impl;
+
+import android.os.Bundle;
+import android.os.IBinder;
+import android.os.RemoteException;
+
+import com.android.internal.policy.IKeyguardResult;
+import com.android.internal.policy.IKeyguardService;
+
+/**
+ * A wrapper class for KeyguardService. It implements IKeyguardService to ensure the interface
+ * remains consistent.
+ *
+ */
+public class KeyguardServiceWrapper implements IKeyguardService {
+ private IKeyguardService mService;
+
+ public KeyguardServiceWrapper(IKeyguardService service) {
+ mService = service;
+ }
+
+ public boolean isShowing() {
+ try {
+ return mService.isShowing();
+ } catch (RemoteException e) {
+ e.printStackTrace();
+ }
+ return false;
+ }
+
+ public boolean isSecure() {
+ try {
+ return mService.isSecure();
+ } catch (RemoteException e) {
+ e.printStackTrace();
+ }
+ return false; // TODO cache state
+ }
+
+ public boolean isShowingAndNotHidden() {
+ try {
+ return mService.isShowingAndNotHidden();
+ } catch (RemoteException e) {
+ e.printStackTrace();
+ }
+ return false; // TODO cache state
+ }
+
+ public boolean isInputRestricted() {
+ try {
+ return mService.isInputRestricted();
+ } catch (RemoteException e) {
+ e.printStackTrace();
+ }
+ return false; // TODO cache state
+ }
+
+ public boolean isDismissable() {
+ try {
+ return mService.isDismissable();
+ } catch (RemoteException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ return true; // TODO cache state
+ }
+
+ public void userActivity() {
+ try {
+ mService.userActivity();
+ } catch (RemoteException e) {
+ e.printStackTrace();
+ }
+ }
+
+ public void verifyUnlock(IKeyguardResult result) {
+ try {
+ mService.verifyUnlock(result);
+ } catch (RemoteException e) {
+ e.printStackTrace();
+ }
+ }
+
+ public void keyguardDone(boolean authenticated, boolean wakeup) {
+ try {
+ mService.keyguardDone(authenticated, wakeup);
+ } catch (RemoteException e) {
+ e.printStackTrace();
+ }
+ }
+
+ public void setHidden(boolean isHidden) {
+ try {
+ mService.setHidden(isHidden);
+ } catch (RemoteException e) {
+ e.printStackTrace();
+ }
+ }
+
+ public void dismiss() {
+ try {
+ mService.dismiss();
+ } catch (RemoteException e) {
+ e.printStackTrace();
+ }
+ }
+
+ public void onWakeKeyWhenKeyguardShowingTq(int keyCode) {
+ try {
+ mService.onWakeKeyWhenKeyguardShowingTq(keyCode);
+ } catch (RemoteException e) {
+ e.printStackTrace();
+ }
+ }
+
+ public void onWakeMotionWhenKeyguardShowingTq() {
+ try {
+ mService.onWakeMotionWhenKeyguardShowingTq();
+ } catch (RemoteException e) {
+ e.printStackTrace();
+ }
+ }
+
+ public void onDreamingStarted() {
+ try {
+ mService.onDreamingStarted();
+ } catch (RemoteException e) {
+ e.printStackTrace();
+ }
+ }
+
+ public void onDreamingStopped() {
+ try {
+ mService.onDreamingStopped();
+ } catch (RemoteException e) {
+ e.printStackTrace();
+ }
+ }
+
+ public void onScreenTurnedOff(int reason) {
+ try {
+ mService.onScreenTurnedOff(reason);
+ } catch (RemoteException e) {
+ e.printStackTrace();
+ }
+ }
+
+ public void onScreenTurnedOn(IKeyguardResult result) {
+ try {
+ mService.onScreenTurnedOn(result);
+ } catch (RemoteException e) {
+ e.printStackTrace();
+ }
+ }
+
+ public void setKeyguardEnabled(boolean enabled) {
+ try {
+ mService.setKeyguardEnabled(enabled);
+ } catch (RemoteException e) {
+ e.printStackTrace();
+ }
+ }
+
+ public void onSystemReady() {
+ try {
+ mService.onSystemReady();
+ } catch (RemoteException e) {
+ e.printStackTrace();
+ }
+ }
+
+ public void doKeyguardTimeout(Bundle options) {
+ try {
+ mService.doKeyguardTimeout(options);
+ } catch (RemoteException e) {
+ e.printStackTrace();
+ }
+ }
+
+ public void setCurrentUser(int userId) {
+ try {
+ mService.setCurrentUser(userId);
+ } catch (RemoteException e) {
+ e.printStackTrace();
+ }
+ }
+
+ public void showAssistant() {
+ try {
+ mService.showAssistant();
+ } catch (RemoteException e) {
+ e.printStackTrace();
+ }
+ }
+
+ @Override
+ public IBinder asBinder() {
+ return mService.asBinder();
+ }
+
+} \ No newline at end of file
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
index 9f62f6a..035263a 100644
--- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
+++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
@@ -90,8 +90,7 @@ import android.view.animation.AnimationUtils;
import com.android.internal.R;
import com.android.internal.policy.PolicyManager;
-import com.android.internal.policy.impl.keyguard.KeyguardViewManager;
-import com.android.internal.policy.impl.keyguard.KeyguardViewMediator;
+import com.android.internal.policy.impl.keyguard.KeyguardServiceDelegate;
import com.android.internal.statusbar.IStatusBarService;
import com.android.internal.telephony.ITelephony;
import com.android.internal.widget.PointerLocationView;
@@ -151,6 +150,11 @@ public class PhoneWindowManager implements WindowManagerPolicy {
static final int SYSTEM_UI_CHANGING_LAYOUT =
View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_FULLSCREEN;
+ /**
+ * Keyguard stuff
+ */
+ private WindowState mKeyguardScrim;
+
/* Table of Application Launch keys. Maps from key codes to intent categories.
*
* These are special keys that are used to launch particular kinds of applications,
@@ -222,7 +226,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
int[] mNavigationBarWidthForRotation = new int[4];
WindowState mKeyguard = null;
- KeyguardViewMediator mKeyguardMediator;
+ KeyguardServiceDelegate mKeyguardDelegate;
GlobalActions mGlobalActions;
volatile boolean mPowerKeyHandled; // accessed from input reader and handler thread
boolean mPendingPowerKeyUpCanceled;
@@ -659,7 +663,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
}
private long getScreenshotChordLongPressDelay() {
- if (mKeyguardMediator.isShowing()) {
+ if (mKeyguardDelegate.isShowing()) {
// Double the time it takes to take a screenshot from the keyguard
return (long) (KEYGUARD_SCREENSHOT_CHORD_DELAY_MULTIPLIER *
ViewConfiguration.getGlobalActionKeyTimeout());
@@ -722,7 +726,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
if (keyguardShowing) {
// since it took two seconds of long press to bring this up,
// poke the wake lock so they have some time to see the dialog.
- mKeyguardMediator.userActivity();
+ mKeyguardDelegate.userActivity();
}
}
@@ -817,8 +821,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
mWindowManagerFuncs = windowManagerFuncs;
mHeadless = "1".equals(SystemProperties.get("ro.config.headless", "0"));
if (!mHeadless) {
- // don't create KeyguardViewMediator if headless
- mKeyguardMediator = new KeyguardViewMediator(context, null);
+ startKeyguard(context);
}
mHandler = new PolicyHandler();
mOrientationListener = new MyOrientationListener(mContext, mHandler);
@@ -912,6 +915,10 @@ public class PhoneWindowManager implements WindowManagerPolicy {
}
}
+ private void startKeyguard(Context context) {
+ mKeyguardDelegate = new KeyguardServiceDelegate(context, null);
+ }
+
@Override
public void setInitialDisplaySize(Display display, int width, int height, int density) {
if (display.getDisplayId() != Display.DEFAULT_DISPLAY) {
@@ -1231,6 +1238,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
case TYPE_DISPLAY_OVERLAY:
case TYPE_HIDDEN_NAV_CONSUMER:
case TYPE_KEYGUARD:
+ case TYPE_KEYGUARD_SCRIM:
case TYPE_KEYGUARD_DIALOG:
case TYPE_MAGNIFICATION_OVERLAY:
case TYPE_NAVIGATION_BAR:
@@ -1347,54 +1355,57 @@ public class PhoneWindowManager implements WindowManagerPolicy {
case TYPE_INPUT_METHOD_DIALOG:
// on-screen keyboards and other such input method user interfaces go here.
return 11;
+ case TYPE_KEYGUARD_SCRIM:
+ // the safety window that shows behind keyguard while keyguard is starting
+ return 12;
case TYPE_KEYGUARD:
// the keyguard; nothing on top of these can take focus, since they are
// responsible for power management when displayed.
- return 12;
- case TYPE_KEYGUARD_DIALOG:
return 13;
- case TYPE_STATUS_BAR_SUB_PANEL:
+ case TYPE_KEYGUARD_DIALOG:
return 14;
- case TYPE_STATUS_BAR:
+ case TYPE_STATUS_BAR_SUB_PANEL:
return 15;
- case TYPE_STATUS_BAR_PANEL:
+ case TYPE_STATUS_BAR:
return 16;
+ case TYPE_STATUS_BAR_PANEL:
+ return 17;
case TYPE_VOLUME_OVERLAY:
// the on-screen volume indicator and controller shown when the user
// changes the device volume
- return 17;
+ return 18;
case TYPE_SYSTEM_OVERLAY:
// the on-screen volume indicator and controller shown when the user
// changes the device volume
- return 18;
+ return 19;
case TYPE_NAVIGATION_BAR:
// the navigation bar, if available, shows atop most things
- return 19;
+ return 20;
case TYPE_NAVIGATION_BAR_PANEL:
// some panels (e.g. search) need to show on top of the navigation bar
- return 20;
+ return 21;
case TYPE_SYSTEM_ERROR:
// system-level error dialogs
- return 21;
+ return 22;
case TYPE_MAGNIFICATION_OVERLAY:
// used to highlight the magnified portion of a display
- return 22;
+ return 23;
case TYPE_DISPLAY_OVERLAY:
// used to simulate secondary display devices
- return 23;
+ return 24;
case TYPE_DRAG:
// the drag layer: input for drag-and-drop is associated with this window,
// which sits above all other focusable windows
- return 24;
- case TYPE_SECURE_SYSTEM_OVERLAY:
return 25;
- case TYPE_BOOT_PROGRESS:
+ case TYPE_SECURE_SYSTEM_OVERLAY:
return 26;
+ case TYPE_BOOT_PROGRESS:
+ return 27;
case TYPE_POINTER:
// the (mouse) pointer layer
- return 27;
- case TYPE_HIDDEN_NAV_CONSUMER:
return 28;
+ case TYPE_HIDDEN_NAV_CONSUMER:
+ return 29;
}
Log.e(TAG, "Unknown window type: " + type);
return 2;
@@ -1485,6 +1496,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
case TYPE_DREAM:
case TYPE_UNIVERSE_BACKGROUND:
case TYPE_KEYGUARD:
+ case TYPE_KEYGUARD_SCRIM:
return false;
default:
return true;
@@ -1672,7 +1684,16 @@ public class PhoneWindowManager implements WindowManagerPolicy {
return WindowManagerGlobal.ADD_MULTIPLE_SINGLETON;
}
mKeyguard = win;
+ hideKeyguardScrim();
+ break;
+ case TYPE_KEYGUARD_SCRIM:
+ // TODO: put this back when done testing
+// if (mKeyguardScrim != null) {
+// return WindowManagerGlobal.ADD_MULTIPLE_SINGLETON;
+// }
+ mKeyguardScrim = win;
break;
+
}
return WindowManagerGlobal.ADD_OKAY;
}
@@ -1682,12 +1703,25 @@ public class PhoneWindowManager implements WindowManagerPolicy {
if (mStatusBar == win) {
mStatusBar = null;
} else if (mKeyguard == win) {
+ Log.v(TAG, "Removing keyguard window (Did it crash?)");
mKeyguard = null;
- } else if (mNavigationBar == win) {
+ showKeyguardScrimLw();
+ } else if (mKeyguardScrim == win) {
+ Log.v(TAG, "Removing keyguard scrim");
+ mKeyguardScrim = null;
+ } if (mNavigationBar == win) {
mNavigationBar = null;
}
}
+ private void showKeyguardScrimLw() {
+ Log.v(TAG, "*** SHOWING KEYGUARD SCRIM ***");
+ }
+
+ private void hideKeyguardScrim() {
+ Log.v(TAG, "*** HIDING KEYGUARD SCRIM ***");
+ }
+
static final boolean PRINT_ANIM = false;
/** {@inheritDoc} */
@@ -1911,6 +1945,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
if (attrs != null) {
final int type = attrs.type;
if (type == WindowManager.LayoutParams.TYPE_KEYGUARD
+ || type == WindowManager.LayoutParams.TYPE_KEYGUARD_SCRIM
|| type == WindowManager.LayoutParams.TYPE_KEYGUARD_DIALOG) {
// the "app" is keyguard, so give it the key
return 0;
@@ -2304,12 +2339,12 @@ public class PhoneWindowManager implements WindowManagerPolicy {
* given the situation with the keyguard.
*/
void launchHomeFromHotKey() {
- if (mKeyguardMediator != null && mKeyguardMediator.isShowingAndNotHidden()) {
+ if (mKeyguardDelegate != null && mKeyguardDelegate.isShowingAndNotHidden()) {
// don't launch home if keyguard showing
- } else if (!mHideLockScreen && mKeyguardMediator.isInputRestricted()) {
+ } else if (!mHideLockScreen && mKeyguardDelegate.isInputRestricted()) {
// when in keyguard restricted mode, must first verify unlock
// before launching home
- mKeyguardMediator.verifyUnlock(new OnKeyguardExitResult() {
+ mKeyguardDelegate.verifyUnlock(new OnKeyguardExitResult() {
public void onKeyguardExitResult(boolean success) {
if (success) {
try {
@@ -3291,17 +3326,17 @@ public class PhoneWindowManager implements WindowManagerPolicy {
if (mKeyguard != null) {
if (localLOGV) Log.v(TAG, "finishPostLayoutPolicyLw: mHideKeyguard="
+ mHideLockScreen);
- if (mDismissKeyguard != DISMISS_KEYGUARD_NONE && !mKeyguardMediator.isSecure()) {
+ if (mDismissKeyguard != DISMISS_KEYGUARD_NONE && !mKeyguardDelegate.isSecure()) {
if (mKeyguard.hideLw(true)) {
changes |= FINISH_LAYOUT_REDO_LAYOUT
| FINISH_LAYOUT_REDO_CONFIG
| FINISH_LAYOUT_REDO_WALLPAPER;
}
- if (mKeyguardMediator.isShowing()) {
+ if (mKeyguardDelegate.isShowing()) {
mHandler.post(new Runnable() {
@Override
public void run() {
- mKeyguardMediator.keyguardDone(false, false);
+ mKeyguardDelegate.keyguardDone(false, false);
}
});
}
@@ -3311,7 +3346,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
| FINISH_LAYOUT_REDO_CONFIG
| FINISH_LAYOUT_REDO_WALLPAPER;
}
- mKeyguardMediator.setHidden(true);
+ mKeyguardDelegate.setHidden(true);
} else if (mDismissKeyguard != DISMISS_KEYGUARD_NONE) {
// This is the case of keyguard isSecure() and not mHideLockScreen.
if (mDismissKeyguard == DISMISS_KEYGUARD_START) {
@@ -3321,11 +3356,11 @@ public class PhoneWindowManager implements WindowManagerPolicy {
| FINISH_LAYOUT_REDO_CONFIG
| FINISH_LAYOUT_REDO_WALLPAPER;
}
- mKeyguardMediator.setHidden(false);
+ mKeyguardDelegate.setHidden(false);
mHandler.post(new Runnable() {
@Override
public void run() {
- mKeyguardMediator.dismiss();
+ mKeyguardDelegate.dismiss();
}
});
}
@@ -3336,7 +3371,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
| FINISH_LAYOUT_REDO_CONFIG
| FINISH_LAYOUT_REDO_WALLPAPER;
}
- mKeyguardMediator.setHidden(false);
+ mKeyguardDelegate.setHidden(false);
}
}
@@ -3387,7 +3422,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
if (lidOpen) {
if (keyguardIsShowingTq()) {
- mKeyguardMediator.onWakeKeyWhenKeyguardShowingTq(KeyEvent.KEYCODE_POWER);
+ mKeyguardDelegate.onWakeKeyWhenKeyguardShowingTq(KeyEvent.KEYCODE_POWER);
} else {
mPowerManager.wakeUp(SystemClock.uptimeMillis());
}
@@ -3567,10 +3602,10 @@ public class PhoneWindowManager implements WindowManagerPolicy {
// the same as if it were open and in front.
// This will prevent any keys other than the power button from waking the screen
// when the keyguard is hidden by another activity.
- final boolean keyguardActive = (mKeyguardMediator == null ? false :
+ final boolean keyguardActive = (mKeyguardDelegate == null ? false :
(isScreenOn ?
- mKeyguardMediator.isShowingAndNotHidden() :
- mKeyguardMediator.isShowing()));
+ mKeyguardDelegate.isShowingAndNotHidden() :
+ mKeyguardDelegate.isShowing()));
if (keyCode == KeyEvent.KEYCODE_POWER) {
policyFlags |= WindowManagerPolicy.FLAG_WAKE;
@@ -3609,7 +3644,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
if (down && isWakeKey && isWakeKeyWhenScreenOff(keyCode)) {
if (keyguardActive) {
// If the keyguard is showing, let it wake the device when ready.
- mKeyguardMediator.onWakeKeyWhenKeyguardShowingTq(keyCode);
+ mKeyguardDelegate.onWakeKeyWhenKeyguardShowingTq(keyCode);
} else {
// Otherwise, wake the device ourselves.
result |= ACTION_WAKE_UP;
@@ -3873,9 +3908,9 @@ public class PhoneWindowManager implements WindowManagerPolicy {
final boolean isWakeMotion = (policyFlags
& (WindowManagerPolicy.FLAG_WAKE | WindowManagerPolicy.FLAG_WAKE_DROPPED)) != 0;
if (isWakeMotion) {
- if (mKeyguardMediator != null && mKeyguardMediator.isShowing()) {
+ if (mKeyguardDelegate != null && mKeyguardDelegate.isShowing()) {
// If the keyguard is showing, let it decide what to do with the wake motion.
- mKeyguardMediator.onWakeMotionWhenKeyguardShowingTq();
+ mKeyguardDelegate.onWakeMotionWhenKeyguardShowingTq();
} else {
// Otherwise, wake the device ourselves.
result |= ACTION_WAKE_UP;
@@ -3958,12 +3993,12 @@ public class PhoneWindowManager implements WindowManagerPolicy {
@Override
public void onReceive(Context context, Intent intent) {
if (Intent.ACTION_DREAMING_STARTED.equals(intent.getAction())) {
- if (mKeyguardMediator != null) {
- mKeyguardMediator.onDreamingStarted();
+ if (mKeyguardDelegate != null) {
+ mKeyguardDelegate.onDreamingStarted();
}
} else if (Intent.ACTION_DREAMING_STOPPED.equals(intent.getAction())) {
- if (mKeyguardMediator != null) {
- mKeyguardMediator.onDreamingStopped();
+ if (mKeyguardDelegate != null) {
+ mKeyguardDelegate.onDreamingStopped();
}
}
}
@@ -3997,8 +4032,8 @@ public class PhoneWindowManager implements WindowManagerPolicy {
mScreenOnEarly = false;
mScreenOnFully = false;
}
- if (mKeyguardMediator != null) {
- mKeyguardMediator.onScreenTurnedOff(why);
+ if (mKeyguardDelegate != null) {
+ mKeyguardDelegate.onScreenTurnedOff(why);
}
synchronized (mLock) {
updateOrientationListenerLp();
@@ -4025,9 +4060,9 @@ public class PhoneWindowManager implements WindowManagerPolicy {
}
private void waitForKeyguard(final ScreenOnListener screenOnListener) {
- if (mKeyguardMediator != null) {
+ if (mKeyguardDelegate != null) {
if (screenOnListener != null) {
- mKeyguardMediator.onScreenTurnedOn(new KeyguardViewManager.ShowListener() {
+ mKeyguardDelegate.onScreenTurnedOn(new KeyguardServiceDelegate.ShowListener() {
@Override
public void onShown(IBinder windowToken) {
waitForKeyguardWindowDrawn(windowToken, screenOnListener);
@@ -4035,10 +4070,10 @@ public class PhoneWindowManager implements WindowManagerPolicy {
});
return;
} else {
- mKeyguardMediator.onScreenTurnedOn(null);
+ mKeyguardDelegate.onScreenTurnedOn(null);
}
} else {
- Slog.i(TAG, "No keyguard mediator!");
+ Slog.i(TAG, "No keyguard interface!");
}
finishScreenTurningOn(screenOnListener);
}
@@ -4093,21 +4128,21 @@ public class PhoneWindowManager implements WindowManagerPolicy {
/** {@inheritDoc} */
public void enableKeyguard(boolean enabled) {
- if (mKeyguardMediator != null) {
- mKeyguardMediator.setKeyguardEnabled(enabled);
+ if (mKeyguardDelegate != null) {
+ mKeyguardDelegate.setKeyguardEnabled(enabled);
}
}
/** {@inheritDoc} */
public void exitKeyguardSecurely(OnKeyguardExitResult callback) {
- if (mKeyguardMediator != null) {
- mKeyguardMediator.verifyUnlock(callback);
+ if (mKeyguardDelegate != null) {
+ mKeyguardDelegate.verifyUnlock(callback);
}
}
private boolean keyguardIsShowingTq() {
- if (mKeyguardMediator == null) return false;
- return mKeyguardMediator.isShowingAndNotHidden();
+ if (mKeyguardDelegate == null) return false;
+ return mKeyguardDelegate.isShowingAndNotHidden();
}
@@ -4118,26 +4153,26 @@ public class PhoneWindowManager implements WindowManagerPolicy {
/** {@inheritDoc} */
public boolean isKeyguardSecure() {
- if (mKeyguardMediator == null) return false;
- return mKeyguardMediator.isSecure();
+ if (mKeyguardDelegate == null) return false;
+ return mKeyguardDelegate.isSecure();
}
/** {@inheritDoc} */
public boolean inKeyguardRestrictedKeyInputMode() {
- if (mKeyguardMediator == null) return false;
- return mKeyguardMediator.isInputRestricted();
+ if (mKeyguardDelegate == null) return false;
+ return mKeyguardDelegate.isInputRestricted();
}
public void dismissKeyguardLw() {
- if (mKeyguardMediator.isShowing()) {
+ if (mKeyguardDelegate.isShowing()) {
mHandler.post(new Runnable() {
public void run() {
- if (mKeyguardMediator.isDismissable()) {
+ if (mKeyguardDelegate.isDismissable()) {
// Can we just finish the keyguard straight away?
- mKeyguardMediator.keyguardDone(false, true);
+ mKeyguardDelegate.keyguardDone(false, true);
} else {
// ask the keyguard to prompt the user to authenticate if necessary
- mKeyguardMediator.dismiss();
+ mKeyguardDelegate.dismiss();
}
}
});
@@ -4378,9 +4413,9 @@ public class PhoneWindowManager implements WindowManagerPolicy {
/** {@inheritDoc} */
public void systemReady() {
- if (mKeyguardMediator != null) {
+ if (mKeyguardDelegate != null) {
// tell the keyguard
- mKeyguardMediator.onSystemReady();
+ mKeyguardDelegate.onSystemReady();
}
synchronized (mLock) {
updateOrientationListenerLp();
@@ -4492,8 +4527,8 @@ public class PhoneWindowManager implements WindowManagerPolicy {
public void run() {
synchronized (this) {
if (localLOGV) Log.v(TAG, "mScreenLockTimeout activating keyguard");
- if (mKeyguardMediator != null) {
- mKeyguardMediator.doKeyguardTimeout(options);
+ if (mKeyguardDelegate != null) {
+ mKeyguardDelegate.doKeyguardTimeout(options);
}
mLockScreenTimerActive = false;
options = null;
@@ -4521,7 +4556,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
private void updateLockScreenTimeout() {
synchronized (mScreenLockTimeout) {
boolean enable = (mAllowLockscreenWhenOn && mScreenOnEarly &&
- mKeyguardMediator != null && mKeyguardMediator.isSecure());
+ mKeyguardDelegate != null && mKeyguardDelegate.isSecure());
if (mLockScreenTimerActive != enable) {
if (enable) {
if (localLOGV) Log.v(TAG, "setting lockscreen timer");
@@ -4645,7 +4680,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
}
final boolean hapticsDisabled = Settings.System.getIntForUser(mContext.getContentResolver(),
Settings.System.HAPTIC_FEEDBACK_ENABLED, 0, UserHandle.USER_CURRENT) == 0;
- if (!always && (hapticsDisabled || mKeyguardMediator.isShowingAndNotHidden())) {
+ if (!always && (hapticsDisabled || mKeyguardDelegate.isShowingAndNotHidden())) {
return false;
}
long[] pattern = null;
@@ -4693,7 +4728,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
@Override
public void keepScreenOnStoppedLw() {
- if (mKeyguardMediator != null && !mKeyguardMediator.isShowingAndNotHidden()) {
+ if (mKeyguardDelegate != null && !mKeyguardDelegate.isShowingAndNotHidden()) {
long curTime = SystemClock.uptimeMillis();
mPowerManager.userActivity(curTime, false);
}
@@ -4761,8 +4796,8 @@ public class PhoneWindowManager implements WindowManagerPolicy {
@Override
public void setCurrentUserLw(int newUserId) {
- if (mKeyguardMediator != null) {
- mKeyguardMediator.setCurrentUser(newUserId);
+ if (mKeyguardDelegate != null) {
+ mKeyguardDelegate.setCurrentUser(newUserId);
}
if (mStatusBarService != null) {
try {
@@ -4776,7 +4811,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
@Override
public void showAssistant() {
- mKeyguardMediator.showAssistant();
+ mKeyguardDelegate.showAssistant();
}
@Override
diff --git a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardServiceDelegate.java b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardServiceDelegate.java
new file mode 100644
index 0000000..0dd41e5
--- /dev/null
+++ b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardServiceDelegate.java
@@ -0,0 +1,272 @@
+package com.android.internal.policy.impl.keyguard;
+
+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.UserHandle;
+import android.util.Log;
+import android.util.Slog;
+import android.view.WindowManagerPolicy.OnKeyguardExitResult;
+
+import com.android.internal.policy.IKeyguardResult;
+import com.android.internal.policy.IKeyguardService;
+import com.android.internal.widget.LockPatternUtils;
+import com.android.internal.policy.impl.KeyguardServiceWrapper;
+import com.android.internal.policy.impl.keyguard.KeyguardServiceDelegate.ShowListener;
+
+/**
+ * A local class that keeps a cache of keyguard state that can be restored in the event
+ * keyguard crashes. It currently also allows runtime-selectable
+ * local or remote instances of keyguard.
+ */
+public class KeyguardServiceDelegate {
+ private static final String KEYGUARD_PACKAGE = "com.android.keyguard";
+ private static final String KEYGUARD_CLASS = "com.android.keyguard.KeyguardService";
+ private static final String TAG = "KeyguardServiceDelegate";
+ private final static boolean DEBUG = true;
+ private ServiceConnection mKeyguardConnection;
+ protected KeyguardServiceWrapper mKeyguardService;
+ private KeyguardState mKeyguardState = new KeyguardState();
+
+ /* package */ class KeyguardState {
+ boolean showing;
+ boolean showingAndNotHidden;
+ boolean inputRestricted;
+ boolean hidden;
+ boolean secure;
+ boolean dreaming;
+ boolean systemIsReady;
+ public boolean enabled;
+ public boolean dismissable;
+ public int offReason;
+ public int currentUser;
+ public boolean screenIsOn;
+ public boolean restoreStateWhenConnected;
+ public ShowListener showListener;
+ };
+
+ public interface ShowListener {
+ public void onShown(IBinder windowToken);
+ }
+
+ private class KeyguardResult extends IKeyguardResult.Stub {
+ private ShowListener mShowListener;
+ private OnKeyguardExitResult mOnKeyguardExitResult;
+
+ KeyguardResult(ShowListener showListener, OnKeyguardExitResult onKeyguardExitResult) {
+ mShowListener = showListener;
+ mOnKeyguardExitResult = onKeyguardExitResult;
+ }
+
+ @Override
+ public IBinder asBinder() {
+ if (DEBUG) Log.v(TAG, "asBinder() called for KeyguardResult, "
+ + "mShowListener = " + mShowListener
+ + ", mOnKeyguardExitResult = " + mOnKeyguardExitResult);
+ return super.asBinder();
+ }
+
+ @Override
+ public void onShown(IBinder windowToken) throws RemoteException {
+ if (DEBUG) Log.v(TAG, "**** SHOWN CALLED ****");
+ if (mShowListener != null) {
+ mShowListener.onShown(windowToken);
+ }
+ }
+
+ @Override
+ public void onKeyguardExitResult(boolean success) throws RemoteException {
+ if (DEBUG) Log.v(TAG, "**** onKeyguardExitResult(" + success +") CALLED ****");
+ if (mOnKeyguardExitResult != null) {
+ mOnKeyguardExitResult.onKeyguardExitResult(success);
+ }
+ }
+ };
+
+ public KeyguardServiceDelegate(Context context, LockPatternUtils lockPatternUtils) {
+ mKeyguardConnection = createServiceConnection();
+ Intent intent = new Intent();
+ intent.setClassName(KEYGUARD_PACKAGE, KEYGUARD_CLASS);
+ if (!context.bindServiceAsUser(intent, mKeyguardConnection,
+ Context.BIND_AUTO_CREATE, UserHandle.OWNER)) {
+ if (DEBUG) Log.v(TAG, "*** Keyguard: can't bind to " + KEYGUARD_CLASS);
+ } else {
+ if (DEBUG) Log.v(TAG, "*** Keyguard started");
+ }
+ }
+
+ private ServiceConnection createServiceConnection() {
+ return new ServiceConnection() {
+
+ @Override
+ public void onServiceConnected(ComponentName name, IBinder service) {
+ if (DEBUG) Log.v(TAG, "*** Keyguard connected (yay!)");
+ mKeyguardService = new KeyguardServiceWrapper(
+ IKeyguardService.Stub.asInterface(service));
+ if (mKeyguardState.systemIsReady) {
+ mKeyguardService.onSystemReady();
+ }
+ }
+
+ @Override
+ public void onServiceDisconnected(ComponentName name) {
+ if (DEBUG) Log.v(TAG, "*** Keyguard disconnected (boo!)");
+ mKeyguardService = null;
+ }
+
+ };
+ }
+
+ public boolean isShowing() {
+ if (mKeyguardService != null) {
+ mKeyguardState.showing = mKeyguardService.isShowing();
+ }
+ return mKeyguardState.showing;
+ }
+
+ public boolean isShowingAndNotHidden() {
+ if (mKeyguardService != null) {
+ mKeyguardState.showingAndNotHidden = mKeyguardService.isShowingAndNotHidden();
+ }
+ return mKeyguardState.showingAndNotHidden;
+ }
+
+ public boolean isInputRestricted() {
+ if (mKeyguardService != null) {
+ mKeyguardState.inputRestricted = mKeyguardService.isInputRestricted();
+ }
+ return mKeyguardState.inputRestricted;
+ }
+
+ public void verifyUnlock(final OnKeyguardExitResult onKeyguardExitResult) {
+ if (mKeyguardService != null) {
+ mKeyguardService.verifyUnlock(new KeyguardResult(null, onKeyguardExitResult));
+ }
+ }
+
+ public void keyguardDone(boolean authenticated, boolean wakeup) {
+ if (mKeyguardService != null) {
+ mKeyguardService.keyguardDone(authenticated, wakeup);
+ }
+ }
+
+ public void setHidden(boolean isHidden) {
+ if (mKeyguardService != null) {
+ mKeyguardService.setHidden(isHidden);
+ }
+ mKeyguardState.hidden = isHidden;
+ }
+
+ public void dismiss() {
+ if (mKeyguardService != null) {
+ mKeyguardService.dismiss();
+ }
+ }
+
+ public boolean isSecure() {
+ if (mKeyguardService != null) {
+ mKeyguardState.secure = mKeyguardService.isSecure();
+ }
+ return mKeyguardState.secure;
+ }
+
+ public void onWakeKeyWhenKeyguardShowingTq(int keycodePower) {
+ if (mKeyguardService != null) {
+ mKeyguardService.onWakeKeyWhenKeyguardShowingTq(keycodePower);
+ }
+ }
+
+ public void onWakeMotionWhenKeyguardShowingTq() {
+ if (mKeyguardService != null) {
+ mKeyguardService.onWakeMotionWhenKeyguardShowingTq();
+ }
+ }
+
+ public void onDreamingStarted() {
+ if (mKeyguardService != null) {
+ mKeyguardService.onDreamingStarted();
+ }
+ mKeyguardState.dreaming = true;
+ }
+
+ public void onDreamingStopped() {
+ if (mKeyguardService != null) {
+ mKeyguardService.onDreamingStopped();
+ }
+ mKeyguardState.dreaming = false;
+ }
+
+ public void onScreenTurnedOn(final ShowListener showListener) {
+ if (mKeyguardService != null) {
+ if (DEBUG) Log.v(TAG, "onScreenTurnedOn(showListener = " + showListener + ")");
+ mKeyguardService.onScreenTurnedOn(new KeyguardResult(showListener, null));
+ } else {
+ // try again when we establish a connection
+ if (DEBUG) Log.w(TAG, "onScreenTurnedOn(): no keyguard service!");
+ mKeyguardState.showListener = showListener;
+ mKeyguardState.restoreStateWhenConnected = true;
+ }
+ mKeyguardState.screenIsOn = true;
+ }
+
+ public void onScreenTurnedOff(int why) {
+ if (mKeyguardService != null) {
+ mKeyguardService.onScreenTurnedOff(why);
+ }
+ mKeyguardState.offReason = why;
+ mKeyguardState.screenIsOn = false;
+ }
+
+ public void setKeyguardEnabled(boolean enabled) {
+ if (mKeyguardService != null) {
+ mKeyguardService.setKeyguardEnabled(enabled);
+ }
+ mKeyguardState.enabled = enabled;
+ }
+
+ public boolean isDismissable() {
+ if (mKeyguardService != null) {
+ mKeyguardState.dismissable = mKeyguardService.isDismissable();
+ }
+ return mKeyguardState.dismissable;
+ }
+
+ public void onSystemReady() {
+ if (mKeyguardService != null) {
+ mKeyguardService.onSystemReady();
+ } else {
+ if (DEBUG) Log.v(TAG, "onSystemReady() called before keyguard service was ready");
+ mKeyguardState.systemIsReady = true;
+ }
+ }
+
+ public void doKeyguardTimeout(Bundle options) {
+ if (mKeyguardService != null) {
+ mKeyguardService.doKeyguardTimeout(options);
+ }
+ }
+
+ public void showAssistant() {
+ if (mKeyguardService != null) {
+ mKeyguardService.showAssistant();
+ }
+ }
+
+ public void setCurrentUser(int newUserId) {
+ if (mKeyguardService != null) {
+ mKeyguardService.setCurrentUser(newUserId);
+ }
+ mKeyguardState.currentUser = newUserId;
+ }
+
+ public void userActivity() {
+ if (mKeyguardService != null) {
+ mKeyguardService.userActivity();
+ }
+ }
+
+}
diff --git a/services/java/com/android/server/LockSettingsService.java b/services/java/com/android/server/LockSettingsService.java
index e20a21f..f8e9ff7 100644
--- a/services/java/com/android/server/LockSettingsService.java
+++ b/services/java/com/android/server/LockSettingsService.java
@@ -49,6 +49,7 @@ import java.util.Arrays;
*/
public class LockSettingsService extends ILockSettings.Stub {
+ private static final String PERMISSION = "android.permission.ACCESS_KEYGUARD_SECURE_STORAGE";
private final DatabaseHelper mOpenHelper;
private static final String TAG = "LockSettingsService";
@@ -99,29 +100,12 @@ public class LockSettingsService extends ILockSettings.Stub {
}
}
- private static final void checkWritePermission(int userId) {
- final int callingUid = Binder.getCallingUid();
- if (UserHandle.getAppId(callingUid) != android.os.Process.SYSTEM_UID) {
- throw new SecurityException("uid=" + callingUid
- + " not authorized to write lock settings");
- }
+ private final void checkWritePermission(int userId) {
+ mContext.checkCallingOrSelfPermission(PERMISSION);
}
- private static final void checkPasswordReadPermission(int userId) {
- final int callingUid = Binder.getCallingUid();
- if (UserHandle.getAppId(callingUid) != android.os.Process.SYSTEM_UID) {
- throw new SecurityException("uid=" + callingUid
- + " not authorized to read lock password");
- }
- }
-
- private static final void checkReadPermission(int userId) {
- final int callingUid = Binder.getCallingUid();
- if (UserHandle.getAppId(callingUid) != android.os.Process.SYSTEM_UID
- && UserHandle.getUserId(callingUid) != userId) {
- throw new SecurityException("uid=" + callingUid
- + " not authorized to read settings of user " + userId);
- }
+ private final void checkPasswordReadPermission(int userId) {
+ mContext.checkCallingOrSelfPermission(PERMISSION);
}
@Override
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index 8ef247e..3070edc 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -725,7 +725,7 @@ class ServerThread extends Thread {
} catch (Throwable e) {
reportWtf("starting CertBlacklister", e);
}
-
+
if (context.getResources().getBoolean(
com.android.internal.R.bool.config_dreamsSupported)) {
try {
@@ -862,7 +862,9 @@ class ServerThread extends Thread {
public void run() {
Slog.i(TAG, "Making services ready");
- if (!headless) startSystemUi(contextF);
+ if (!headless) {
+ startSystemUi(contextF);
+ }
try {
if (mountServiceF != null) mountServiceF.systemReady();
} catch (Throwable e) {