am 8f4fe8fe: Merge "When the data flows, the icon glows." into honeycomb

* commit '8f4fe8fe17499362bfa5b922a509fc9c61ca4b71':
  When the data flows, the icon glows.
This commit is contained in:
Joe Onorato
2011-01-31 22:17:42 -08:00
committed by Android Git Automerger
34 changed files with 43 additions and 6 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 847 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 846 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 934 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 894 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 997 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 987 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1001 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 942 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 960 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1006 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 957 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -76,7 +76,9 @@ public class NetworkController extends BroadcastReceiver {
int mPhoneSignalIconId;
int mDataDirectionIconId;
int mDataSignalIconId;
int mDataActiveSignalIconId;
int mDataTypeIconId;
boolean mDataActive;
// wifi
final WifiManager mWifiManager;
@@ -365,15 +367,17 @@ public class NetworkController extends BroadcastReceiver {
if (Settings.System.getInt(mContext.getContentResolver(),
Settings.System.AIRPLANE_MODE_ON, 0) == 1) {
mPhoneSignalIconId = R.drawable.stat_sys_signal_flightmode;
mDataSignalIconId = R.drawable.stat_sys_signal_flightmode;
mDataActiveSignalIconId = mDataSignalIconId = R.drawable.stat_sys_signal_flightmode;
} else {
mPhoneSignalIconId = R.drawable.stat_sys_signal_null;
mDataSignalIconId = R.drawable.stat_sys_signal_0; // note we use 0 instead of null
// note we use 0 instead of null
mDataActiveSignalIconId = mDataSignalIconId = R.drawable.stat_sys_signal_0;
}
} else {
if (mSignalStrength == null) {
mPhoneSignalIconId = R.drawable.stat_sys_signal_null;
mDataSignalIconId = R.drawable.stat_sys_signal_0; // note we use 0 instead of null
// note we use 0 instead of null
mDataActiveSignalIconId = mDataSignalIconId = R.drawable.stat_sys_signal_0;
} else if (isCdma()) {
// If 3G(EV) and 1x network are available than 3G should be
// displayed, displayed RSSI should be from the EV side.
@@ -392,6 +396,8 @@ public class NetworkController extends BroadcastReceiver {
}
mPhoneSignalIconId = iconList[iconLevel];
mDataSignalIconId = TelephonyIcons.DATA_SIGNAL_STRENGTH[mInetCondition][iconLevel];
mDataActiveSignalIconId
= TelephonyIcons.DATA_SIGNAL_STRENGTH_ACTIVE[mInetCondition][iconLevel];
} else {
int asu = mSignalStrength.getGsmSignalStrength();
@@ -415,6 +421,8 @@ public class NetworkController extends BroadcastReceiver {
}
mPhoneSignalIconId = iconList[iconLevel];
mDataSignalIconId = TelephonyIcons.DATA_SIGNAL_STRENGTH[mInetCondition][iconLevel];
mDataActiveSignalIconId
= TelephonyIcons.DATA_SIGNAL_STRENGTH_ACTIVE[mInetCondition][iconLevel];
}
}
}
@@ -691,7 +699,16 @@ public class NetworkController extends BroadcastReceiver {
dataTypeIconId = 0;
} else if (mDataConnected) {
label = mNetworkName;
combinedSignalIconId = mDataSignalIconId;
switch (mDataActivity) {
case TelephonyManager.DATA_ACTIVITY_IN:
case TelephonyManager.DATA_ACTIVITY_OUT:
case TelephonyManager.DATA_ACTIVITY_INOUT:
combinedSignalIconId = mDataActiveSignalIconId;
break;
default:
combinedSignalIconId = mDataSignalIconId;
break;
}
dataTypeIconId = mDataTypeIconId;
} else if (mBluetoothTethered) {
label = mContext.getString(R.string.bluetooth_tethered);
@@ -705,13 +722,16 @@ public class NetworkController extends BroadcastReceiver {
if (false) {
Slog.d(TAG, "refreshViews combinedSignalIconId=0x"
+ Integer.toHexString(mPhoneSignalIconId)
+ Integer.toHexString(combinedSignalIconId)
+ "/" + getResourceName(combinedSignalIconId)
+ " mDataActivity=" + mDataActivity
+ " mPhoneSignalIconId=0x" + Integer.toHexString(mPhoneSignalIconId)
+ " mDataDirectionIconId=0x" + Integer.toHexString(mDataDirectionIconId)
+ " mDataSignalIconId=0x" + Integer.toHexString(mDataSignalIconId)
+ " mDataActiveSignalIconId=0x" + Integer.toHexString(mDataActiveSignalIconId)
+ " mDataTypeIconId=0x" + Integer.toHexString(mDataTypeIconId)
+ " mWifiIconId=0x" + Integer.toHexString(mWifiIconId)
+ "mBluetoothTetherIconId=0x" + Integer.toHexString(mBluetoothTetherIconId));
+ " mBluetoothTetherIconId=0x" + Integer.toHexString(mBluetoothTetherIconId));
}
// the phone icon on phones
@@ -814,6 +834,10 @@ public class NetworkController extends BroadcastReceiver {
pw.print(Integer.toHexString(mDataSignalIconId));
pw.print("/");
pw.println(getResourceName(mDataSignalIconId));
pw.print(" mDataActiveSignalIconId=");
pw.print(Integer.toHexString(mDataActiveSignalIconId));
pw.print("/");
pw.println(getResourceName(mDataActiveSignalIconId));
pw.print(" mDataTypeIconId=");
pw.print(Integer.toHexString(mDataTypeIconId));
pw.print("/");

View File

@@ -50,6 +50,19 @@ class TelephonyIcons {
static final int[][] DATA_SIGNAL_STRENGTH = TELEPHONY_SIGNAL_STRENGTH;
static final int[][] DATA_SIGNAL_STRENGTH_ACTIVE = {
{ R.drawable.stat_sys_signal_0,
R.drawable.stat_sys_signal_1_flowing,
R.drawable.stat_sys_signal_2_flowing,
R.drawable.stat_sys_signal_3_flowing,
R.drawable.stat_sys_signal_4_flowing },
{ R.drawable.stat_sys_signal_0_fully,
R.drawable.stat_sys_signal_1_fully_flowing,
R.drawable.stat_sys_signal_2_fully_flowing,
R.drawable.stat_sys_signal_3_fully_flowing,
R.drawable.stat_sys_signal_4_fully_flowing }
};
//***** Data connection icons
//GSM/UMTS