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

Commit a778e303 authored by Rakesh Pallerla's avatar Rakesh Pallerla Committed by Steve Kondik
Browse files

Add support for showing Pin/Puk Screens in MultiSim

Add MSIM support for PIN/PUK Screens and operator name.
  * Modify KeyguardUpdateMonitor to include SimState and
    plmn information for all subs.
  * Add new utility functions in KeyguardUpdateMonitor to
    get Pin and Puk locked subIds.
  * Modify PIN and PUK layout to include SUB information.
  * Modify PIN/PUK class to handle subInfoChanged callbacks.
  * Add support to display Attempts remaining in PIN/PUK.
  * Modify CarrierText to include multiple Carrier Names.

Change-Id: I53bdd712c8515f1fd72364a3139e76137fe3825a
parent 799548ea
Loading
Loading
Loading
Loading
+97 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
**
**Copyright (c) 2014, The Linux Foundation. All rights reserved.
**
**Redistribution and use in source and binary forms, with or without
**modification, are permitted provided that the following conditions are
**met:
**    * Redistributions of source code must retain the above copyright
**      notice, this list of conditions and the following disclaimer.
**    * Redistributions in binary form must reproduce the above
**      copyright notice, this list of conditions and the following
**      disclaimer in the documentation and/or other materials provided
**      with the distribution.
**    * Neither the name of The Linux Foundation nor the names of its
**      contributors may be used to endorse or promote products derived
**      from this software without specific prior written permission.
**
**THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
**WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
**MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
**ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
**BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
**CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
**SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
**BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
**WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
**OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
**IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
**
-->
<merge xmlns:android="http://schemas.android.com/apk/res/android">
    <TextView
        android:id="@+id/carrier1"
        android:layout_width="0dip"
        android:layout_height="wrap_content"
        android:layout_weight="1"
        android:layout_gravity="center"
        android:gravity="center"
        android:paddingLeft="12dp"
        android:paddingRight="12dp"
        android:ellipsize="marquee"
        android:singleLine="true"
        android:textDirection = "locale"
        android:textAppearance="?android:attr/textAppearanceMedium"
        android:textColor="?android:attr/textColorSecondary"
        android:textSize="@dimen/keyguard_lockscreen_status_line_font_size"
        android:visibility="gone" />

    <TextView
        android:id="@+id/carrier_divider1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:visibility="gone" />

    <TextView
        android:id="@+id/carrier2"
        android:layout_width="0dip"
        android:layout_height="wrap_content"
        android:layout_weight="1"
        android:layout_gravity="center"
        android:gravity="center"
        android:paddingLeft="12dp"
        android:paddingRight="12dp"
        android:ellipsize="marquee"
        android:singleLine="true"
        android:textDirection = "locale"
        android:textAppearance="?android:attr/textAppearanceMedium"
        android:textColor="?android:attr/textColorSecondary"
        android:textSize="@dimen/keyguard_lockscreen_status_line_font_size"
        android:visibility="gone" />

    <TextView
        android:id="@+id/carrier_divider2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:visibility="gone" />

    <TextView
        android:id="@+id/carrier3"
        android:layout_width="0dip"
        android:layout_height="wrap_content"
        android:layout_weight="1"
        android:layout_gravity="center"
        android:gravity="center"
        android:paddingLeft="12dp"
        android:paddingRight="12dp"
        android:ellipsize="marquee"
        android:singleLine="true"
        android:textDirection = "locale"
        android:textAppearance="?android:attr/textAppearanceMedium"
        android:textColor="?android:attr/textColorSecondary"
        android:textSize="@dimen/keyguard_lockscreen_status_line_font_size"
        android:visibility="gone" />
</merge>
+2 −5
Original line number Diff line number Diff line
@@ -31,12 +31,9 @@

    <com.android.keyguard.CarrierText
        android:id="@+id/carrier_text"
        android:layout_width="wrap_content"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:ellipsize="marquee"
        android:textAppearance="?android:attr/textAppearanceMedium"
        android:textSize="@dimen/kg_status_line_font_size"
        android:textColor="?android:attr/textColorSecondary"
        android:orientation="horizontal"
        android:visibility="gone"
        androidprv:allCaps="@bool/kg_use_all_caps" />

+41 −6
Original line number Diff line number Diff line
@@ -33,7 +33,39 @@
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:src="@drawable/ic_lockscreen_sim"/>

    <LinearLayout
       android:id="@+id/sim_info_message"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        android:layout_gravity="center_horizontal"
        android:visibility="gone">
        <TextView
            android:id="@+id/slot_id_name"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center_horizontal"
            android:ellipsize="marquee"
            android:singleLine="true"
            android:textDirection = "locale"
            android:textAppearance="?android:attr/textAppearanceLarge"
            android:textColor="?android:attr/textColorPrimary"
            android:textSize="16sp"
            />
        <TextView
            android:id="@+id/sub_display_name"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center_horizontal"
            android:ellipsize="middle"
            android:maxWidth="110dip"
            android:singleLine="true"
            android:textDirection = "locale"
            android:textAppearance="?android:attr/textAppearanceLarge"
            android:textColor="?android:attr/textColorPrimary"
            android:textSize="16sp"
            />
    </LinearLayout>
    <include layout="@layout/keyguard_message_area"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
@@ -185,10 +217,13 @@
                android:layout_weight="1"
                android:orientation="horizontal"
                >
            <Space
           <Button
               android:id="@+id/key_dismiss"
               style="@style/DismissPadKey"
               android:layout_width="0px"
               android:layout_height="match_parent"
               android:layout_weight="1"
               android:visibility="invisible"
               />
            <com.android.keyguard.NumPadKey
                    android:id="@+id/key0"
+42 −6
Original line number Diff line number Diff line
@@ -33,7 +33,40 @@
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:src="@drawable/ic_lockscreen_sim"/>

    <LinearLayout
       android:id="@+id/sim_info_message"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        android:layout_gravity="center_horizontal"
        android:visibility="gone"
        >
        <TextView
            android:id="@+id/slot_id_name"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center_horizontal"
            android:ellipsize="marquee"
            android:singleLine="true"
            android:textDirection = "locale"
            android:textAppearance="?android:attr/textAppearanceLarge"
            android:textColor="?android:attr/textColorPrimary"
            android:textSize="16sp"
            />
        <TextView
            android:id="@+id/sub_display_name"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center_horizontal"
            android:ellipsize="middle"
            android:maxWidth="110dip"
            android:singleLine="true"
            android:textDirection = "locale"
            android:textAppearance="?android:attr/textAppearanceLarge"
            android:textColor="?android:attr/textColorPrimary"
            android:textSize="16sp"
            />
    </LinearLayout>
    <include layout="@layout/keyguard_message_area"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
@@ -185,10 +218,13 @@
                android:layout_weight="1"
                android:orientation="horizontal"
                >
            <Space
           <Button
               android:id="@+id/key_dismiss"
               style="@style/DismissPadKey"
               android:layout_width="0px"
               android:layout_height="match_parent"
               android:layout_weight="1"
               android:visibility="invisible"
               />
            <com.android.keyguard.NumPadKey
                    android:id="@+id/key0"
+4 −0
Original line number Diff line number Diff line
@@ -178,4 +178,8 @@

    <!-- The translation for disappearing security views after having solved them. -->
    <dimen name="disappear_y_translation">-32dp</dimen>
    <!-- For SIM card detection info text max width in SIM card changed dialog -->
    <dimen name="sim_card_name_maxwidth">100dip</dimen>
    <!-- For SIM card name padding in SIM pin/puk unlock and SIM card changed dialog -->
    <dimen name="sim_card_name_padding">6dip</dimen>
</resources>
Loading