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

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

Enable lazy-loading of security views in keyguard

This change removes all but the default KeyguardSelectorView from KeyguardViewHost
to (1) reduce the overall memory footprint (2) reduce initial layout inflation
time and (3) avoid initializing the camera until needed by face unlock.

Fixes bug 7127666

Change-Id: Ibac1838dd7a490dcadbfab5bdfdd82734b69055a
parent 824b959d
Loading
Loading
Loading
Loading
+1 −6
Original line number Diff line number Diff line
@@ -45,13 +45,8 @@
        android:layout_weight="1"
        android:gravity="center">

        <!-- SelectorView is always used, so add it here. The rest are loaded dynamically -->
        <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>

+1 −6
Original line number Diff line number Diff line
@@ -33,13 +33,8 @@
        android:layout_height="match_parent"
        android:gravity="center">

        <!-- SelectorView is always used, so add it here. The rest are loaded dynamically -->
        <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>

+1 −6
Original line number Diff line number Diff line
@@ -52,13 +52,8 @@
            android:layout_weight="1"
            android:gravity="center">

            <!-- SelectorView is always used, so add it here. The rest are loaded dynamically -->
            <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>

+1 −6
Original line number Diff line number Diff line
@@ -47,13 +47,8 @@
        android:layout_weight="0.6"
        android:layout_gravity="center">

        <!-- SelectorView is always used, so add it here. The rest are loaded dynamically -->
        <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>

+7 −0
Original line number Diff line number Diff line
@@ -1367,6 +1367,13 @@
  <java-symbol type="layout" name="keyguard_screen_tab_unlock_land" />
  <java-symbol type="layout" name="keyguard_screen_unlock_landscape" />
  <java-symbol type="layout" name="keyguard_screen_unlock_portrait" />
  <java-symbol type="layout" name="keyguard_selector_view" />
  <java-symbol type="layout" name="keyguard_pattern_view" />
  <java-symbol type="layout" name="keyguard_password_view" />
  <java-symbol type="layout" name="keyguard_face_unlock_view" />
  <java-symbol type="layout" name="keyguard_sim_pin_view" />
  <java-symbol type="layout" name="keyguard_sim_puk_view" />
  <java-symbol type="layout" name="keyguard_account_view" />
  <java-symbol type="layout" name="recent_apps_dialog" />
  <java-symbol type="layout" name="screen_action_bar" />
  <java-symbol type="layout" name="screen_action_bar_overlay" />
Loading