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

Commit dcb3d84b authored by Jim Miller's avatar Jim Miller
Browse files

Replace keyguard with new implementation

This change refactors keyguard to be more modular and maintainable.  More
specifically, it replaces the top-level view with just one device-dependent
view that contains two views: a widget area and a security area.

The widget area can be populated with custom widgets.

The security area contains the current security method as dictated by
the stored password quality.

This change contains both the old and the new keyguard with the old keyguard
still enabled.  The new keyguard will be enabled in a subsequent change.

Change-Id: Id75286113771ca1407e9db182172b580f870b612
parent 0d43c567
Loading
Loading
Loading
Loading
+33 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- 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.
-->

<set xmlns:android="http://schemas.android.com/apk/res/android" android:shareInterpolator="false">

    <scale
        android:interpolator="@android:anim/decelerate_interpolator"
        android:fromXScale="0.0"
        android:toXScale="1.0"
        android:fromYScale="1.0"
        android:toYScale="1.0"
        android:pivotX="50%"
        android:pivotY="50%"
        android:fillEnabled="true"
        android:fillAfter="true"
        android:duration="@integer/flip_duration"
        android:startOffset="@integer/flip_duration" />

</set>
+32 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- 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.
-->

<set xmlns:android="http://schemas.android.com/apk/res/android" android:shareInterpolator="false">

    <scale
        android:interpolator="@android:anim/accelerate_interpolator"
        android:fromXScale="1.0"
        android:toXScale="0.0"
        android:fromYScale="1.0"
        android:toYScale="1.0"
        android:pivotX="50%"
        android:pivotY="50%"
        android:fillEnabled="true"
        android:fillAfter="true"
        android:duration="@integer/flip_duration" />

</set>
+58 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
**
** Copyright 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.
*/
-->

<!-- This is the host view that generally contains two sub views: the widget view
    and the security view. -->
<com.android.internal.policy.impl.keyguard.KeyguardHostView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/keyguard_host_view"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="horizontal">

    <com.android.internal.policy.impl.keyguard.KeyguardWidgetView
        android:id="@+id/app_widget_container"
        android:layout_width="0dip"
        android:layout_height="match_parent"
        android:layout_weight="1"
        android:visibility="gone">

        <!-- TODO: Remove this once supported as a widget -->
        <include layout="@layout/keyguard_status_view"/>

    </com.android.internal.policy.impl.keyguard.KeyguardWidgetView>

    <ViewFlipper
        android:id="@+id/view_flipper"
        android:layout_width="0dip"
        android:layout_height="match_parent"
        android:layout_weight="1"
        android:gravity="center">

        <include layout="@layout/keyguard_selector_view"/>
        <include layout="@layout/keyguard_account_view"/>
        <include layout="@layout/keyguard_pattern_view"/>
        <include layout="@layout/keyguard_password_view"/>
        <include layout="@layout/keyguard_sim_pin_view"/>
        <include layout="@layout/keyguard_sim_puk_view"/>
        <include layout="@layout/keyguard_face_unlock_view"/>

    </ViewFlipper>

</com.android.internal.policy.impl.keyguard.KeyguardHostView>
+47 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
**
** Copyright 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.
*/
-->

<!-- This is the host view that generally contains two sub views: the widget view
    and the security view. -->
<com.android.internal.policy.impl.keyguard.KeyguardHostView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/keyguard_host_view"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:gravity="center_horizontal"
    android:clipChildren="false">

    <ViewFlipper
        android:id="@+id/view_flipper"
        android:layout_height="match_parent"
        android:gravity="center">

        <include layout="@layout/keyguard_selector_view"/>
        <include layout="@layout/keyguard_account_view"/>
        <include layout="@layout/keyguard_pattern_view"/>
        <include layout="@layout/keyguard_password_view"/>
        <include layout="@layout/keyguard_sim_pin_view"/>
        <include layout="@layout/keyguard_sim_puk_view"/>
        <include layout="@layout/keyguard_face_unlock_view"/>

    </ViewFlipper>

</com.android.internal.policy.impl.keyguard.KeyguardHostView>
+67 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
**
** Copyright 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.
*/
-->

<!-- This is the host view that generally contains two sub views: the widget view
    and the security view. -->
<com.android.internal.policy.impl.keyguard.KeyguardHostView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/keyguard_host_view"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="horizontal">

    <com.android.internal.policy.impl.keyguard.KeyguardWidgetView
        android:id="@+id/app_widget_container"
        android:layout_width="0dip"
        android:layout_height="match_parent"
        android:layout_weight="1"
        android:visibility="gone">

        <!-- TODO: Remove this once supported as a widget -->
        <include layout="@layout/keyguard_status_view"/>

    </com.android.internal.policy.impl.keyguard.KeyguardWidgetView>

    <FrameLayout
        android:layout_width="0dip"
        android:layout_height="match_parent"
        android:layout_weight="1"
        android:gravity="center">

        <ViewFlipper
            android:id="@+id/view_flipper"
            android:layout_width="@dimen/kg_security_view_width"
            android:layout_height="match_parent"
            android:layout_gravity="center"
            android:layout_weight="1"
            android:gravity="center">

            <include layout="@layout/keyguard_selector_view"/>
            <include layout="@layout/keyguard_account_view"/>
            <include layout="@layout/keyguard_pattern_view"/>
            <include layout="@layout/keyguard_password_view"/>
            <include layout="@layout/keyguard_sim_pin_view"/>
            <include layout="@layout/keyguard_sim_puk_view"/>
            <include layout="@layout/keyguard_face_unlock_view"/>

        </ViewFlipper>

    </FrameLayout>

</com.android.internal.policy.impl.keyguard.KeyguardHostView>
Loading