OSDN Git Service

bouncer: hide more text and frame less.
authorChris Wren <cwren@android.com>
Mon, 5 Nov 2012 18:16:31 +0000 (13:16 -0500)
committerChris Wren <cwren@android.com>
Mon, 5 Nov 2012 18:30:26 +0000 (13:30 -0500)
Bug: 7464865
Change-Id: Ic8dac2582c014922143919f142fd36eb720dd3a9
Proto-Id: Id80601c9ffbdc34669b485e943b42cee237898f3

20 files changed:
core/res/res/layout-port/keyguard_host_view.xml
core/res/res/layout/keyguard_face_unlock_view.xml
core/res/res/layout/keyguard_password_view.xml
core/res/res/layout/keyguard_pattern_view.xml
core/res/res/layout/keyguard_pin_view.xml
core/res/res/layout/keyguard_sim_pin_view.xml
core/res/res/layout/keyguard_sim_puk_view.xml
core/res/res/values/symbols.xml
policy/src/com/android/internal/policy/impl/keyguard/KeyguardAbsKeyInputView.java
policy/src/com/android/internal/policy/impl/keyguard/KeyguardAccountView.java
policy/src/com/android/internal/policy/impl/keyguard/KeyguardFaceUnlockView.java
policy/src/com/android/internal/policy/impl/keyguard/KeyguardHostView.java
policy/src/com/android/internal/policy/impl/keyguard/KeyguardMessageArea.java
policy/src/com/android/internal/policy/impl/keyguard/KeyguardPatternView.java
policy/src/com/android/internal/policy/impl/keyguard/KeyguardSecurityContainer.java
policy/src/com/android/internal/policy/impl/keyguard/KeyguardSecurityView.java
policy/src/com/android/internal/policy/impl/keyguard/KeyguardSecurityViewFlipper.java
policy/src/com/android/internal/policy/impl/keyguard/KeyguardSecurityViewHelper.java [new file with mode: 0644]
policy/src/com/android/internal/policy/impl/keyguard/KeyguardSelectorView.java
policy/src/com/android/internal/policy/impl/keyguard/KeyguardViewStateManager.java

index 9921313..b2bf3f1 100644 (file)
@@ -64,7 +64,6 @@
             android:layout_width="wrap_content"
             android:layout_height="@dimen/keyguard_security_height"
             androidprv:layout_childType="challenge"
-            android:background="@drawable/kg_bouncer_bg_white"
             android:padding="0dp"
             android:gravity="bottom|center_horizontal">
             <com.android.internal.policy.impl.keyguard.KeyguardSecurityViewFlipper
index 39e8f31..c1e35cf 100644 (file)
         android:layout_height="wrap_content"
         />
 
-    <com.android.internal.widget.FaceUnlockView
-        android:id="@+id/face_unlock_area_view"
-        android:layout_width="match_parent"
-        android:layout_height="0dp"
-        android:background="@*android:drawable/intro_bg"
-        android:gravity="center"
-        android:layout_weight="1">
+    <FrameLayout
+       android:id="@+id/keyguard_bouncer_frame"
+       android:background="@*android:drawable/kg_bouncer_bg_white"
+       android:layout_width="match_parent"
+       android:layout_height="0dp"
+       android:layout_weight="1"
+       >
+       <com.android.internal.widget.FaceUnlockView
+           android:id="@+id/face_unlock_area_view"
+           android:layout_width="match_parent"
+           android:layout_height="match_parent"
+           android:background="@*android: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"
-        />
+           <View
+               android:id="@+id/spotlightMask"
+               android:layout_width="match_parent"
+               android:layout_height="match_parent"
+               android:background="@*android:color/facelock_spotlight_mask"
+           />
 
-        <ImageButton
-            android:id="@+id/face_unlock_cancel_button"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:padding="5dip"
-            android:layout_alignParentTop="true"
-            android:layout_alignParentEnd="true"
-            android:background="#00000000"
-            android:src="@*android:drawable/ic_facial_backup"
-        />
-    </com.android.internal.widget.FaceUnlockView>
+           <ImageButton
+               android:id="@+id/face_unlock_cancel_button"
+               android:layout_width="wrap_content"
+               android:layout_height="wrap_content"
+               android:padding="5dip"
+               android:layout_alignParentTop="true"
+               android:layout_alignParentEnd="true"
+               android:background="#00000000"
+               android:src="@*android:drawable/ic_facial_backup"
+           />
+       </com.android.internal.widget.FaceUnlockView>
+    </FrameLayout>
 
     <include layout="@layout/keyguard_emergency_carrier_area"
         android:id="@+id/keyguard_selector_fade_container"
index a054d07..2e2ada8 100644 (file)
     <!-- Password entry field -->
     <!-- Note: the entire container is styled to look like the edit field,
          since the backspace/IME switcher looks better inside -->
-     <LinearLayout
+      <FrameLayout
+         android:id="@+id/keyguard_bouncer_frame"
+         android:background="@*android:drawable/kg_bouncer_bg_white"
          android:layout_height="wrap_content"
          android:layout_width="match_parent"
-         android:orientation="horizontal"
-         android:background="#70000000"
-         android:layout_marginTop="8dp"
-         android:layout_marginBottom="8dp"
          >
-
-         <EditText android:id="@+id/passwordEntry"
-             android:layout_width="0dip"
+         <LinearLayout
              android:layout_height="wrap_content"
-             android:layout_weight="1"
-             android:gravity="center_horizontal"
-             android:layout_gravity="center_vertical"
-             android:layout_marginStart="@*android:dimen/keyguard_lockscreen_pin_margin_left"
-             android:singleLine="true"
-             android:textStyle="normal"
-             android:inputType="textPassword"
-             android:textSize="36sp"
-             android:background="@null"
-             android:textAppearance="?android:attr/textAppearanceMedium"
-             android:textColor="#ffffffff"
-             android:imeOptions="flagForceAscii|actionDone"
-             />
+             android:layout_width="match_parent"
+             android:orientation="horizontal"
+             android:background="#70000000"
+             android:layout_marginTop="8dp"
+             android:layout_marginBottom="8dp"
+             >
 
-         <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:clickable="true"
-             android:padding="8dip"
-             android:layout_gravity="center"
-             android:background="?android:attr/selectableItemBackground"
-             android:visibility="gone"
-             />
+             <EditText android:id="@+id/passwordEntry"
+                 android:layout_width="0dip"
+                 android:layout_height="wrap_content"
+                 android:layout_weight="1"
+                 android:gravity="center_horizontal"
+                 android:layout_gravity="center_vertical"
+                 android:layout_marginStart="@*android:dimen/keyguard_lockscreen_pin_margin_left"
+                 android:singleLine="true"
+                 android:textStyle="normal"
+                 android:inputType="textPassword"
+                 android:textSize="36sp"
+                 android:background="@null"
+                 android:textAppearance="?android:attr/textAppearanceMedium"
+                 android:textColor="#ffffffff"
+                 android:imeOptions="flagForceAscii|actionDone"
+                 />
 
-        </LinearLayout>
+             <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:clickable="true"
+                 android:padding="8dip"
+                 android:layout_gravity="center"
+                 android:background="?android:attr/selectableItemBackground"
+                 android:visibility="gone"
+                 />
 
+            </LinearLayout>
+       </FrameLayout>
     <include layout="@layout/keyguard_emergency_carrier_area"
              android:id="@+id/keyguard_selector_fade_container"
              android:layout_width="match_parent"
index 5ebc000..1c11fdd 100644 (file)
             android:orientation="vertical"
             android:layout_gravity="center">
 
-            <!-- We need MATCH_PARENT here only to force the size of the parent to be passed to
-            the pattern view for it to compute its size. This is an unusual case, caused by
-            LockPatternView's requirement to maintain a square aspect ratio based on the width
-            of the screen. -->
+          <FrameLayout
+             android:id="@+id/keyguard_bouncer_frame"
+             android:background="@*android:drawable/kg_bouncer_bg_white"
+             android:layout_width="match_parent"
+             android:layout_height="0dp"
+             android:layout_weight="1"
+             >
             <com.android.internal.widget.LockPatternView
                 android:id="@+id/lockPatternView"
-                android:layout_width="wrap_content"
-                android:layout_height="0dp"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
                 android:layout_weight="1"
                 android:layout_marginEnd="8dip"
                 android:layout_marginBottom="4dip"
                 android:layout_gravity="center_horizontal"
                 android:gravity="center"
                 android:contentDescription="@string/keyguard_accessibility_pattern_area" />
-
-            <include layout="@layout/keyguard_emergency_carrier_area"
-                android:id="@+id/keyguard_selector_fade_container"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:orientation="vertical"
-                android:layout_gravity="bottom|center_horizontal"
-                android:gravity="center_horizontal" />
-
+          </FrameLayout>
+          <include layout="@layout/keyguard_emergency_carrier_area"
+              android:id="@+id/keyguard_selector_fade_container"
+              android:layout_width="match_parent"
+              android:layout_height="wrap_content"
+              android:orientation="vertical"
+              android:layout_gravity="bottom|center_horizontal"
+              android:gravity="center_horizontal" />
         </LinearLayout>
     </FrameLayout>
 
index d6cfe2a..d486d5e 100644 (file)
         android:layout_height="wrap_content"
         />
     <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="0dp"
-        android:orientation="horizontal"
-        android:layout_weight="1"
-        >
-        <TextView android:id="@+id/pinEntry"
-            android:editable="true"
-            android:layout_width="0dip"
-            android:layout_height="match_parent"
-            android:layout_weight="1"
-            android:gravity="center"
-            android:layout_marginStart="@*android:dimen/keyguard_lockscreen_pin_margin_left"
-            android:singleLine="true"
-            android:cursorVisible="false"
-            android:background="@null"
-            android:textAppearance="@android:style/TextAppearance.NumPadKey"
-            android:imeOptions="flagForceAscii|actionDone"
-            />
-        <ImageButton android:id="@+id/delete_button"
-            android:layout_width="wrap_content"
-            android:layout_height="match_parent"
-            android:gravity="center_vertical"
-            android:src="@*android:drawable/ic_input_delete"
-            android:clickable="true"
-            android:paddingTop="8dip"
-            android:paddingBottom="8dip"
-            android:paddingLeft="24dp"
-            android:paddingRight="24dp"
-            android:background="?android:attr/selectableItemBackground"
-            android:contentDescription="@string/keyboardview_keycode_delete"
-            />
-    </LinearLayout>
-    <View
-        android:layout_width="wrap_content"
-        android:layout_height="1dp"
-        android:background="#55FFFFFF"
-        />
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="0dp"
-        android:layout_weight="1"
-        android:orientation="horizontal"
-        >
-        <view class="com.android.internal.policy.impl.keyguard.NumPadKey"
-            android:id="@+id/key1"
-            style="@style/Widget.Button.NumPadKey"
-            android:layout_width="0px"
-            android:layout_height="match_parent"
-            android:layout_weight="1"
-            androidprv:textView="@+id/pinEntry"
-            androidprv:digit="1"
-            />
-        <view class="com.android.internal.policy.impl.keyguard.NumPadKey"
-            android:id="@+id/key2"
-            style="@style/Widget.Button.NumPadKey"
-            android:layout_width="0px"
-            android:layout_height="match_parent"
-            android:layout_weight="1"
-            androidprv:textView="@+id/pinEntry"
-            androidprv:digit="2"
-            />
-        <view class="com.android.internal.policy.impl.keyguard.NumPadKey"
-            android:id="@+id/key3"
-            style="@style/Widget.Button.NumPadKey"
-            android:layout_width="0px"
-            android:layout_height="match_parent"
-            android:layout_weight="1"
-            androidprv:textView="@+id/pinEntry"
-            androidprv:digit="3"
-            />
-    </LinearLayout>
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="0dp"
-        android:layout_weight="1"
-        android:orientation="horizontal"
-        >
-        <view class="com.android.internal.policy.impl.keyguard.NumPadKey"
-            android:id="@+id/key4"
-            style="@style/Widget.Button.NumPadKey"
-            android:layout_width="0px"
-            android:layout_height="match_parent"
-            android:layout_weight="1"
-            androidprv:textView="@+id/pinEntry"
-            androidprv:digit="4"
-            />
-        <view class="com.android.internal.policy.impl.keyguard.NumPadKey"
-            android:id="@+id/key5"
-            style="@style/Widget.Button.NumPadKey"
-            android:layout_width="0px"
-            android:layout_height="match_parent"
-            android:layout_weight="1"
-            androidprv:textView="@+id/pinEntry"
-            androidprv:digit="5"
-            />
-        <view class="com.android.internal.policy.impl.keyguard.NumPadKey"
-            android:id="@+id/key6"
-            style="@style/Widget.Button.NumPadKey"
-            android:layout_width="0px"
-            android:layout_height="match_parent"
-            android:layout_weight="1"
-            androidprv:textView="@+id/pinEntry"
-            androidprv:digit="6"
-            />
+       android:id="@+id/keyguard_bouncer_frame"
+       android:background="@*android:drawable/kg_bouncer_bg_white"
+       android:layout_width="match_parent"
+       android:layout_height="0dp"
+       android:orientation="vertical"
+       android:layout_weight="1"
+       >
+       <LinearLayout
+          android:layout_width="match_parent"
+          android:layout_height="0dp"
+          android:orientation="horizontal"
+          android:layout_weight="1"
+          >
+          <TextView android:id="@+id/pinEntry"
+               android:editable="true"
+               android:layout_width="0dip"
+               android:layout_height="match_parent"
+               android:layout_weight="1"
+               android:gravity="center"
+               android:layout_marginStart="@*android:dimen/keyguard_lockscreen_pin_margin_left"
+               android:singleLine="true"
+               android:cursorVisible="false"
+               android:background="@null"
+               android:textAppearance="@style/TextAppearance.NumPadKey"
+               android:imeOptions="flagForceAscii|actionDone"
+               />
+           <ImageButton android:id="@+id/delete_button"
+               android:layout_width="wrap_content"
+               android:layout_height="match_parent"
+               android:gravity="center_vertical"
+               android:src="@*android:drawable/ic_input_delete"
+               android:clickable="true"
+               android:paddingTop="8dip"
+               android:paddingBottom="8dip"
+               android:paddingLeft="24dp"
+               android:paddingRight="24dp"
+               android:background="?android:attr/selectableItemBackground"
+               android:contentDescription="@string/keyboardview_keycode_delete"
+               />
+       </LinearLayout>
+       <View
+           android:layout_width="wrap_content"
+           android:layout_height="1dp"
+           android:background="#55FFFFFF"
+           />
+       <LinearLayout
+           android:layout_width="match_parent"
+           android:layout_height="0dp"
+           android:layout_weight="1"
+           android:orientation="horizontal"
+           >
+           <view class="com.android.internal.policy.impl.keyguard.NumPadKey"
+               android:id="@+id/key1"
+               style="@style/Widget.Button.NumPadKey"
+               android:layout_width="0px"
+               android:layout_height="match_parent"
+               android:layout_weight="1"
+               androidprv:textView="@+id/pinEntry"
+               androidprv:digit="1"
+               />
+           <view class="com.android.internal.policy.impl.keyguard.NumPadKey"
+               android:id="@+id/key2"
+               style="@style/Widget.Button.NumPadKey"
+               android:layout_width="0px"
+               android:layout_height="match_parent"
+               android:layout_weight="1"
+               androidprv:textView="@+id/pinEntry"
+               androidprv:digit="2"
+               />
+           <view class="com.android.internal.policy.impl.keyguard.NumPadKey"
+               android:id="@+id/key3"
+               style="@style/Widget.Button.NumPadKey"
+               android:layout_width="0px"
+               android:layout_height="match_parent"
+               android:layout_weight="1"
+               androidprv:textView="@+id/pinEntry"
+               androidprv:digit="3"
+               />
+       </LinearLayout>
+       <LinearLayout
+           android:layout_width="match_parent"
+           android:layout_height="0dp"
+           android:layout_weight="1"
+           android:orientation="horizontal"
+           >
+           <view class="com.android.internal.policy.impl.keyguard.NumPadKey"
+               android:id="@+id/key4"
+               style="@style/Widget.Button.NumPadKey"
+               android:layout_width="0px"
+               android:layout_height="match_parent"
+               android:layout_weight="1"
+               androidprv:textView="@+id/pinEntry"
+               androidprv:digit="4"
+               />
+           <view class="com.android.internal.policy.impl.keyguard.NumPadKey"
+               android:id="@+id/key5"
+               style="@style/Widget.Button.NumPadKey"
+               android:layout_width="0px"
+               android:layout_height="match_parent"
+               android:layout_weight="1"
+               androidprv:textView="@+id/pinEntry"
+               androidprv:digit="5"
+               />
+           <view class="com.android.internal.policy.impl.keyguard.NumPadKey"
+               android:id="@+id/key6"
+               style="@style/Widget.Button.NumPadKey"
+               android:layout_width="0px"
+               android:layout_height="match_parent"
+               android:layout_weight="1"
+               androidprv:textView="@+id/pinEntry"
+               androidprv:digit="6"
+               />
+       </LinearLayout>
+       <LinearLayout
+           android:layout_width="match_parent"
+           android:layout_height="0dp"
+           android:orientation="horizontal"
+           android:layout_weight="1"
+           >
+           <view class="com.android.internal.policy.impl.keyguard.NumPadKey"
+               android:id="@+id/key7"
+               style="@style/Widget.Button.NumPadKey"
+               android:layout_width="0px"
+               android:layout_height="match_parent"
+               android:layout_weight="1"
+               androidprv:textView="@+id/pinEntry"
+               androidprv:digit="7"
+               />
+           <view class="com.android.internal.policy.impl.keyguard.NumPadKey"
+               android:id="@+id/key8"
+               style="@style/Widget.Button.NumPadKey"
+               android:layout_width="0px"
+               android:layout_height="match_parent"
+               android:layout_weight="1"
+               androidprv:textView="@+id/pinEntry"
+               androidprv:digit="8"
+               />
+           <view class="com.android.internal.policy.impl.keyguard.NumPadKey"
+               android:id="@+id/key9"
+               style="@style/Widget.Button.NumPadKey"
+               android:layout_width="0px"
+               android:layout_height="match_parent"
+               android:layout_weight="1"
+               androidprv:textView="@+id/pinEntry"
+               androidprv:digit="9"
+               />
+       </LinearLayout>
+       <LinearLayout
+           android:layout_width="match_parent"
+           android:layout_height="0dp"
+           android:layout_weight="1"
+           android:orientation="horizontal"
+           >
+           <Space
+               android:layout_width="0px"
+               android:layout_height="match_parent"
+               android:layout_weight="1"
+               />
+           <view class="com.android.internal.policy.impl.keyguard.NumPadKey"
+               android:id="@+id/key0"
+               style="@style/Widget.Button.NumPadKey"
+               android:layout_width="0px"
+               android:layout_height="match_parent"
+               android:layout_weight="1"
+               androidprv:textView="@+id/pinEntry"
+               androidprv:digit="0"
+               />
+           <ImageButton
+               android:id="@+id/key_enter"
+               style="@style/Widget.Button.NumPadKey"
+               android:layout_width="0px"
+               android:layout_height="match_parent"
+               android:layout_weight="1"
+               android:paddingRight="30dp"
+               android:src="@drawable/sym_keyboard_return_holo"
+               android:contentDescription="@string/keyboardview_keycode_enter"
+               />
+       </LinearLayout>
     </LinearLayout>
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="0dp"
-        android:orientation="horizontal"
-        android:layout_weight="1"
-        >
-        <view class="com.android.internal.policy.impl.keyguard.NumPadKey"
-            android:id="@+id/key7"
-            style="@style/Widget.Button.NumPadKey"
-            android:layout_width="0px"
-            android:layout_height="match_parent"
-            android:layout_weight="1"
-            androidprv:textView="@+id/pinEntry"
-            androidprv:digit="7"
-            />
-        <view class="com.android.internal.policy.impl.keyguard.NumPadKey"
-            android:id="@+id/key8"
-            style="@style/Widget.Button.NumPadKey"
-            android:layout_width="0px"
-            android:layout_height="match_parent"
-            android:layout_weight="1"
-            androidprv:textView="@+id/pinEntry"
-            androidprv:digit="8"
-            />
-        <view class="com.android.internal.policy.impl.keyguard.NumPadKey"
-            android:id="@+id/key9"
-            style="@style/Widget.Button.NumPadKey"
-            android:layout_width="0px"
-            android:layout_height="match_parent"
-            android:layout_weight="1"
-            androidprv:textView="@+id/pinEntry"
-            androidprv:digit="9"
-            />
-    </LinearLayout>
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="0dp"
-        android:layout_weight="1"
-        android:orientation="horizontal"
-        >
-        <Space
-            android:layout_width="0px"
-            android:layout_height="match_parent"
-            android:layout_weight="1"
-            />
-        <view class="com.android.internal.policy.impl.keyguard.NumPadKey"
-            android:id="@+id/key0"
-            style="@style/Widget.Button.NumPadKey"
-            android:layout_width="0px"
-            android:layout_height="match_parent"
-            android:layout_weight="1"
-            androidprv:textView="@+id/pinEntry"
-            androidprv:digit="0"
-            />
-        <ImageButton
-            android:id="@+id/key_enter"
-            style="@style/Widget.Button.NumPadKey"
-            android:layout_width="0px"
-            android:layout_height="match_parent"
-            android:layout_weight="1"
-                       android:paddingRight="30dp"
-            android:src="@drawable/sym_keyboard_return_holo"
-            android:contentDescription="@string/keyboardview_keycode_enter"
-            />
-    </LinearLayout>
-
     <include layout="@layout/keyguard_emergency_carrier_area"
                    android:id="@+id/keyguard_selector_fade_container"
                    android:layout_width="match_parent"
index 36e1b15..fbfb7cf 100644 (file)
         android:layout_height="wrap_content"
         />
     <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="0dp"
-        android:orientation="horizontal"
-        android:layout_weight="1"
-        >
-        <TextView android:id="@+id/pinEntry"
-            android:editable="true"
-            android:layout_width="0dip"
-            android:layout_height="match_parent"
-            android:layout_weight="1"
-            android:gravity="center"
-            android:layout_marginStart="@*android:dimen/keyguard_lockscreen_pin_margin_left"
-            android:singleLine="true"
-            android:cursorVisible="false"
-            android:background="@null"
-            android:textAppearance="@style/TextAppearance.NumPadKey"
-            android:imeOptions="flagForceAscii|actionDone"
-            />
-        <ImageButton android:id="@+id/delete_button"
-            android:layout_width="wrap_content"
-            android:layout_height="match_parent"
-            android:gravity="center_vertical"
-            android:src="@*android:drawable/ic_input_delete"
-            android:clickable="true"
-            android:paddingTop="8dip"
-            android:paddingBottom="8dip"
-            android:paddingLeft="24dp"
-            android:paddingRight="24dp"
-            android:background="?android:attr/selectableItemBackground"
-            android:contentDescription="@string/keyboardview_keycode_delete"
-            />
-    </LinearLayout>
-    <View
-        android:layout_width="wrap_content"
-        android:layout_height="1dp"
-        android:background="#55FFFFFF"
-        />
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="0dp"
-        android:layout_weight="1"
-        android:orientation="horizontal"
-        >
-        <view class="com.android.internal.policy.impl.keyguard.NumPadKey"
-            android:id="@+id/key1"
-            style="@style/Widget.Button.NumPadKey"
-            android:layout_width="0px"
-            android:layout_height="match_parent"
-            android:layout_weight="1"
-            androidprv:textView="@+id/pinEntry"
-            androidprv:digit="1"
-            />
-        <view class="com.android.internal.policy.impl.keyguard.NumPadKey"
-            android:id="@+id/key2"
-            style="@style/Widget.Button.NumPadKey"
-            android:layout_width="0px"
-            android:layout_height="match_parent"
-            android:layout_weight="1"
-            androidprv:textView="@+id/pinEntry"
-            androidprv:digit="2"
-            />
-        <view class="com.android.internal.policy.impl.keyguard.NumPadKey"
-            android:id="@+id/key3"
-            style="@style/Widget.Button.NumPadKey"
-            android:layout_width="0px"
-            android:layout_height="match_parent"
-            android:layout_weight="1"
-            androidprv:textView="@+id/pinEntry"
-            androidprv:digit="3"
-            />
-    </LinearLayout>
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="0dp"
-        android:layout_weight="1"
-        android:orientation="horizontal"
-        >
-        <view class="com.android.internal.policy.impl.keyguard.NumPadKey"
-            android:id="@+id/key4"
-            style="@style/Widget.Button.NumPadKey"
-            android:layout_width="0px"
-            android:layout_height="match_parent"
-            android:layout_weight="1"
-            androidprv:textView="@+id/pinEntry"
-            androidprv:digit="4"
-            />
-        <view class="com.android.internal.policy.impl.keyguard.NumPadKey"
-            android:id="@+id/key5"
-            style="@style/Widget.Button.NumPadKey"
-            android:layout_width="0px"
-            android:layout_height="match_parent"
-            android:layout_weight="1"
-            androidprv:textView="@+id/pinEntry"
-            androidprv:digit="5"
-            />
-        <view class="com.android.internal.policy.impl.keyguard.NumPadKey"
-            android:id="@+id/key6"
-            style="@style/Widget.Button.NumPadKey"
-            android:layout_width="0px"
-            android:layout_height="match_parent"
-            android:layout_weight="1"
-            androidprv:textView="@+id/pinEntry"
-            androidprv:digit="6"
-            />
-    </LinearLayout>
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="0dp"
-        android:orientation="horizontal"
-        android:layout_weight="1"
-        >
-        <view class="com.android.internal.policy.impl.keyguard.NumPadKey"
-            android:id="@+id/key7"
-            style="@style/Widget.Button.NumPadKey"
-            android:layout_width="0px"
-            android:layout_height="match_parent"
-            android:layout_weight="1"
-            androidprv:textView="@+id/pinEntry"
-            androidprv:digit="7"
-            />
-        <view class="com.android.internal.policy.impl.keyguard.NumPadKey"
-            android:id="@+id/key8"
-            style="@style/Widget.Button.NumPadKey"
-            android:layout_width="0px"
-            android:layout_height="match_parent"
-            android:layout_weight="1"
-            androidprv:textView="@+id/pinEntry"
-            androidprv:digit="8"
-            />
-        <view class="com.android.internal.policy.impl.keyguard.NumPadKey"
-            android:id="@+id/key9"
-            style="@style/Widget.Button.NumPadKey"
-            android:layout_width="0px"
-            android:layout_height="match_parent"
-            android:layout_weight="1"
-            androidprv:textView="@+id/pinEntry"
-            androidprv:digit="9"
-            />
-    </LinearLayout>
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="0dp"
-        android:layout_weight="1"
-        android:orientation="horizontal"
-        >
-        <Space
-            android:layout_width="0px"
-            android:layout_height="match_parent"
-            android:layout_weight="1"
-            />
-        <view class="com.android.internal.policy.impl.keyguard.NumPadKey"
-            android:id="@+id/key0"
-            style="@style/Widget.Button.NumPadKey"
-            android:layout_width="0px"
-            android:layout_height="match_parent"
-            android:layout_weight="1"
-            androidprv:textView="@+id/pinEntry"
-            androidprv:digit="0"
-            />
-        <ImageButton
-            android:id="@+id/key_enter"
-            style="@style/Widget.Button.NumPadKey"
-            android:layout_width="0px"
-            android:layout_height="match_parent"
-            android:layout_weight="1"
-                       android:paddingRight="30dp"
-            android:src="@drawable/sym_keyboard_return_holo"
-            android:contentDescription="@string/keyboardview_keycode_enter"
-            />
+       android:id="@+id/keyguard_bouncer_frame"
+       android:background="@*android:drawable/kg_bouncer_bg_white"
+       android:layout_width="match_parent"
+       android:layout_height="0dp"
+       android:orientation="vertical"
+       android:layout_weight="1"
+       >
+       <LinearLayout
+           android:layout_width="match_parent"
+           android:layout_height="0dp"
+           android:orientation="horizontal"
+           android:layout_weight="1"
+           >
+           <TextView android:id="@+id/pinEntry"
+               android:editable="true"
+               android:layout_width="0dip"
+               android:layout_height="match_parent"
+               android:layout_weight="1"
+               android:gravity="center"
+               android:layout_marginStart="@*android:dimen/keyguard_lockscreen_pin_margin_left"
+               android:singleLine="true"
+               android:cursorVisible="false"
+               android:background="@null"
+               android:textAppearance="@style/TextAppearance.NumPadKey"
+               android:imeOptions="flagForceAscii|actionDone"
+               />
+           <ImageButton android:id="@+id/delete_button"
+               android:layout_width="wrap_content"
+               android:layout_height="match_parent"
+               android:gravity="center_vertical"
+               android:src="@*android:drawable/ic_input_delete"
+               android:clickable="true"
+               android:paddingTop="8dip"
+               android:paddingBottom="8dip"
+               android:paddingLeft="24dp"
+               android:paddingRight="24dp"
+               android:background="?android:attr/selectableItemBackground"
+               android:contentDescription="@string/keyboardview_keycode_delete"
+               />
+       </LinearLayout>
+       <View
+           android:layout_width="wrap_content"
+           android:layout_height="1dp"
+           android:background="#55FFFFFF"
+           />
+       <LinearLayout
+           android:layout_width="match_parent"
+           android:layout_height="0dp"
+           android:layout_weight="1"
+           android:orientation="horizontal"
+           >
+           <view class="com.android.internal.policy.impl.keyguard.NumPadKey"
+               android:id="@+id/key1"
+               style="@style/Widget.Button.NumPadKey"
+               android:layout_width="0px"
+               android:layout_height="match_parent"
+               android:layout_weight="1"
+               androidprv:textView="@+id/pinEntry"
+               androidprv:digit="1"
+               />
+           <view class="com.android.internal.policy.impl.keyguard.NumPadKey"
+               android:id="@+id/key2"
+               style="@style/Widget.Button.NumPadKey"
+               android:layout_width="0px"
+               android:layout_height="match_parent"
+               android:layout_weight="1"
+               androidprv:textView="@+id/pinEntry"
+               androidprv:digit="2"
+               />
+           <view class="com.android.internal.policy.impl.keyguard.NumPadKey"
+               android:id="@+id/key3"
+               style="@style/Widget.Button.NumPadKey"
+               android:layout_width="0px"
+               android:layout_height="match_parent"
+               android:layout_weight="1"
+               androidprv:textView="@+id/pinEntry"
+               androidprv:digit="3"
+               />
+       </LinearLayout>
+       <LinearLayout
+           android:layout_width="match_parent"
+           android:layout_height="0dp"
+           android:layout_weight="1"
+           android:orientation="horizontal"
+           >
+           <view class="com.android.internal.policy.impl.keyguard.NumPadKey"
+               android:id="@+id/key4"
+               style="@style/Widget.Button.NumPadKey"
+               android:layout_width="0px"
+               android:layout_height="match_parent"
+               android:layout_weight="1"
+               androidprv:textView="@+id/pinEntry"
+               androidprv:digit="4"
+               />
+           <view class="com.android.internal.policy.impl.keyguard.NumPadKey"
+               android:id="@+id/key5"
+               style="@style/Widget.Button.NumPadKey"
+               android:layout_width="0px"
+               android:layout_height="match_parent"
+               android:layout_weight="1"
+               androidprv:textView="@+id/pinEntry"
+               androidprv:digit="5"
+               />
+           <view class="com.android.internal.policy.impl.keyguard.NumPadKey"
+               android:id="@+id/key6"
+               style="@style/Widget.Button.NumPadKey"
+               android:layout_width="0px"
+               android:layout_height="match_parent"
+               android:layout_weight="1"
+               androidprv:textView="@+id/pinEntry"
+               androidprv:digit="6"
+               />
+       </LinearLayout>
+       <LinearLayout
+           android:layout_width="match_parent"
+           android:layout_height="0dp"
+           android:orientation="horizontal"
+           android:layout_weight="1"
+           >
+           <view class="com.android.internal.policy.impl.keyguard.NumPadKey"
+               android:id="@+id/key7"
+               style="@style/Widget.Button.NumPadKey"
+               android:layout_width="0px"
+               android:layout_height="match_parent"
+               android:layout_weight="1"
+               androidprv:textView="@+id/pinEntry"
+               androidprv:digit="7"
+               />
+           <view class="com.android.internal.policy.impl.keyguard.NumPadKey"
+               android:id="@+id/key8"
+               style="@style/Widget.Button.NumPadKey"
+               android:layout_width="0px"
+               android:layout_height="match_parent"
+               android:layout_weight="1"
+               androidprv:textView="@+id/pinEntry"
+               androidprv:digit="8"
+               />
+           <view class="com.android.internal.policy.impl.keyguard.NumPadKey"
+               android:id="@+id/key9"
+               style="@style/Widget.Button.NumPadKey"
+               android:layout_width="0px"
+               android:layout_height="match_parent"
+               android:layout_weight="1"
+               androidprv:textView="@+id/pinEntry"
+               androidprv:digit="9"
+               />
+       </LinearLayout>
+       <LinearLayout
+           android:layout_width="match_parent"
+           android:layout_height="0dp"
+           android:layout_weight="1"
+           android:orientation="horizontal"
+           >
+           <Space
+               android:layout_width="0px"
+               android:layout_height="match_parent"
+               android:layout_weight="1"
+               />
+           <view class="com.android.internal.policy.impl.keyguard.NumPadKey"
+               android:id="@+id/key0"
+               style="@style/Widget.Button.NumPadKey"
+               android:layout_width="0px"
+               android:layout_height="match_parent"
+               android:layout_weight="1"
+               androidprv:textView="@+id/pinEntry"
+               androidprv:digit="0"
+               />
+           <ImageButton
+               android:id="@+id/key_enter"
+               style="@style/Widget.Button.NumPadKey"
+               android:layout_width="0px"
+               android:layout_height="match_parent"
+               android:layout_weight="1"
+               android:paddingRight="30dp"
+               android:src="@drawable/sym_keyboard_return_holo"
+               android:contentDescription="@string/keyboardview_keycode_enter"
+               />
+       </LinearLayout>
     </LinearLayout>
 
     <include layout="@layout/keyguard_emergency_carrier_area"
index e846a7b..10b86b8 100644 (file)
         android:layout_height="wrap_content"
         />
     <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="0dp"
-        android:orientation="horizontal"
-        android:layout_weight="1"
-        >
-        <TextView android:id="@+id/pinEntry"
-            android:editable="true"
-            android:layout_width="0dip"
-            android:layout_height="match_parent"
-            android:layout_weight="1"
-            android:gravity="center"
-            android:layout_marginStart="@*android:dimen/keyguard_lockscreen_pin_margin_left"
-            android:singleLine="true"
-            android:cursorVisible="false"
-            android:background="@null"
-            android:textAppearance="@style/TextAppearance.NumPadKey"
-            android:imeOptions="flagForceAscii|actionDone"
-            />
-        <ImageButton android:id="@+id/delete_button"
-            android:layout_width="wrap_content"
-            android:layout_height="match_parent"
-            android:gravity="center_vertical"
-            android:src="@*android:drawable/ic_input_delete"
-            android:clickable="true"
-            android:paddingTop="8dip"
-            android:paddingBottom="8dip"
-            android:paddingLeft="24dp"
-            android:paddingRight="24dp"
-            android:background="?android:attr/selectableItemBackground"
-            android:contentDescription="@string/keyboardview_keycode_delete"
-            />
-    </LinearLayout>
-    <View
-        android:layout_width="wrap_content"
-        android:layout_height="1dp"
-        android:background="#55FFFFFF"
-        />
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="0dp"
-        android:layout_weight="1"
-        android:orientation="horizontal"
-        >
-        <view class="com.android.internal.policy.impl.keyguard.NumPadKey"
-            android:id="@+id/key1"
-            style="@style/Widget.Button.NumPadKey"
-            android:layout_width="0px"
-            android:layout_height="match_parent"
-            android:layout_weight="1"
-            androidprv:textView="@+id/pinEntry"
-            androidprv:digit="1"
-            />
-        <view class="com.android.internal.policy.impl.keyguard.NumPadKey"
-            android:id="@+id/key2"
-            style="@style/Widget.Button.NumPadKey"
-            android:layout_width="0px"
-            android:layout_height="match_parent"
-            android:layout_weight="1"
-            androidprv:textView="@+id/pinEntry"
-            androidprv:digit="2"
-            />
-        <view class="com.android.internal.policy.impl.keyguard.NumPadKey"
-            android:id="@+id/key3"
-            style="@style/Widget.Button.NumPadKey"
-            android:layout_width="0px"
-            android:layout_height="match_parent"
-            android:layout_weight="1"
-            androidprv:textView="@+id/pinEntry"
-            androidprv:digit="3"
-            />
-    </LinearLayout>
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="0dp"
-        android:layout_weight="1"
-        android:orientation="horizontal"
-        >
-        <view class="com.android.internal.policy.impl.keyguard.NumPadKey"
-            android:id="@+id/key4"
-            style="@style/Widget.Button.NumPadKey"
-            android:layout_width="0px"
-            android:layout_height="match_parent"
-            android:layout_weight="1"
-            androidprv:textView="@+id/pinEntry"
-            androidprv:digit="4"
-            />
-        <view class="com.android.internal.policy.impl.keyguard.NumPadKey"
-            android:id="@+id/key5"
-            style="@style/Widget.Button.NumPadKey"
-            android:layout_width="0px"
-            android:layout_height="match_parent"
-            android:layout_weight="1"
-            androidprv:textView="@+id/pinEntry"
-            androidprv:digit="5"
-            />
-        <view class="com.android.internal.policy.impl.keyguard.NumPadKey"
-            android:id="@+id/key6"
-            style="@style/Widget.Button.NumPadKey"
-            android:layout_width="0px"
-            android:layout_height="match_parent"
-            android:layout_weight="1"
-            androidprv:textView="@+id/pinEntry"
-            androidprv:digit="6"
-            />
-    </LinearLayout>
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="0dp"
-        android:orientation="horizontal"
-        android:layout_weight="1"
-        >
-        <view class="com.android.internal.policy.impl.keyguard.NumPadKey"
-            android:id="@+id/key7"
-            style="@style/Widget.Button.NumPadKey"
-            android:layout_width="0px"
-            android:layout_height="match_parent"
-            android:layout_weight="1"
-            androidprv:textView="@+id/pinEntry"
-            androidprv:digit="7"
-            />
-        <view class="com.android.internal.policy.impl.keyguard.NumPadKey"
-            android:id="@+id/key8"
-            style="@style/Widget.Button.NumPadKey"
-            android:layout_width="0px"
-            android:layout_height="match_parent"
-            android:layout_weight="1"
-            androidprv:textView="@+id/pinEntry"
-            androidprv:digit="8"
-            />
-        <view class="com.android.internal.policy.impl.keyguard.NumPadKey"
-            android:id="@+id/key9"
-            style="@style/Widget.Button.NumPadKey"
-            android:layout_width="0px"
-            android:layout_height="match_parent"
-            android:layout_weight="1"
-            androidprv:textView="@+id/pinEntry"
-            androidprv:digit="9"
-            />
-    </LinearLayout>
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="0dp"
-        android:layout_weight="1"
-        android:orientation="horizontal"
-        >
-        <Space
-            android:layout_width="0px"
-            android:layout_height="match_parent"
-            android:layout_weight="1"
-            />
-        <view class="com.android.internal.policy.impl.keyguard.NumPadKey"
-            android:id="@+id/key0"
-            style="@style/Widget.Button.NumPadKey"
-            android:layout_width="0px"
-            android:layout_height="match_parent"
-            android:layout_weight="1"
-            androidprv:textView="@+id/pinEntry"
-            androidprv:digit="0"
-            />
-        <ImageButton
-            android:id="@+id/key_enter"
-            style="@style/Widget.Button.NumPadKey"
-            android:layout_width="0px"
-            android:layout_height="match_parent"
-            android:layout_weight="1"
-                       android:paddingRight="30dp"
-            android:src="@drawable/sym_keyboard_return_holo"
-            android:contentDescription="@string/keyboardview_keycode_enter"
-            />
+       android:id="@+id/keyguard_bouncer_frame"
+       android:background="@*android:drawable/kg_bouncer_bg_white"
+       android:layout_width="match_parent"
+       android:layout_height="0dp"
+       android:orientation="vertical"
+       android:layout_weight="1"
+       >
+       <LinearLayout
+           android:layout_width="match_parent"
+           android:layout_height="0dp"
+           android:orientation="horizontal"
+           android:layout_weight="1"
+           >
+           <TextView android:id="@+id/pinEntry"
+               android:editable="true"
+               android:layout_width="0dip"
+               android:layout_height="match_parent"
+               android:layout_weight="1"
+               android:gravity="center"
+               android:layout_marginStart="@*android:dimen/keyguard_lockscreen_pin_margin_left"
+               android:singleLine="true"
+               android:cursorVisible="false"
+               android:background="@null"
+               android:textAppearance="@style/TextAppearance.NumPadKey"
+               android:imeOptions="flagForceAscii|actionDone"
+               />
+           <ImageButton android:id="@+id/delete_button"
+               android:layout_width="wrap_content"
+               android:layout_height="match_parent"
+               android:gravity="center_vertical"
+               android:src="@*android:drawable/ic_input_delete"
+               android:clickable="true"
+               android:paddingTop="8dip"
+               android:paddingBottom="8dip"
+               android:paddingLeft="24dp"
+               android:paddingRight="24dp"
+               android:background="?android:attr/selectableItemBackground"
+               android:contentDescription="@string/keyboardview_keycode_delete"
+               />
+       </LinearLayout>
+       <View
+           android:layout_width="wrap_content"
+           android:layout_height="1dp"
+           android:background="#55FFFFFF"
+           />
+       <LinearLayout
+           android:layout_width="match_parent"
+           android:layout_height="0dp"
+           android:layout_weight="1"
+           android:orientation="horizontal"
+           >
+           <view class="com.android.internal.policy.impl.keyguard.NumPadKey"
+               android:id="@+id/key1"
+               style="@style/Widget.Button.NumPadKey"
+               android:layout_width="0px"
+               android:layout_height="match_parent"
+               android:layout_weight="1"
+               androidprv:textView="@+id/pinEntry"
+               androidprv:digit="1"
+               />
+           <view class="com.android.internal.policy.impl.keyguard.NumPadKey"
+               android:id="@+id/key2"
+               style="@style/Widget.Button.NumPadKey"
+               android:layout_width="0px"
+               android:layout_height="match_parent"
+               android:layout_weight="1"
+               androidprv:textView="@+id/pinEntry"
+               androidprv:digit="2"
+               />
+           <view class="com.android.internal.policy.impl.keyguard.NumPadKey"
+               android:id="@+id/key3"
+               style="@style/Widget.Button.NumPadKey"
+               android:layout_width="0px"
+               android:layout_height="match_parent"
+               android:layout_weight="1"
+               androidprv:textView="@+id/pinEntry"
+               androidprv:digit="3"
+               />
+       </LinearLayout>
+       <LinearLayout
+           android:layout_width="match_parent"
+           android:layout_height="0dp"
+           android:layout_weight="1"
+           android:orientation="horizontal"
+           >
+           <view class="com.android.internal.policy.impl.keyguard.NumPadKey"
+               android:id="@+id/key4"
+               style="@style/Widget.Button.NumPadKey"
+               android:layout_width="0px"
+               android:layout_height="match_parent"
+               android:layout_weight="1"
+               androidprv:textView="@+id/pinEntry"
+               androidprv:digit="4"
+               />
+           <view class="com.android.internal.policy.impl.keyguard.NumPadKey"
+               android:id="@+id/key5"
+               style="@style/Widget.Button.NumPadKey"
+               android:layout_width="0px"
+               android:layout_height="match_parent"
+               android:layout_weight="1"
+               androidprv:textView="@+id/pinEntry"
+               androidprv:digit="5"
+               />
+           <view class="com.android.internal.policy.impl.keyguard.NumPadKey"
+               android:id="@+id/key6"
+               style="@style/Widget.Button.NumPadKey"
+               android:layout_width="0px"
+               android:layout_height="match_parent"
+               android:layout_weight="1"
+               androidprv:textView="@+id/pinEntry"
+               androidprv:digit="6"
+               />
+       </LinearLayout>
+       <LinearLayout
+           android:layout_width="match_parent"
+           android:layout_height="0dp"
+           android:orientation="horizontal"
+           android:layout_weight="1"
+           >
+           <view class="com.android.internal.policy.impl.keyguard.NumPadKey"
+               android:id="@+id/key7"
+               style="@style/Widget.Button.NumPadKey"
+               android:layout_width="0px"
+               android:layout_height="match_parent"
+               android:layout_weight="1"
+               androidprv:textView="@+id/pinEntry"
+               androidprv:digit="7"
+               />
+           <view class="com.android.internal.policy.impl.keyguard.NumPadKey"
+               android:id="@+id/key8"
+               style="@style/Widget.Button.NumPadKey"
+               android:layout_width="0px"
+               android:layout_height="match_parent"
+               android:layout_weight="1"
+               androidprv:textView="@+id/pinEntry"
+               androidprv:digit="8"
+               />
+           <view class="com.android.internal.policy.impl.keyguard.NumPadKey"
+               android:id="@+id/key9"
+               style="@style/Widget.Button.NumPadKey"
+               android:layout_width="0px"
+               android:layout_height="match_parent"
+               android:layout_weight="1"
+               androidprv:textView="@+id/pinEntry"
+               androidprv:digit="9"
+               />
+       </LinearLayout>
+       <LinearLayout
+           android:layout_width="match_parent"
+           android:layout_height="0dp"
+           android:layout_weight="1"
+           android:orientation="horizontal"
+           >
+           <Space
+               android:layout_width="0px"
+               android:layout_height="match_parent"
+               android:layout_weight="1"
+               />
+           <view class="com.android.internal.policy.impl.keyguard.NumPadKey"
+               android:id="@+id/key0"
+               style="@style/Widget.Button.NumPadKey"
+               android:layout_width="0px"
+               android:layout_height="match_parent"
+               android:layout_weight="1"
+               androidprv:textView="@+id/pinEntry"
+               androidprv:digit="0"
+               />
+           <ImageButton
+               android:id="@+id/key_enter"
+               style="@style/Widget.Button.NumPadKey"
+               android:layout_width="0px"
+               android:layout_height="match_parent"
+               android:layout_weight="1"
+               android:paddingRight="30dp"
+               android:src="@drawable/sym_keyboard_return_holo"
+               android:contentDescription="@string/keyboardview_keycode_enter"
+               />
+       </LinearLayout>
     </LinearLayout>
 
     <include layout="@layout/keyguard_emergency_carrier_area"
index a12c14c..dfa2b4a 100644 (file)
   <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" />
index 71526d2..7c769a7 100644 (file)
@@ -18,6 +18,7 @@ package com.android.internal.policy.impl.keyguard;
 
 import android.content.Context;
 import android.graphics.Rect;
+import android.graphics.drawable.Drawable;
 import android.os.CountDownTimer;
 import android.os.SystemClock;
 import android.text.Editable;
@@ -43,6 +44,8 @@ public abstract class KeyguardAbsKeyInputView extends LinearLayout
     protected TextView mPasswordEntry;
     protected LockPatternUtils mLockPatternUtils;
     protected SecurityMessageDisplay mSecurityMessageDisplay;
+    protected View mEcaView;
+    private Drawable mBouncerFrame;
     protected boolean mEnableHaptics;
 
     // To avoid accidental lockout due to events while the device in in the pocket, ignore
@@ -122,6 +125,11 @@ public abstract class KeyguardAbsKeyInputView extends LinearLayout
             }
         });
         mSecurityMessageDisplay = new KeyguardMessageArea.Helper(this);
+        mEcaView = findViewById(R.id.keyguard_selector_fade_container);
+        View bouncerFrameView = findViewById(R.id.keyguard_bouncer_frame);
+        if (bouncerFrameView != null) {
+            mBouncerFrame = bouncerFrameView.getBackground();
+        }
     }
 
     @Override
@@ -239,5 +247,17 @@ public abstract class KeyguardAbsKeyInputView extends LinearLayout
                     | HapticFeedbackConstants.FLAG_IGNORE_GLOBAL_SETTING);
         }
     }
+
+    @Override
+    public void showBouncer(int duration) {
+        KeyguardSecurityViewHelper.
+                showBouncer(mSecurityMessageDisplay, mEcaView, mBouncerFrame, duration);
+    }
+
+    @Override
+    public void hideBouncer(int duration) {
+        KeyguardSecurityViewHelper.
+                hideBouncer(mSecurityMessageDisplay, mEcaView, mBouncerFrame, duration);
+    }
 }
 
index 9c87755..3ce61d9 100644 (file)
@@ -318,5 +318,13 @@ public class KeyguardAccountView extends LinearLayout implements KeyguardSecurit
     @Override
     public void showUsabilityHint() {
     }
+
+    @Override
+    public void showBouncer(int duration) {
+    }
+
+    @Override
+    public void hideBouncer(int duration) {
+    }
 }
 
index c0095de..8ca6d2a 100644 (file)
@@ -16,6 +16,7 @@
 package com.android.internal.policy.impl.keyguard;
 
 import android.content.Context;
+import android.graphics.drawable.Drawable;
 import android.os.PowerManager;
 import android.telephony.TelephonyManager;
 import android.util.AttributeSet;
@@ -37,6 +38,9 @@ public class KeyguardFaceUnlockView extends LinearLayout implements KeyguardSecu
     private BiometricSensorUnlock mBiometricUnlock;
     private View mFaceUnlockAreaView;
     private ImageButton mCancelButton;
+    private SecurityMessageDisplay mSecurityMessageDisplay;
+    private View mEcaView;
+    private Drawable mBouncerFrame;
 
     private boolean mIsShowing = false;
     private final Object mIsShowingLock = new Object();
@@ -54,6 +58,13 @@ public class KeyguardFaceUnlockView extends LinearLayout implements KeyguardSecu
         super.onFinishInflate();
 
         initializeBiometricUnlockView();
+
+        mSecurityMessageDisplay = new KeyguardMessageArea.Helper(this);
+        mEcaView = findViewById(R.id.keyguard_selector_fade_container);
+        View bouncerFrameView = findViewById(R.id.keyguard_bouncer_frame);
+        if (bouncerFrameView != null) {
+            mBouncerFrame = bouncerFrameView.getBackground();
+        }
     }
 
     @Override
@@ -217,4 +228,17 @@ public class KeyguardFaceUnlockView extends LinearLayout implements KeyguardSecu
     @Override
     public void showUsabilityHint() {
     }
+
+    @Override
+    public void showBouncer(int duration) {
+        KeyguardSecurityViewHelper.
+                showBouncer(mSecurityMessageDisplay, mEcaView, mBouncerFrame, duration);
+    }
+
+    @Override
+    public void hideBouncer(int duration) {
+        KeyguardSecurityViewHelper.
+                hideBouncer(mSecurityMessageDisplay, mEcaView, mBouncerFrame, duration);
+    }
+
 }
index 3a901c8..f8edd5d 100644 (file)
@@ -196,6 +196,11 @@ public class KeyguardHostView extends KeyguardViewBase {
             KeyguardSecurityView ksv = (KeyguardSecurityView) view;
             ksv.setKeyguardCallback(mCallback);
             ksv.setLockPatternUtils(mLockPatternUtils);
+            if (mViewStateManager.isBouncing()) {
+                ksv.showBouncer(0);
+            } else {
+                ksv.hideBouncer(0);
+            }
         } else {
             Log.w(TAG, "View " + view + " is not a KeyguardSecurityView");
         }
index f6f3fab..ee5c4a6 100644 (file)
@@ -240,22 +240,33 @@ class KeyguardMessageArea extends TextView {
     }
 
     private void hideMessage(int duration, boolean thenUpdate) {
-        Animator anim = ObjectAnimator.ofFloat(this, "alpha", 0f);
-        anim.setDuration(duration);
-        if (thenUpdate) {
-            anim.addListener(new AnimatorListenerAdapter() {
-                    @Override
-                        public void onAnimationEnd(Animator animation) {
-                        update();
-                    }
+        if (duration > 0) {
+            Animator anim = ObjectAnimator.ofFloat(this, "alpha", 0f);
+            anim.setDuration(duration);
+            if (thenUpdate) {
+                anim.addListener(new AnimatorListenerAdapter() {
+                        @Override
+                            public void onAnimationEnd(Animator animation) {
+                            update();
+                        }
                 });
+            }
+            anim.start();
+        } else {
+            setAlpha(0f);
+            if (thenUpdate) {
+                update();
+            }
         }
-        anim.start();
     }
 
     private void showMessage(int duration) {
-        Animator anim = ObjectAnimator.ofFloat(this, "alpha", 1f);
-        anim.setDuration(duration);
-        anim.start();
+        if (duration > 0) {
+            Animator anim = ObjectAnimator.ofFloat(this, "alpha", 1f);
+            anim.setDuration(duration);
+            anim.start();
+        } else {
+            setAlpha(1f);
+        }
     }
 }
index 82cb44b..3a82687 100644 (file)
@@ -23,6 +23,7 @@ import android.accounts.AuthenticatorException;
 import android.accounts.OperationCanceledException;
 import android.content.Context;
 import android.graphics.Rect;
+import android.graphics.drawable.Drawable;
 import android.os.Bundle;
 import android.os.CountDownTimer;
 import android.os.SystemClock;
@@ -84,6 +85,8 @@ public class KeyguardPatternView extends LinearLayout implements KeyguardSecurit
     };
     private Rect mTempRect = new Rect();
     private SecurityMessageDisplay mSecurityMessageDisplay;
+    private View mEcaView;
+    private Drawable mBouncerFrame;
 
     enum FooterMode {
         Normal,
@@ -136,6 +139,11 @@ public class KeyguardPatternView extends LinearLayout implements KeyguardSecurit
 
         maybeEnableFallback(mContext);
         mSecurityMessageDisplay = new KeyguardMessageArea.Helper(this);
+        mEcaView = findViewById(R.id.keyguard_selector_fade_container);
+        View bouncerFrameView = findViewById(R.id.keyguard_bouncer_frame);
+        if (bouncerFrameView != null) {
+            mBouncerFrame = bouncerFrameView.getBackground();
+        }
     }
 
     private void updateFooter(FooterMode mode) {
@@ -381,7 +389,16 @@ public class KeyguardPatternView extends LinearLayout implements KeyguardSecurit
     public KeyguardSecurityCallback getCallback() {
         return mCallback;
     }
-}
-
 
+    @Override
+    public void showBouncer(int duration) {
+        KeyguardSecurityViewHelper.
+                showBouncer(mSecurityMessageDisplay, mEcaView, mBouncerFrame, duration);
+    }
 
+    @Override
+    public void hideBouncer(int duration) {
+        KeyguardSecurityViewHelper.
+                hideBouncer(mSecurityMessageDisplay, mEcaView, mBouncerFrame, duration);
+    }
+}
index 7b11507..375a96a 100644 (file)
@@ -1,11 +1,6 @@
 package com.android.internal.policy.impl.keyguard;
 
-import android.animation.Animator;
-import android.animation.AnimatorSet;
-import android.animation.ObjectAnimator;
 import android.content.Context;
-import android.graphics.Canvas;
-import android.graphics.drawable.Drawable;
 import android.util.AttributeSet;
 import android.view.View;
 import android.widget.FrameLayout;
@@ -13,10 +8,6 @@ import android.widget.FrameLayout;
 import com.android.internal.R;
 
 public class KeyguardSecurityContainer extends FrameLayout {
-
-    private float mBackgroundAlpha;
-    private Drawable mBackgroundDrawable;
-
     public KeyguardSecurityContainer(Context context, AttributeSet attrs) {
         this(context, attrs, 0);
     }
@@ -27,68 +18,30 @@ public class KeyguardSecurityContainer extends FrameLayout {
 
     public KeyguardSecurityContainer(Context context, AttributeSet attrs, int defStyle) {
         super(context, attrs, defStyle);
-        mBackgroundDrawable = context.getResources().getDrawable(R.drawable.kg_bouncer_bg_white);
-    }
-
-    public void setBackgroundAlpha(float alpha) {
-        if (Float.compare(mBackgroundAlpha, alpha) != 0) {
-            mBackgroundAlpha = alpha;
-            invalidate();
-        }
-    }
-
-    public float getBackgroundAlpha() {
-        return mBackgroundAlpha;
-    }
-
-    @Override
-    protected void dispatchDraw(Canvas canvas) {
-        if (mBackgroundAlpha > 0.0f && mBackgroundDrawable != null) {
-            Drawable bg = mBackgroundDrawable;
-            bg.setAlpha((int) (mBackgroundAlpha * 255));
-            bg.setBounds(0, 0, getMeasuredWidth(), getMeasuredHeight());
-            bg.draw(canvas);
-        }
-        super.dispatchDraw(canvas);
     }
 
-    public void showBouncer(int duration) {
-        SecurityMessageDisplay message = new KeyguardMessageArea.Helper(getSecurityView());
-        message.showBouncer(duration);
-        AnimatorSet anim = new AnimatorSet();
-        anim.playTogether(ObjectAnimator.ofFloat(this, "backgroundAlpha", 1f), getEcaAnim(0f));
-        anim.setDuration(duration);
-        anim.start();
-    }
-
-    public void hideBouncer(int duration) {
-        SecurityMessageDisplay message = new KeyguardMessageArea.Helper(getSecurityView());
-        message.hideBouncer(duration);
-        AnimatorSet anim = new AnimatorSet();
-        anim.playTogether(ObjectAnimator.ofFloat(this, "backgroundAlpha", 0f), getEcaAnim(1f));
-        anim.setDuration(duration);
-        anim.start();
-    }
-
-    View getSecurityView() {
+    KeyguardSecurityViewFlipper getFlipper() {
         for (int i = 0; i < getChildCount(); i++) {
             View child = getChildAt(i);
             if (child instanceof KeyguardSecurityViewFlipper) {
-                return (View) (((KeyguardSecurityViewFlipper) child).getSecurityView());
+                return (KeyguardSecurityViewFlipper) child;
             }
         }
         return null;
     }
 
-    Animator getEcaAnim(float alpha) {
-        Animator anim = null;
-        View securityView = getSecurityView();
-        if (securityView != null) {
-            View ecaView = securityView.findViewById(R.id.keyguard_selector_fade_container);
-            if (ecaView != null) {
-                anim = ObjectAnimator.ofFloat(ecaView, "alpha", alpha);
-            }
+    public void showBouncer(int duration) {
+        KeyguardSecurityViewFlipper flipper = getFlipper();
+        if (flipper != null) {
+            flipper.showBouncer(duration);
+        }
+    }
+
+    public void hideBouncer(int duration) {
+        KeyguardSecurityViewFlipper flipper = getFlipper();
+        if (flipper != null) {
+            flipper.hideBouncer(duration);
         }
-        return anim;
     }
 }
+
index 2651743..027b16e 100644 (file)
@@ -66,4 +66,18 @@ public interface KeyguardSecurityView {
      *
      */
     void showUsabilityHint();
+
+    /**
+     * Place the security view into bouncer mode.
+     * Animate transisiton if duration is non-zero.
+     * @param duration millisends for the transisiton animation.
+     */
+    void showBouncer(int duration);
+
+    /**
+     * Place the security view into non-bouncer mode.
+     * Animate transisiton if duration is non-zero.
+     * @param duration millisends for the transisiton animation.
+     */
+    void hideBouncer(int duration);
 }
index 58cf567..3d4cb19 100644 (file)
@@ -125,4 +125,26 @@ public class KeyguardSecurityViewFlipper extends ViewFlipper implements Keyguard
             ksv.showUsabilityHint();
         }
     }
+
+    @Override
+    public void showBouncer(int duration) {
+        for (int i = 0; i < getChildCount(); i++) {
+            View child = getChildAt(i);
+            if (child instanceof KeyguardSecurityView) {
+                KeyguardSecurityView ksv = (KeyguardSecurityView) child;
+                ksv.showBouncer(child.getVisibility() == View.VISIBLE ? duration : 0);
+            }
+        }
+    }
+
+    @Override
+    public void hideBouncer(int duration) {
+        for (int i = 0; i < getChildCount(); i++) {
+            View child = getChildAt(i);
+            if (child instanceof KeyguardSecurityView) {
+                KeyguardSecurityView ksv = (KeyguardSecurityView) child;
+                ksv.hideBouncer(child.getVisibility() == View.VISIBLE ? duration : 0);
+            }
+        }
+    }
 }
diff --git a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardSecurityViewHelper.java b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardSecurityViewHelper.java
new file mode 100644 (file)
index 0000000..2ccdc1d
--- /dev/null
@@ -0,0 +1,78 @@
+/*
+ * 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.impl.keyguard;
+
+import android.animation.Animator;
+import android.animation.ObjectAnimator;
+import android.graphics.drawable.Drawable;
+import android.view.View;
+
+/**
+ * Some common functions that are useful for KeyguardSecurityViews.
+ */
+public class KeyguardSecurityViewHelper {
+
+    public static void showBouncer(SecurityMessageDisplay securityMessageDisplay,
+            View ecaView, Drawable bouncerFrame, int duration) {
+        if (securityMessageDisplay != null) {
+            securityMessageDisplay.showBouncer(duration);
+        }
+        if (ecaView != null) {
+            if (duration > 0) {
+                Animator anim = ObjectAnimator.ofFloat(ecaView, "alpha", 0f);
+                anim.setDuration(duration);
+                anim.start();
+            } else {
+                ecaView.setAlpha(0f);
+            }
+        }
+        if (bouncerFrame != null) {
+            if (duration > 0) {
+                Animator anim = ObjectAnimator.ofInt(bouncerFrame, "alpha", 255);
+                anim.setDuration(duration);
+                anim.start();
+            } else {
+                bouncerFrame.setAlpha(255);
+            }
+        }
+    }
+
+    public static void hideBouncer(SecurityMessageDisplay securityMessageDisplay,
+            View ecaView, Drawable bouncerFrame, int duration) {
+        if (securityMessageDisplay != null) {
+            securityMessageDisplay.hideBouncer(duration);
+        }
+        if (ecaView != null) {
+            if (duration > 0) {
+                Animator anim = ObjectAnimator.ofFloat(ecaView, "alpha", 1f);
+                anim.setDuration(duration);
+                anim.start();
+            } else {
+                ecaView.setAlpha(1f);
+            }
+        }
+        if (bouncerFrame != null) {
+            if (duration > 0) {
+                Animator anim = ObjectAnimator.ofInt(bouncerFrame, "alpha", 0);
+                anim.setDuration(duration);
+                anim.start();
+            } else {
+                bouncerFrame.setAlpha(0);
+            }
+        }
+    }
+}
index 938e3bd..365256f 100644 (file)
@@ -261,4 +261,12 @@ public class KeyguardSelectorView extends LinearLayout implements KeyguardSecuri
     public KeyguardSecurityCallback getCallback() {
         return mCallback;
     }
+
+    @Override
+    public void showBouncer(int duration) {
+    }
+
+    @Override
+    public void hideBouncer(int duration) {
+    }
 }
index 054b9b2..969b65e 100644 (file)
@@ -92,6 +92,10 @@ public class KeyguardViewStateManager implements SlidingChallengeLayout.OnChalle
         mChallengeLayout.showBouncer();
     }
 
+    public boolean isBouncing() {
+        return mChallengeLayout.isBouncing();
+    }
+
     public void fadeOutSecurity(int duration) {
         ((View) mKeyguardSecurityContainer).animate().alpha(0).setDuration(duration);
     }