Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 79b08a49 authored by Adam Powell's avatar Adam Powell Committed by Android Git Automerger
Browse files

am 2cfb9373: am 5dd8b008: Merge "add bouncer frame to glowpad." into jb-mr1-lockscreen-dev

* commit '2cfb9373':
  add bouncer frame to glowpad.
parents d7aaf3af 2cfb9373
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -43,6 +43,14 @@
            android:layout_width="match_parent"
            android:layout_height="wrap_content" />

        <View
            android:id="@+id/keyguard_selector_view_frame"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_marginLeft="16dp"
            android:layout_marginRight="16dp"
            android:background="@*android:drawable/kg_bouncer_bg_white"/>

        <include layout="@layout/keyguard_glow_pad_container" />

        <include layout="@layout/keyguard_emergency_carrier_area"
+1 −0
Original line number Diff line number Diff line
@@ -1350,6 +1350,7 @@
  <java-symbol type="id" name="multi_pane_challenge" />
  <java-symbol type="id" name="keyguard_user_selector" />
  <java-symbol type="id" name="key_enter" />
  <java-symbol type="id" name="keyguard_selector_view_frame" />
  <java-symbol type="integer" name="config_carDockRotation" />
  <java-symbol type="integer" name="config_defaultUiModeType" />
  <java-symbol type="integer" name="config_deskDockRotation" />
+17 −1
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ import android.app.admin.DevicePolicyManager;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.graphics.drawable.Drawable;
import android.os.UserHandle;
import android.provider.Settings;
import android.util.AttributeSet;
@@ -45,9 +46,12 @@ public class KeyguardSelectorView extends LinearLayout implements KeyguardSecuri
    private GlowPadView mGlowPadView;
    private ObjectAnimator mAnim;
    private View mFadeView;
    private boolean mIsBouncing;
    private boolean mCameraDisabled;
    private boolean mSearchDisabled;
    private LockPatternUtils mLockPatternUtils;
    private SecurityMessageDisplay mSecurityMessageDisplay;
    private Drawable mBouncerFrame;

    OnTriggerListener mOnTriggerListener = new OnTriggerListener() {

@@ -80,8 +84,10 @@ public class KeyguardSelectorView extends LinearLayout implements KeyguardSecuri
        }

        public void onReleased(View v, int handle) {
            if (!mIsBouncing) {
                doTransition(mFadeView, 1.0f);
            }
        }

        public void onGrabbed(View v, int handle) {
            mCallback.userActivity(0);
@@ -143,6 +149,10 @@ public class KeyguardSelectorView extends LinearLayout implements KeyguardSecuri
        mGlowPadView = (GlowPadView) findViewById(R.id.glow_pad_view);
        mGlowPadView.setOnTriggerListener(mOnTriggerListener);
        updateTargets();

        mSecurityMessageDisplay = new KeyguardMessageArea.Helper(this);
        View bouncerFrameView = findViewById(R.id.keyguard_selector_view_frame);
        mBouncerFrame = bouncerFrameView.getBackground();
    }

    public void setCarrierArea(View carrierArea) {
@@ -264,9 +274,15 @@ public class KeyguardSelectorView extends LinearLayout implements KeyguardSecuri

    @Override
    public void showBouncer(int duration) {
        mIsBouncing = true;
        KeyguardSecurityViewHelper.
                showBouncer(mSecurityMessageDisplay, mFadeView, mBouncerFrame, duration);
    }

    @Override
    public void hideBouncer(int duration) {
        mIsBouncing = false;
        KeyguardSecurityViewHelper.
                hideBouncer(mSecurityMessageDisplay, mFadeView, mBouncerFrame, duration);
    }
}
+0 −7
Original line number Diff line number Diff line
@@ -493,13 +493,6 @@ public class SlidingChallengeLayout extends ViewGroup implements ChallengeLayout
        if (mChallengeView != null) {
            mChallengeView.showBouncer(HANDLE_ANIMATE_DURATION);
        }
        // Mess with padding/margin to inset the bouncer frame.
        // We have more space available to us otherwise.
        if (mChallengeView != null) {
            final LayoutParams lp = (LayoutParams) mChallengeView.getLayoutParams();
            lp.leftMargin = lp.rightMargin = getChallengeMargin(false);
            mChallengeView.setLayoutParams(lp);
        }

        if (mBouncerListener != null) {
            mBouncerListener.onBouncerStateChanged(true);