Loading core/res/res/anim/keyguard_security_fade_in.xml 0 → 100644 +22 −0 Original line number Diff line number Diff line <?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. --> <alpha xmlns:android="http://schemas.android.com/apk/res/android" android:interpolator="@interpolator/decelerate_quad" android:fromAlpha="0.0" android:toAlpha="1.0" android:duration="@integer/kg_security_fade_duration" /> core/res/res/anim/keyguard_security_fade_out.xml 0 → 100644 +20 −0 Original line number Diff line number Diff line <?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. --> <alpha xmlns:android="http://schemas.android.com/apk/res/android" android:interpolator="@interpolator/accelerate_quad" android:fromAlpha="1.0" android:toAlpha="0.0" android:duration="@integer/kg_security_fade_duration" /> core/res/res/values/integers.xml +1 −0 Original line number Diff line number Diff line Loading @@ -18,4 +18,5 @@ --> <resources> <integer name="kg_security_flip_duration">150</integer> <integer name="kg_security_fade_duration">150</integer> </resources> core/res/res/values/public.xml +2 −0 Original line number Diff line number Diff line Loading @@ -1214,6 +1214,8 @@ <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="array" name="config_keyboardTapVibePattern" /> <java-symbol type="array" name="config_longPressVibePattern" /> <java-symbol type="array" name="config_safeModeDisabledVibePattern" /> Loading policy/src/com/android/internal/policy/impl/keyguard/KeyguardHostView.java +35 −10 Original line number Diff line number Diff line Loading @@ -130,10 +130,6 @@ public class KeyguardHostView extends KeyguardViewBase { // View Flipper mViewFlipper = (ViewFlipper) findViewById(R.id.view_flipper); mViewFlipper.setInAnimation(AnimationUtils.loadAnimation(mContext, R.anim.keyguard_security_animate_in)); mViewFlipper.setOutAnimation(AnimationUtils.loadAnimation(mContext, R.anim.keyguard_security_animate_out)); // Initialize all security views for (int i = 0; i < mViewIds.length; i++) { Loading Loading @@ -381,12 +377,29 @@ public class KeyguardHostView extends KeyguardViewBase { showSecurityScreen(realSecurityId); // switch to the "real" security view } } else if (authenticated) { if (mCurrentSecurityId == SECURITY_PATTERN_ID || mCurrentSecurityId == SECURITY_PASSWORD_ID || mCurrentSecurityId == SECURITY_ACCOUNT_ID || mCurrentSecurityId == SECURITY_BIOMETRIC_ID) { switch (mCurrentSecurityId) { case SECURITY_PATTERN_ID: case SECURITY_PASSWORD_ID: case SECURITY_ACCOUNT_ID: case SECURITY_BIOMETRIC_ID: finish = true; break; case SECURITY_SIM_PIN_ID: case SECURITY_SIM_PUK_ID: // Shortcut for SIM PIN/PUK to go to directly to user's security screen or home SecurityMode securityMode = mSecurityModel.getSecurityMode(); if (securityMode != SecurityMode.None) { showSecurityScreen(getSecurityViewIdForMode(securityMode)); } else { finish = true; } break; default: showSecurityScreen(SECURITY_SELECTOR_ID); break; } } else { // Not authenticated but we were asked to dismiss so go back to selector screen. showSecurityScreen(SECURITY_SELECTOR_ID); Loading Loading @@ -480,10 +493,20 @@ public class KeyguardHostView extends KeyguardViewBase { newView.onResume(); mViewMediatorCallback.setNeedsInput(newView.needsInput()); mCurrentSecurityId = securityViewId; // Find and show this child. final int childCount = mViewFlipper.getChildCount(); // If we're go to/from the selector view, do flip animation, otherwise use fade animation. final boolean doFlip = mCurrentSecurityId == SECURITY_SELECTOR_ID || securityViewId == SECURITY_SELECTOR_ID; final int inAnimation = doFlip ? R.anim.keyguard_security_animate_in : R.anim.keyguard_security_fade_in; final int outAnimation = doFlip ? R.anim.keyguard_security_animate_out : R.anim.keyguard_security_fade_out; mViewFlipper.setInAnimation(AnimationUtils.loadAnimation(mContext, inAnimation)); mViewFlipper.setOutAnimation(AnimationUtils.loadAnimation(mContext, outAnimation)); for (int i = 0; i < childCount; i++) { if (securityViewId == mViewFlipper.getChildAt(i).getId()) { mViewFlipper.setDisplayedChild(i); Loading @@ -495,6 +518,8 @@ public class KeyguardHostView extends KeyguardViewBase { if (securityViewId == SECURITY_SELECTOR_ID) { setOnDismissRunnable(null); } mCurrentSecurityId = securityViewId; } @Override Loading Loading
core/res/res/anim/keyguard_security_fade_in.xml 0 → 100644 +22 −0 Original line number Diff line number Diff line <?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. --> <alpha xmlns:android="http://schemas.android.com/apk/res/android" android:interpolator="@interpolator/decelerate_quad" android:fromAlpha="0.0" android:toAlpha="1.0" android:duration="@integer/kg_security_fade_duration" />
core/res/res/anim/keyguard_security_fade_out.xml 0 → 100644 +20 −0 Original line number Diff line number Diff line <?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. --> <alpha xmlns:android="http://schemas.android.com/apk/res/android" android:interpolator="@interpolator/accelerate_quad" android:fromAlpha="1.0" android:toAlpha="0.0" android:duration="@integer/kg_security_fade_duration" />
core/res/res/values/integers.xml +1 −0 Original line number Diff line number Diff line Loading @@ -18,4 +18,5 @@ --> <resources> <integer name="kg_security_flip_duration">150</integer> <integer name="kg_security_fade_duration">150</integer> </resources>
core/res/res/values/public.xml +2 −0 Original line number Diff line number Diff line Loading @@ -1214,6 +1214,8 @@ <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="array" name="config_keyboardTapVibePattern" /> <java-symbol type="array" name="config_longPressVibePattern" /> <java-symbol type="array" name="config_safeModeDisabledVibePattern" /> Loading
policy/src/com/android/internal/policy/impl/keyguard/KeyguardHostView.java +35 −10 Original line number Diff line number Diff line Loading @@ -130,10 +130,6 @@ public class KeyguardHostView extends KeyguardViewBase { // View Flipper mViewFlipper = (ViewFlipper) findViewById(R.id.view_flipper); mViewFlipper.setInAnimation(AnimationUtils.loadAnimation(mContext, R.anim.keyguard_security_animate_in)); mViewFlipper.setOutAnimation(AnimationUtils.loadAnimation(mContext, R.anim.keyguard_security_animate_out)); // Initialize all security views for (int i = 0; i < mViewIds.length; i++) { Loading Loading @@ -381,12 +377,29 @@ public class KeyguardHostView extends KeyguardViewBase { showSecurityScreen(realSecurityId); // switch to the "real" security view } } else if (authenticated) { if (mCurrentSecurityId == SECURITY_PATTERN_ID || mCurrentSecurityId == SECURITY_PASSWORD_ID || mCurrentSecurityId == SECURITY_ACCOUNT_ID || mCurrentSecurityId == SECURITY_BIOMETRIC_ID) { switch (mCurrentSecurityId) { case SECURITY_PATTERN_ID: case SECURITY_PASSWORD_ID: case SECURITY_ACCOUNT_ID: case SECURITY_BIOMETRIC_ID: finish = true; break; case SECURITY_SIM_PIN_ID: case SECURITY_SIM_PUK_ID: // Shortcut for SIM PIN/PUK to go to directly to user's security screen or home SecurityMode securityMode = mSecurityModel.getSecurityMode(); if (securityMode != SecurityMode.None) { showSecurityScreen(getSecurityViewIdForMode(securityMode)); } else { finish = true; } break; default: showSecurityScreen(SECURITY_SELECTOR_ID); break; } } else { // Not authenticated but we were asked to dismiss so go back to selector screen. showSecurityScreen(SECURITY_SELECTOR_ID); Loading Loading @@ -480,10 +493,20 @@ public class KeyguardHostView extends KeyguardViewBase { newView.onResume(); mViewMediatorCallback.setNeedsInput(newView.needsInput()); mCurrentSecurityId = securityViewId; // Find and show this child. final int childCount = mViewFlipper.getChildCount(); // If we're go to/from the selector view, do flip animation, otherwise use fade animation. final boolean doFlip = mCurrentSecurityId == SECURITY_SELECTOR_ID || securityViewId == SECURITY_SELECTOR_ID; final int inAnimation = doFlip ? R.anim.keyguard_security_animate_in : R.anim.keyguard_security_fade_in; final int outAnimation = doFlip ? R.anim.keyguard_security_animate_out : R.anim.keyguard_security_fade_out; mViewFlipper.setInAnimation(AnimationUtils.loadAnimation(mContext, inAnimation)); mViewFlipper.setOutAnimation(AnimationUtils.loadAnimation(mContext, outAnimation)); for (int i = 0; i < childCount; i++) { if (securityViewId == mViewFlipper.getChildAt(i).getId()) { mViewFlipper.setDisplayedChild(i); Loading @@ -495,6 +518,8 @@ public class KeyguardHostView extends KeyguardViewBase { if (securityViewId == SECURITY_SELECTOR_ID) { setOnDismissRunnable(null); } mCurrentSecurityId = securityViewId; } @Override Loading