Skip to content

Commit

Permalink
SystemUI: Customize StatusBar for Chinese carrier
Browse files Browse the repository at this point in the history
1. Show carrier label in notification panel.
2. Add values-w320dp to adapt lower resolution device.
3. Update Chinese roaming string.
4. Show wifi activity in status bar.
5. Show indicator for Wifi on but not connected.
6. Show rsrp level for LTE.
7. Redesign the scheme of selecting icons on signal cluster.
   Customized SigalClusterView and MobileSignalController to adapt
   requirement from Chinese carriers. The customization is controller
   by config values defined in overlayed config.xml.

CRs-Fixed: 653747
Change-Id: I4b228cc4afa552b348a96302a4858a0ab0c7e7f0
  • Loading branch information
Shufeng Hou authored and wangjing committed Nov 23, 2015
1 parent 0708fad commit 75e20b5
Show file tree
Hide file tree
Showing 19 changed files with 2,102 additions and 45 deletions.
82 changes: 64 additions & 18 deletions packages/SystemUI/res/layout/mobile_signal_group.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
* Copyright (c) 2015 The Linux Foundation. All rights reserved.
* Not a Contribution.
*/
/* apps/common/assets/default/default/skins/StatusBar.xml
**
** Copyright 2011, The Android Open Source Project
Expand All @@ -17,31 +21,73 @@
** limitations under the License.
*/
-->
<FrameLayout
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res-auto"
android:id="@+id/mobile_combo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
>
<com.android.systemui.statusbar.AnimatedImageView
android:theme="@style/DualToneLightTheme"
android:id="@+id/mobile_signal"
android:layout_height="wrap_content"
<ImageView
android:layout_width="wrap_content"
systemui:hasOverlappingRendering="false"
/>
<com.android.systemui.statusbar.AnimatedImageView
android:theme="@style/DualToneDarkTheme"
android:id="@+id/mobile_signal_dark"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:alpha="0.0"
systemui:hasOverlappingRendering="false"
android:layout_marginStart="2dp"
android:id="@+id/data_inout"
android:visibility="gone"
/>
<ImageView
android:id="@+id/mobile_type"
android:layout_height="wrap_content"
<FrameLayout
android:layout_width="wrap_content"
/>
</FrameLayout>
android:layout_height="wrap_content"
>
<FrameLayout
android:id="@+id/mobile_signal_single"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
>
<com.android.systemui.statusbar.AnimatedImageView
android:theme="@style/DualToneLightTheme"
android:id="@+id/mobile_signal"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
systemui:hasOverlappingRendering="false"
/>
<com.android.systemui.statusbar.AnimatedImageView
android:theme="@style/DualToneDarkTheme"
android:id="@+id/mobile_signal_dark"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:alpha="0.0"
systemui:hasOverlappingRendering="false"
/>
<ImageView
android:id="@+id/mobile_type"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
/>
<ImageView
android:id="@+id/mobile_inout"
android:layout_height="17dp"
android:layout_width="17dp"
android:layout_gravity="end|bottom"
/>
</FrameLayout>
<LinearLayout
android:id="@+id/mobile_signal_stacked"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:visibility="gone"
>
<ImageView
android:id="@+id/mobile_signal_data"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
<ImageView
android:id="@+id/mobile_signal_voice"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
</LinearLayout>
</FrameLayout>
</LinearLayout>
8 changes: 8 additions & 0 deletions packages/SystemUI/res/layout/signal_cluster_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,14 @@
android:alpha="0.0"
systemui:hasOverlappingRendering="false"
/>
<com.android.systemui.statusbar.AlphaOptimizedImageView
android:theme="@style/DualToneLightTheme"
android:id="@+id/wifi_inout"
android:layout_height="17dp"
android:layout_width="18.41dp"
android:layout_gravity="center|bottom"
systemui:hasOverlappingRendering="false"
/>
</FrameLayout>
<View
android:id="@+id/wifi_signal_spacer"
Expand Down
14 changes: 14 additions & 0 deletions packages/SystemUI/res/layout/status_bar_expanded.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,27 @@

<com.android.systemui.statusbar.phone.NotificationPanelView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:androidprv="http://schemas.android.com/apk/res-auto"
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui"
android:id="@+id/notification_panel"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/transparent"
>

<com.android.keyguard.CarrierText
android:id="@+id/carrier_label"
android:layout_height="@dimen/carrier_label_height"
android:layout_width="match_parent"
android:layout_marginBottom="@dimen/close_handle_height"
android:layout_gravity="bottom"
android:gravity="center"
android:ellipsize="marquee"
android:singleLine="true"
android:visibility="invisible"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="#999999" />

<include
layout="@layout/keyguard_status_view"
android:layout_height="wrap_content"
Expand Down
2 changes: 1 addition & 1 deletion packages/SystemUI/res/values-zh-rCN/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@
<string name="accessibility_data_connection_4g" msgid="7741000750630089612">"4G"</string>
<string name="accessibility_data_connection_lte" msgid="5413468808637540658">"LTE"</string>
<string name="accessibility_data_connection_cdma" msgid="6132648193978823023">"CDMA"</string>
<string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"漫游中"</string>
<string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"数据漫游"</string>
<string name="accessibility_data_connection_edge" msgid="4477457051631979278">"EDGE"</string>
<string name="accessibility_data_connection_wifi" msgid="2324496756590645221">"WLAN"</string>
<string name="accessibility_no_sim" msgid="8274017118472455155">"无 SIM 卡。"</string>
Expand Down
2 changes: 1 addition & 1 deletion packages/SystemUI/res/values-zh-rTW/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@
<string name="accessibility_data_connection_4g" msgid="7741000750630089612">"4G"</string>
<string name="accessibility_data_connection_lte" msgid="5413468808637540658">"LTE"</string>
<string name="accessibility_data_connection_cdma" msgid="6132648193978823023">"CDMA"</string>
<string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"漫遊中"</string>
<string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"數據漫遊"</string>
<string name="accessibility_data_connection_edge" msgid="4477457051631979278">"Edge"</string>
<string name="accessibility_data_connection_wifi" msgid="2324496756590645221">"Wi-Fi"</string>
<string name="accessibility_no_sim" msgid="8274017118472455155">"沒有 SIM 卡。"</string>
Expand Down
Loading

0 comments on commit 75e20b5

Please sign in to comment.