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

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

Telephony(MSIM): Add StatusBar support for MultiSim.

 -Add support for Signal Strength icon display for MultiSim
  Add support for NO SIM icon support for multiple SIMs.

Display dual subscription info in notification panel
  -Show subscription information for both subscriptions
   relevant to the sim state. if sim state is ready show
   operator name, if card absent, show no sim message,
   if UE is in airplane mode, show airplane mode message.

Clear data activity icon when disconnected
  -If data is disconnected before data activity becomes none,
   then clear up/down arrow icon by reset the data activity icon.

Add support for ro.config.combined_signal
  -Add support for ro.config.combined_signal. This property is being used
   to consider data service state for signal display.
   When ro.config.combined_signal is not set to false, we will display
   CS/PS signal strength whichever is available.

Change-Id: I11fb6ed37e7ba40b8db7840feedd109557128758
(cherry picked from commit 37ee8216eba253a61f9836b12f65bfe00f38e46c)
(cherry picked from commit 1e706857e70a03d2139fe1a8416321d603e008b6)
parent 2883ea73
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
** Copyright (c) 2013 The Linux Foundation. All rights reserved.
** Not a Contribution.
** Copyright 2009, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
@@ -35,6 +37,7 @@
       <item><xliff:g id="id">volume</xliff:g></item>
       <item><xliff:g id="id">wifi</xliff:g></item>
       <item><xliff:g id="id">cdma_eri</xliff:g></item>
       <item><xliff:g id="id">phone_signal_second_sub</xliff:g></item>
       <item><xliff:g id="id">data_connection</xliff:g></item>
       <item><xliff:g id="id">phone_evdo_signal</xliff:g></item>
       <item><xliff:g id="id">phone_signal</xliff:g></item>
+5 −0
Original line number Diff line number Diff line
@@ -2346,6 +2346,8 @@

    <!-- Shown in the lock screen when there is emergency calls only mode. -->
    <string name="emergency_calls_only" msgid="2485604591272668370">Emergency calls only</string>
    <!-- Shown in the lock screen when there is SIM card IO error. -->
    <string name="lockscreen_sim_error_message_short">Invalid Card.</string>

    <!-- When the user inserts a sim card from an unsupported network, it becomes network
         locked -->
@@ -2366,6 +2368,9 @@
         progress dialog in the meantime.  this is the emssage. -->
    <string name="lockscreen_sim_unlock_progress_dialog_message">Unlocking SIM card\u2026</string>

    <!-- Shown in the lock screen to tell the user that phone is in airplane mode-->
    <string name="lockscreen_airplane_mode_on">Airplane Mode</string>

    <!-- For the unlock screen, Information message shown in dialog when user has too many failed attempts at
         drawing the unlock pattern -->
    <string name="lockscreen_too_many_failed_attempts_dialog_message">
+6 −0
Original line number Diff line number Diff line
@@ -456,6 +456,7 @@
  <java-symbol type="string" name="badPin" />
  <java-symbol type="string" name="badPuk" />
  <java-symbol type="string" name="pinpuk_attempts" />
  <java-symbol type="string" name="lockscreen_sim_error_message_short" />
  <java-symbol type="string" name="byteShort" />
  <java-symbol type="string" name="capability_desc_canRequestEnhancedWebAccessibility" />
  <java-symbol type="string" name="capability_title_canRequestFilterKeyEvents" />
@@ -1393,7 +1394,12 @@
  <java-symbol type="string" name="global_action_silent_mode_on_status" />
  <java-symbol type="string" name="global_action_toggle_silent_mode" />
  <java-symbol type="string" name="invalidPuk" />
  <java-symbol type="string" name="lockscreen_missing_sim_message_short" />
  <java-symbol type="string" name="lockscreen_permanent_disabled_sim_message_short" />
  <java-symbol type="string" name="lockscreen_carrier_default" />
  <java-symbol type="string" name="lockscreen_sim_locked_message" />
  <java-symbol type="string" name="lockscreen_sim_puk_locked_message" />
  <java-symbol type="string" name="lockscreen_airplane_mode_on" />
  <java-symbol type="style" name="Animation.LockScreen" />
  <java-symbol type="style" name="Theme.Dialog.RecentApplications" />
  <java-symbol type="style" name="Theme.ExpandedMenu" />
+210 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
/* apps/common/assets/default/default/skins/StatusBar.xml
**
** Copyright (c) 2012-2013 The Linux Foundation. All rights reserved.
** Not a Contribution.
** Copyright 2011 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.
*/
-->

<com.android.systemui.statusbar.MSimSignalClusterView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_height="wrap_content"
    android:layout_width="wrap_content"
    android:orientation="horizontal"
    >
    <FrameLayout
        android:id="@+id/wifi_combo"
        android:layout_height="wrap_content"
        android:layout_width="wrap_content"
        android:layout_marginRight="-6dp"
        >
        <ImageView
            android:id="@+id/wifi_signal"
            android:layout_height="wrap_content"
            android:layout_width="wrap_content"
            android:layout_alignParentRight="true"
            android:layout_centerVertical="true"
            android:scaleType="center"
            />
        <ImageView
            android:id="@+id/wifi_inout"
            android:layout_height="wrap_content"
            android:layout_width="wrap_content"
            android:layout_gravity="center|bottom"
            />
    </FrameLayout>
    <View
        android:layout_height="6dp"
        android:layout_width="6dp"
        android:visibility="gone"
        android:id="@+id/spacer"
        />
    <!--<FrameLayout
        android:id="@+id/wimax_combo"
        android:layout_height="wrap_content"
        android:layout_width="wrap_content"
        android:layout_marginRight="-6dp"
        >
        <ImageView
            android:id="@+id/wimax_signal"
            android:layout_height="wrap_content"
            android:layout_width="wrap_content"
            android:layout_alignParentRight="true"
            android:layout_centerVertical="true"
            android:scaleType="center"
            />
        <ImageView
            android:id="@+id/wimax_inout"
            android:layout_height="wrap_content"
            android:layout_width="wrap_content"
            android:layout_gravity="center|bottom"
            />
    </FrameLayout>
    -->
    <FrameLayout
        android:layout_height="wrap_content"
        android:layout_width="wrap_content"
        >
        <View
            android:layout_height="6dp"
            android:layout_width="6dp"
            android:visibility="invisible"
            />
        <FrameLayout
            android:id="@+id/mobile_combo_sub3"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            >
            <ImageView
                android:id="@+id/mobile_signal_sub3"
                android:layout_height="wrap_content"
                android:layout_width="wrap_content"
                android:layout_gravity="center|bottom"
                />
            <ImageView
                android:id="@+id/mobile_type_sub3"
                android:layout_height="wrap_content"
                android:layout_width="wrap_content"
                android:layout_gravity="center|bottom"
                />
            <ImageView
                android:id="@+id/mobile_inout_sub3"
                android:layout_height="wrap_content"
                android:layout_width="wrap_content"
                android:layout_gravity="right|bottom"
                />
            <ImageView
                android:id="@+id/no_sim_slot3"
                android:layout_height="wrap_content"
                android:layout_width="wrap_content"
                />
        </FrameLayout>
    </FrameLayout>
    <View
        android:layout_height="8dp"
        android:layout_width="8dp"
        android:id="@+id/spacer"
        />
    <FrameLayout
        android:layout_height="wrap_content"
        android:layout_width="wrap_content"
        >
        <View
            android:layout_height="6dp"
            android:layout_width="6dp"
            android:visibility="invisible"
            />
        <FrameLayout
            android:id="@+id/mobile_combo_sub2"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            >
            <ImageView
                android:id="@+id/mobile_signal_sub2"
                android:layout_height="wrap_content"
                android:layout_width="wrap_content"
                android:layout_gravity="center|bottom"
                />
            <ImageView
                android:id="@+id/mobile_type_sub2"
                android:layout_height="wrap_content"
                android:layout_width="wrap_content"
                android:layout_gravity="center|bottom"
                />
            <ImageView
                android:id="@+id/mobile_inout_sub2"
                android:layout_height="wrap_content"
                android:layout_width="wrap_content"
                android:layout_gravity="right|bottom"
                />
            <ImageView
                android:id="@+id/no_sim_slot2"
                android:layout_height="wrap_content"
                android:layout_width="wrap_content"
                />
        </FrameLayout>
    </FrameLayout>
    <View
        android:layout_height="8dp"
        android:layout_width="8dp"
        android:id="@+id/spacer"
        />
    <FrameLayout
        android:layout_height="wrap_content"
        android:layout_width="wrap_content"
        >
        <View
            android:layout_height="6dp"
            android:layout_width="6dp"
            android:visibility="invisible"
            />
        <FrameLayout
            android:id="@+id/mobile_combo"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            >
            <ImageView
                android:id="@+id/mobile_signal"
                android:layout_height="wrap_content"
                android:layout_width="wrap_content"
                android:layout_gravity="center|bottom"
                />
            <ImageView
                android:id="@+id/mobile_type"
                android:layout_height="wrap_content"
                android:layout_width="wrap_content"
                android:layout_gravity="center|bottom"
                />
            <ImageView
                android:id="@+id/mobile_inout"
                android:layout_height="wrap_content"
                android:layout_width="wrap_content"
                android:layout_gravity="right|bottom"
                />
            <ImageView
                android:id="@+id/no_sim"
                android:layout_height="wrap_content"
                android:layout_width="wrap_content"
                />
        </FrameLayout>
    </FrameLayout>
    <ImageView
        android:id="@+id/airplane"
        android:layout_height="wrap_content"
        android:layout_width="wrap_content"
        />
</com.android.systemui.statusbar.MSimSignalClusterView>
+162 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
/* apps/common/assets/default/default/skins/StatusBar.xml
**
** Copyright (c) 2012-2013 The Linux Foundation. All rights reserved.
** Not a Contribution.
** Copyright 2006, 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.
*/
-->

<!--    android:background="@drawable/status_bar_closed_default_background" -->
<com.android.systemui.statusbar.phone.PhoneStatusBarView
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui"
    android:id="@+id/msim_status_bar"
    android:background="@drawable/system_bar_background"
    android:orientation="vertical"
    android:focusable="true"
    android:descendantFocusability="afterDescendants"
    android:fitsSystemWindows="true"
    >

    <ImageView
        android:id="@+id/notification_lights_out"
        android:layout_width="@dimen/status_bar_icon_size"
        android:layout_height="match_parent"
        android:paddingLeft="6dip"
        android:paddingBottom="2dip"
        android:src="@drawable/ic_sysbar_lights_out_dot_small"
        android:scaleType="center"
        android:visibility="gone"
        />

    <LinearLayout android:id="@+id/status_bar_contents"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:paddingLeft="6dip"
        android:paddingRight="6dip"
        android:orientation="horizontal"
        >

        <LinearLayout
            android:id="@+id/notification_icon_area"
            android:layout_width="0dip"
            android:layout_height="match_parent"
            android:layout_weight="1"
            android:orientation="horizontal"
            >
            <com.android.systemui.statusbar.StatusBarIconView android:id="@+id/moreIcon"
                android:layout_width="@dimen/status_bar_icon_size"
                android:layout_height="match_parent"
                android:src="@drawable/stat_notify_more"
                android:visibility="gone"
                />

            <com.android.systemui.statusbar.phone.IconMerger android:id="@+id/notificationIcons"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_alignParentLeft="true"
                android:gravity="center_vertical"
                android:orientation="horizontal"/>
        </LinearLayout>

        <LinearLayout android:id="@+id/system_icon_area"
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:orientation="horizontal">

            <LinearLayout android:id="@+id/statusIcons"
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:gravity="center_vertical"
                android:orientation="horizontal"/>

            <LinearLayout
                android:id="@+id/signal_battery_cluster"
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:paddingLeft="2dp"
                android:orientation="horizontal"
                android:gravity="center"
                >
                <include layout="@layout/msim_signal_cluster_view"
                    android:id="@+id/msim_signal_cluster"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    />
                <ImageView
                    android:id="@+id/battery"
                    android:layout_height="wrap_content"
                    android:layout_width="wrap_content"
                    android:paddingLeft="4dip"
                    />
            </LinearLayout>

            <com.android.systemui.statusbar.policy.Clock
                android:id="@+id/clock"
                android:textAppearance="@style/TextAppearance.StatusBar.Clock"
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:singleLine="true"
                android:paddingLeft="6dip"
                android:gravity="center_vertical|left"
                />
        </LinearLayout>
    </LinearLayout>

    <LinearLayout android:id="@+id/ticker"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:paddingLeft="6dip"
        android:animationCache="false"
        android:orientation="horizontal" >
        <ImageSwitcher android:id="@+id/tickerIcon"
            android:layout_width="@dimen/status_bar_icon_size"
            android:layout_height="@dimen/status_bar_icon_size"
            android:layout_marginRight="4dip"
            >
            <com.android.systemui.statusbar.AnimatedImageView
                android:layout_width="@dimen/status_bar_icon_size"
                android:layout_height="@dimen/status_bar_icon_size"
                android:scaleType="center"
                />
            <com.android.systemui.statusbar.AnimatedImageView
                android:layout_width="@dimen/status_bar_icon_size"
                android:layout_height="@dimen/status_bar_icon_size"
                android:scaleType="center"
                />
        </ImageSwitcher>
        <com.android.systemui.statusbar.phone.TickerView android:id="@+id/tickerText"
            android:layout_width="0dip"
            android:layout_weight="1"
            android:layout_height="wrap_content"
            android:paddingTop="2dip"
            android:paddingRight="10dip">
            <TextView
                android:textAppearance="@style/TextAppearance.StatusBar.PhoneTicker"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:singleLine="true"
                />
            <TextView
                android:textAppearance="@style/TextAppearance.StatusBar.PhoneTicker"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:singleLine="true"
                />
        </com.android.systemui.statusbar.phone.TickerView>
    </LinearLayout>
</com.android.systemui.statusbar.phone.PhoneStatusBarView>
Loading