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

Commit 0b1b5522 authored by Adam Powell's avatar Adam Powell
Browse files

Keyguard bouncer notifications; focus moving and the bouncer; slops

Integrate changes from prototype app

* Add callbacks for bouncer state changes

* Dismiss the bouncer if focus leaves the challenge area

* Increase edge swipe region, treat this as a slop for
  SlidingChallengeLayout's drag handle. (This allows edge swipes in
  the drag handle area to still page widgets instead.)

Change-Id: I732de1a8d999a34c7cc8aa8ed99e24b597f3444c
parent b3975088
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -28,6 +28,5 @@
    android:paddingBottom="25dp"
    android:clipChildren="false"
    android:clipToPadding="false"
    androidprv:pageSpacing="10dp"
    androidprv:edgeSwipeRegionSize="8dp">
    androidprv:pageSpacing="10dp">
</com.android.internal.policy.impl.keyguard.KeyguardWidgetPager>
+0 −1
Original line number Diff line number Diff line
@@ -5766,7 +5766,6 @@
        <!-- The padding for the scroll indicator area -->
        <attr name="scrollIndicatorPaddingLeft" format="dimension" />
        <attr name="scrollIndicatorPaddingRight" format="dimension" />
        <attr name="edgeSwipeRegionSize" format="dimension" />
    </declare-styleable>

    <declare-styleable name="KeyguardGlowStripView">
+4 −0
Original line number Diff line number Diff line
@@ -323,4 +323,8 @@

    <!-- Size of the text under the avator on the multiuser lockscreen. -->
    <dimen name="keyguard_avatar_name_size">10sp</dimen>

    <!-- Size of the region along the edge of the screen that will accept
         swipes to scroll the widget area. -->
    <dimen name="kg_edge_swipe_region_size">16dp</dimen>
</resources>
+1 −0
Original line number Diff line number Diff line
@@ -1214,6 +1214,7 @@
  <java-symbol type="dimen" name="keyguard_avatar_size" />
  <java-symbol type="dimen" name="keyguard_avatar_frame_stroke_width" />
  <java-symbol type="dimen" name="keyguard_avatar_frame_shadow_radius" />
  <java-symbol type="dimen" name="kg_edge_swipe_region_size" />
  <java-symbol type="drawable" name="ic_jog_dial_sound_off" />
  <java-symbol type="drawable" name="ic_jog_dial_sound_on" />
  <java-symbol type="drawable" name="ic_jog_dial_unlock" />
+32 −0
Original line number Diff line number Diff line
@@ -57,4 +57,36 @@ public interface ChallengeLayout {
     * potentially blocking access to other child views.
     */
    boolean isBouncing();

    /**
     * Set a listener that will respond to changes in bouncer state.
     *
     * @param listener listener to register
     */
    void setOnBouncerStateChangedListener(OnBouncerStateChangedListener listener);

    /**
     * Listener interface that reports changes in bouncer state.
     * The bouncer is
     */
    public interface OnBouncerStateChangedListener {
        /**
         * Called when the bouncer state changes.
         * The bouncer is activated when the user must pass a security challenge
         * to proceed with the requested action.
         *
         * <p>This differs from simply showing or hiding the security challenge
         * as the bouncer will prevent interaction with other elements of the UI.
         * If the user attempts to escape from the bouncer, it will be dismissed,
         * this method will be called with false as the parameter, and the action
         * should be canceled. If the security component reports a successful
         * authentication and the containing code calls hideBouncer() as a result,
         * this method will also be called with a false parameter. It is up to the
         * caller of hideBouncer to be ready for this.</p>
         *
         * @param bouncerActive true if the bouncer is now active,
         *                      false if the bouncer was dismissed.
         */
        public void onBouncerStateChanged(boolean bouncerActive);
    }
}
Loading