am 639ed754
: Hide mobile RSSI on devices without mobile data.
* commit '639ed754bba866d2a47ef7ca58e56806b546b149': Hide mobile RSSI on devices without mobile data.
This commit is contained in:
@ -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"
|
||||
/>
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user