summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorJorim Jaggi <jjaggi@google.com>2014-05-27 18:31:57 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-05-27 18:31:57 +0000
commitfbd168331c0d6ce9f22fe3e606dc50a9fe3b04dc (patch)
tree5d599b042be9b63141c039dfdc4f12b45c939c01 /packages
parent37d5c23998424905fc72390994059e2af39320c9 (diff)
parentc14f829506a5273e8022b461db2d61038b18ac4b (diff)
downloadframeworks_base-fbd168331c0d6ce9f22fe3e606dc50a9fe3b04dc.zip
frameworks_base-fbd168331c0d6ce9f22fe3e606dc50a9fe3b04dc.tar.gz
frameworks_base-fbd168331c0d6ce9f22fe3e606dc50a9fe3b04dc.tar.bz2
Merge "Skeleton for Keyguard security method appear animations." into lmp-preview-dev
Diffstat (limited to 'packages')
-rw-r--r--packages/Keyguard/src/com/android/keyguard/KeyguardAccountView.java5
-rw-r--r--packages/Keyguard/src/com/android/keyguard/KeyguardFaceUnlockView.java4
-rw-r--r--packages/Keyguard/src/com/android/keyguard/KeyguardPINView.java7
-rw-r--r--packages/Keyguard/src/com/android/keyguard/KeyguardPasswordView.java7
-rw-r--r--packages/Keyguard/src/com/android/keyguard/KeyguardPatternView.java7
-rw-r--r--packages/Keyguard/src/com/android/keyguard/KeyguardSecurityContainer.java4
-rw-r--r--packages/Keyguard/src/com/android/keyguard/KeyguardSecurityView.java5
-rw-r--r--packages/Keyguard/src/com/android/keyguard/KeyguardSecurityViewFlipper.java8
-rw-r--r--packages/Keyguard/src/com/android/keyguard/KeyguardSelectorView.java5
-rw-r--r--packages/Keyguard/src/com/android/keyguard/KeyguardSimPinView.java5
-rw-r--r--packages/Keyguard/src/com/android/keyguard/KeyguardSimPukView.java5
-rw-r--r--packages/Keyguard/src/com/android/keyguard/KeyguardViewBase.java7
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java1
13 files changed, 70 insertions, 0 deletions
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardAccountView.java b/packages/Keyguard/src/com/android/keyguard/KeyguardAccountView.java
index f69fa5f..69abc7a 100644
--- a/packages/Keyguard/src/com/android/keyguard/KeyguardAccountView.java
+++ b/packages/Keyguard/src/com/android/keyguard/KeyguardAccountView.java
@@ -328,5 +328,10 @@ public class KeyguardAccountView extends LinearLayout implements KeyguardSecurit
@Override
public void hideBouncer(int duration) {
}
+
+ @Override
+ public void startAppearAnimation() {
+ // TODO.
+ }
}
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardFaceUnlockView.java b/packages/Keyguard/src/com/android/keyguard/KeyguardFaceUnlockView.java
index 701d15f..c9fe93c 100644
--- a/packages/Keyguard/src/com/android/keyguard/KeyguardFaceUnlockView.java
+++ b/packages/Keyguard/src/com/android/keyguard/KeyguardFaceUnlockView.java
@@ -349,4 +349,8 @@ public class KeyguardFaceUnlockView extends LinearLayout implements KeyguardSecu
hideBouncer(mSecurityMessageDisplay, mEcaView, mBouncerFrame, duration);
}
+ @Override
+ public void startAppearAnimation() {
+ // TODO.
+ }
}
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardPINView.java b/packages/Keyguard/src/com/android/keyguard/KeyguardPINView.java
index ca2d615..4dfda91 100644
--- a/packages/Keyguard/src/com/android/keyguard/KeyguardPINView.java
+++ b/packages/Keyguard/src/com/android/keyguard/KeyguardPINView.java
@@ -114,4 +114,11 @@ public class KeyguardPINView extends KeyguardAbsKeyInputView
public int getWrongPasswordStringId() {
return R.string.kg_wrong_pin;
}
+
+ @Override
+ public void startAppearAnimation() {
+ // TODO: Fancy animation.
+ setAlpha(0);
+ animate().alpha(1).withLayer().setDuration(200);
+ }
}
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardPasswordView.java b/packages/Keyguard/src/com/android/keyguard/KeyguardPasswordView.java
index e733afc..0c385da 100644
--- a/packages/Keyguard/src/com/android/keyguard/KeyguardPasswordView.java
+++ b/packages/Keyguard/src/com/android/keyguard/KeyguardPasswordView.java
@@ -198,4 +198,11 @@ public class KeyguardPasswordView extends KeyguardAbsKeyInputView
public int getWrongPasswordStringId() {
return R.string.kg_wrong_password;
}
+
+ @Override
+ public void startAppearAnimation() {
+ // TODO: Fancy animation.
+ setAlpha(0);
+ animate().alpha(1).withLayer().setDuration(200);
+ }
}
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardPatternView.java b/packages/Keyguard/src/com/android/keyguard/KeyguardPatternView.java
index 98122fc..5853ff9 100644
--- a/packages/Keyguard/src/com/android/keyguard/KeyguardPatternView.java
+++ b/packages/Keyguard/src/com/android/keyguard/KeyguardPatternView.java
@@ -400,4 +400,11 @@ public class KeyguardPatternView extends LinearLayout implements KeyguardSecurit
KeyguardSecurityViewHelper.
hideBouncer(mSecurityMessageDisplay, mEcaView, mBouncerFrame, duration);
}
+
+ @Override
+ public void startAppearAnimation() {
+ // TODO: Fancy animation.
+ setAlpha(0);
+ animate().alpha(1).withLayer().setDuration(200);
+ }
}
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityContainer.java b/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityContainer.java
index 94edc07..382cbec 100644
--- a/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityContainer.java
+++ b/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityContainer.java
@@ -81,6 +81,10 @@ public class KeyguardSecurityContainer extends FrameLayout implements KeyguardSe
getSecurityView(mCurrentSecuritySelection).onPause();
}
+ public void startAppearAnimation() {
+ getSecurityView(mCurrentSecuritySelection).startAppearAnimation();
+ }
+
void updateSecurityViews(boolean isBouncing) {
int children = mSecurityViewFlipper.getChildCount();
for (int i = 0; i < children; i++) {
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityView.java b/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityView.java
index dfeacf3..86bd877 100644
--- a/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityView.java
+++ b/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityView.java
@@ -84,4 +84,9 @@ public interface KeyguardSecurityView {
* @param duration millisends for the transisiton animation.
*/
void hideBouncer(int duration);
+
+ /**
+ * Starts the animation which should run when the security view appears.
+ */
+ void startAppearAnimation();
}
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityViewFlipper.java b/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityViewFlipper.java
index 07239d1..178ca5e 100644
--- a/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityViewFlipper.java
+++ b/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityViewFlipper.java
@@ -159,6 +159,14 @@ public class KeyguardSecurityViewFlipper extends ViewFlipper implements Keyguard
}
@Override
+ public void startAppearAnimation() {
+ KeyguardSecurityView ksv = getSecurityView();
+ if (ksv != null) {
+ ksv.startAppearAnimation();
+ }
+ }
+
+ @Override
protected boolean checkLayoutParams(ViewGroup.LayoutParams p) {
return p instanceof LayoutParams;
}
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardSelectorView.java b/packages/Keyguard/src/com/android/keyguard/KeyguardSelectorView.java
index 03e7b07..98baa04 100644
--- a/packages/Keyguard/src/com/android/keyguard/KeyguardSelectorView.java
+++ b/packages/Keyguard/src/com/android/keyguard/KeyguardSelectorView.java
@@ -244,4 +244,9 @@ public class KeyguardSelectorView extends LinearLayout implements KeyguardSecuri
KeyguardSecurityViewHelper.
hideBouncer(mSecurityMessageDisplay, mFadeView, mBouncerFrame, duration);
}
+
+ @Override
+ public void startAppearAnimation() {
+ // noop.
+ }
}
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardSimPinView.java b/packages/Keyguard/src/com/android/keyguard/KeyguardSimPinView.java
index 4791956..8222009 100644
--- a/packages/Keyguard/src/com/android/keyguard/KeyguardSimPinView.java
+++ b/packages/Keyguard/src/com/android/keyguard/KeyguardSimPinView.java
@@ -270,5 +270,10 @@ public class KeyguardSimPinView extends KeyguardAbsKeyInputView
mCheckSimPinThread.start();
}
}
+
+ @Override
+ public void startAppearAnimation() {
+ // noop.
+ }
}
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardSimPukView.java b/packages/Keyguard/src/com/android/keyguard/KeyguardSimPukView.java
index b9c7f51..79c7dff 100644
--- a/packages/Keyguard/src/com/android/keyguard/KeyguardSimPukView.java
+++ b/packages/Keyguard/src/com/android/keyguard/KeyguardSimPukView.java
@@ -339,6 +339,11 @@ public class KeyguardSimPukView extends KeyguardAbsKeyInputView
protected void verifyPasswordAndUnlock() {
mStateMachine.next();
}
+
+ @Override
+ public void startAppearAnimation() {
+ // noop.
+ }
}
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardViewBase.java b/packages/Keyguard/src/com/android/keyguard/KeyguardViewBase.java
index 48b7be9..3e444fa 100644
--- a/packages/Keyguard/src/com/android/keyguard/KeyguardViewBase.java
+++ b/packages/Keyguard/src/com/android/keyguard/KeyguardViewBase.java
@@ -241,6 +241,13 @@ public abstract class KeyguardViewBase extends FrameLayout implements SecurityCa
}
/**
+ * Starts the animation when the Keyguard gets shown.
+ */
+ public void startAppearAnimation() {
+ mSecurityContainer.startAppearAnimation();
+ }
+
+ /**
* Verify that the user can get past the keyguard securely. This is called,
* for example, when the phone disables the keyguard but then wants to launch
* something else that requires secure access.
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java
index f72aff4..b7a7b0a 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java
@@ -65,6 +65,7 @@ public class KeyguardBouncer {
if (!mKeyguardView.dismiss()) {
mRoot.setVisibility(View.VISIBLE);
mKeyguardView.onResume();
+ mKeyguardView.startAppearAnimation();
}
}