summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorDaniel Sandler <dsandler@android.com>2012-01-20 14:40:26 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2012-01-20 14:40:26 -0800
commitaaa7b7728f3ced062273b54e1fc3b9d7d815bdcd (patch)
treebae430e37bf24024cc6308268a9ff637be1ee85a /packages
parentffb0c0b3ca2f8693a354aad17e21f1419d9f0379 (diff)
parent639ed754bba866d2a47ef7ca58e56806b546b149 (diff)
downloadframeworks_base-aaa7b7728f3ced062273b54e1fc3b9d7d815bdcd.zip
frameworks_base-aaa7b7728f3ced062273b54e1fc3b9d7d815bdcd.tar.gz
frameworks_base-aaa7b7728f3ced062273b54e1fc3b9d7d815bdcd.tar.bz2
am 639ed754: Hide mobile RSSI on devices without mobile data.
* commit '639ed754bba866d2a47ef7ca58e56806b546b149': Hide mobile RSSI on devices without mobile data.
Diffstat (limited to 'packages')
-rw-r--r--packages/SystemUI/res/layout-sw600dp/status_bar_notification_panel_title.xml19
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java27
2 files changed, 31 insertions, 15 deletions
diff --git a/packages/SystemUI/res/layout-sw600dp/status_bar_notification_panel_title.xml b/packages/SystemUI/res/layout-sw600dp/status_bar_notification_panel_title.xml
index c9b1673..ef95936 100644
--- a/packages/SystemUI/res/layout-sw600dp/status_bar_notification_panel_title.xml
+++ b/packages/SystemUI/res/layout-sw600dp/status_bar_notification_panel_title.xml
@@ -44,12 +44,13 @@
<FrameLayout
android:layout_height="wrap_content"
android:layout_width="wrap_content"
+ android:layout_gravity="center_vertical"
>
<ImageView
android:id="@+id/bluetooth"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
- android:scaleType="centerInside"
+ android:paddingRight="16dp"
android:visibility="gone"
android:contentDescription="@null"
android:layout_gravity="center_vertical"
@@ -61,7 +62,6 @@
android:id="@+id/mobile_icon"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
- android:paddingRight="4dp"
android:layout_gravity="center_vertical"
>
@@ -86,8 +86,8 @@
android:layout_gravity="left|center_vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:paddingRight="8dp"
- android:layout_weight="1"
+ android:paddingRight="12dp"
+ android:paddingLeft="6dp"
android:singleLine="true"
android:ellipsize="end"
android:text="@string/status_bar_settings_settings_button"
@@ -98,7 +98,6 @@
android:id="@+id/wifi_icon"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
- android:paddingRight="4dp"
android:layout_gravity="center_vertical"
>
@@ -123,7 +122,8 @@
android:layout_gravity="left|center_vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:paddingRight="8dp"
+ android:paddingLeft="6dp"
+ android:paddingRight="12dp"
android:singleLine="true"
android:ellipsize="end"
android:text="@string/status_bar_settings_settings_button"
@@ -136,18 +136,17 @@
android:scaleType="centerInside"
android:layout_gravity="center_vertical"
android:layout_alignBaseline="@id/wifi_signal"
- android:paddingLeft="8dp"
- android:paddingRight="8dp"
+ android:paddingRight="6dp"
android:contentDescription="@null"
/>
<TextView
android:id="@+id/battery_text"
style="@style/StatusBarNotificationText"
- android:layout_width="56dp"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="left|center_vertical"
- android:paddingRight="8dp"
+ android:paddingRight="2dp"
android:singleLine="true"
android:text="@string/status_bar_settings_settings_button"
/>
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java
index 0b05175..d09e680 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java
@@ -888,7 +888,9 @@ public class NetworkController extends BroadcastReceiver {
String mobileLabel = "";
int N;
- if (mDataConnected) {
+ if (!mHasMobileDataFeature) {
+ mDataSignalIconId = mPhoneSignalIconId = 0;
+ } else if (mDataConnected) {
mobileLabel = mNetworkName;
if (DEBUG) {
mobileLabel += "yyyyYYYYyyyyYYYY";
@@ -1029,8 +1031,13 @@ public class NetworkController extends BroadcastReceiver {
N = mPhoneSignalIconViews.size();
for (int i=0; i<N; i++) {
final ImageView v = mPhoneSignalIconViews.get(i);
- v.setImageResource(mPhoneSignalIconId);
- v.setContentDescription(mContentDescriptionPhoneSignal);
+ if (mPhoneSignalIconId == 0) {
+ v.setVisibility(View.GONE);
+ } else {
+ v.setVisibility(View.VISIBLE);
+ v.setImageResource(mPhoneSignalIconId);
+ v.setContentDescription(mContentDescriptionPhoneSignal);
+ }
}
}
@@ -1136,14 +1143,24 @@ public class NetworkController extends BroadcastReceiver {
N = mWifiLabelViews.size();
for (int i=0; i<N; i++) {
TextView v = mWifiLabelViews.get(i);
- v.setText(wifiLabel);
+ if ("".equals(wifiLabel)) {
+ v.setVisibility(View.GONE);
+ } else {
+ v.setVisibility(View.VISIBLE);
+ v.setText(wifiLabel);
+ }
}
// mobile label
N = mMobileLabelViews.size();
for (int i=0; i<N; i++) {
TextView v = mMobileLabelViews.get(i);
- v.setText(mobileLabel);
+ if ("".equals(mobileLabel)) {
+ v.setVisibility(View.GONE);
+ } else {
+ v.setVisibility(View.VISIBLE);
+ v.setText(mobileLabel);
+ }
}
}