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

Commit eee20931 authored by Adam Powell's avatar Adam Powell
Browse files

Beginnings of bouncer support; add scrims and state tracking

Integrating from prototype app

Change-Id: Ib142cf371c5997f547266d8af7e25129fb4e1343
parent 9253f561
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -41,6 +41,13 @@
                 androidprv:layout_maxWidth="480dp"
                 androidprv:layout_maxHeight="480dp" />

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

        <View android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:layout_childType="scrim"
              android:background="#99000000" />

        <com.android.internal.policy.impl.keyguard.KeyguardSecurityContainer
            android:id="@+id/keyguard_security_container"
            android:layout_width="wrap_content"
@@ -61,8 +68,6 @@
            </com.android.internal.policy.impl.keyguard.KeyguardSecurityViewFlipper>
        </com.android.internal.policy.impl.keyguard.KeyguardSecurityContainer>

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

    </com.android.internal.policy.impl.keyguard.MultiPaneChallengeLayout>
</com.android.internal.policy.impl.keyguard.KeyguardHostView>
+6 −1
Original line number Diff line number Diff line
@@ -43,11 +43,16 @@
                     android:layout_gravity="center"/>
        </FrameLayout>

        <View android:layout_width="match_parent"
              android:layout_height="match_parent"
              androidprv:layout_childType="scrim"
              android:background="#99000000" />

        <com.android.internal.policy.impl.keyguard.KeyguardSecurityContainer
            android:id="@+id/keyguard_security_container"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            androidprv:layout_isChallenge="true"
            androidprv:layout_childType="challenge"
            android:gravity="bottom|center_horizontal"
            android:background="@drawable/security_frame">
            <com.android.internal.policy.impl.keyguard.KeyguardSecurityViewFlipper
+7 −2
Original line number Diff line number Diff line
@@ -42,6 +42,13 @@
                 androidprv:layout_maxWidth="480dp"
                 androidprv:layout_maxHeight="480dp" />

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

        <View android:layout_width="match_parent"
              android:layout_height="match_parent"
              androidprv:layout_childType="scrim"
              android:background="#99000000" />

        <com.android.internal.policy.impl.keyguard.KeyguardSecurityContainer
            android:id="@+id/keyguard_security_container"
            android:layout_width="wrap_content"
@@ -62,7 +69,5 @@
            </com.android.internal.policy.impl.keyguard.KeyguardSecurityViewFlipper>
        </com.android.internal.policy.impl.keyguard.KeyguardSecurityContainer>

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

    </com.android.internal.policy.impl.keyguard.MultiPaneChallengeLayout>
</com.android.internal.policy.impl.keyguard.KeyguardHostView>
+21 −16
Original line number Diff line number Diff line
@@ -5776,12 +5776,31 @@
        <attr name="leftToRight" format="boolean" />
    </declare-styleable>

    <!-- Some child types have special behavior. -->
    <attr name="layout_childType">
        <!-- No special behavior. Layout will proceed as normal. -->
        <enum name="none" value="0" />
        <!-- Widget container.
             This will be resized in response to certain events. -->
        <enum name="widget" value="1" />
        <!-- Security challenge container.
             This will be dismissed/shown in response to certain events,
             possibly obscuring widget elements. -->
        <enum name="challenge" value="2" />
        <!-- User switcher.
             This will consume space from the total layout area. -->
        <enum name="userSwitcher" value="3" />
        <!-- Scrim. This will block access to child views that
             come before it in the child list in bouncer mode. -->
        <enum name="scrim" value="4" />
    </attr>

    <declare-styleable name="SlidingChallengeLayout">
        <attr name="dragHandle" format="reference" />
    </declare-styleable>

    <declare-styleable name="SlidingChallengeLayout_Layout">
        <attr name="layout_isChallenge" format="boolean" />
        <attr name="layout_childType" />
    </declare-styleable>

    <!-- Attributes that can be used with <code>&lt;FragmentBreadCrumbs&gt;</code>
@@ -5800,21 +5819,7 @@
             If 0/default, the view will be measured by standard rules
             as if this were a FrameLayout. -->
        <attr name="layout_centerWithinArea" format="float" />
        <!-- Some child types have special behavior. -->
        <attr name="layout_childType">
            <!-- No special behavior. Layout will proceed as normal. -->
            <enum name="none" value="0" />
            <!-- Widget container.
                 This will be resized in response to certain events. -->
            <enum name="widget" value="1" />
            <!-- Security challenge container.
                 This will be dismissed/shown in response to certain events,
                 possibly obscuring widget elements. -->
            <enum name="challenge" value="2" />
            <!-- User switcher.
                 This will consume space from the total layout area. -->
            <enum name="userSwitcher" value="3" />
        </attr>
        <attr name="layout_childType" />
        <attr name="layout_gravity" />
        <attr name="layout_maxWidth" format="dimension" />
        <attr name="layout_maxHeight" />
+12 −0
Original line number Diff line number Diff line
@@ -45,4 +45,16 @@ public interface ChallengeLayout {
     * Show the bouncer challenge. This may block access to other child views.
     */
    void showBouncer();

    /**
     * Hide the bouncer challenge if it is currently showing.
     * This may restore previously blocked access to other child views.
     */
    void hideBouncer();

    /**
     * Returns true if the challenge is currently in bouncer mode,
     * potentially blocking access to other child views.
     */
    boolean isBouncing();
}
Loading