diff options
author | Joe Onorato <joeo@google.com> | 2011-01-31 20:28:59 -0800 |
---|---|---|
committer | Joe Onorato <joeo@google.com> | 2011-01-31 20:28:59 -0800 |
commit | c198bb1db8c16789a815b5fa2b393e113047bd47 (patch) | |
tree | 107d5778d720113d2235612f91b75c406b1b640f /packages | |
parent | 6ab77bd5b3e613b064ebfa5780f21b79f81390a9 (diff) | |
download | frameworks_base-c198bb1db8c16789a815b5fa2b393e113047bd47.zip frameworks_base-c198bb1db8c16789a815b5fa2b393e113047bd47.tar.gz frameworks_base-c198bb1db8c16789a815b5fa2b393e113047bd47.tar.bz2 |
When the data flows, the icon glows.
Bug: 3354414
Change-Id: I1734c8f63d02731d7194364ce7cb692d6de820ac
Diffstat (limited to 'packages')
34 files changed, 43 insertions, 6 deletions
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_flowing.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_flowing.png Binary files differnew file mode 100644 index 0000000..76332c1 --- /dev/null +++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_flowing.png diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_fully_flowing.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_fully_flowing.png Binary files differnew file mode 100644 index 0000000..3b8aff4 --- /dev/null +++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_fully_flowing.png diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_flowing.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_flowing.png Binary files differnew file mode 100644 index 0000000..54e02b5 --- /dev/null +++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_flowing.png diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_fully_flowing.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_fully_flowing.png Binary files differnew file mode 100644 index 0000000..046c9a0 --- /dev/null +++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_fully_flowing.png diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_flowing.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_flowing.png Binary files differnew file mode 100644 index 0000000..21f90b0 --- /dev/null +++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_flowing.png diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_fully_flowing.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_fully_flowing.png Binary files differnew file mode 100644 index 0000000..1456eea --- /dev/null +++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_fully_flowing.png diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_flowing.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_flowing.png Binary files differnew file mode 100644 index 0000000..a2675e9 --- /dev/null +++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_flowing.png diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_fully_flowing.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_fully_flowing.png Binary files differnew file mode 100644 index 0000000..96a205f --- /dev/null +++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_fully_flowing.png diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_wifi_signal_1_flowing.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_wifi_signal_1_flowing.png Binary files differnew file mode 100644 index 0000000..c6267a4 --- /dev/null +++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_wifi_signal_1_flowing.png diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_wifi_signal_1_fully_flowing.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_wifi_signal_1_fully_flowing.png Binary files differnew file mode 100644 index 0000000..5e42b55 --- /dev/null +++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_wifi_signal_1_fully_flowing.png diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_wifi_signal_2_flowing.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_wifi_signal_2_flowing.png Binary files differnew file mode 100644 index 0000000..bd400b5 --- /dev/null +++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_wifi_signal_2_flowing.png diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_wifi_signal_2_fully_flowing.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_wifi_signal_2_fully_flowing.png Binary files differnew file mode 100644 index 0000000..4dab171 --- /dev/null +++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_wifi_signal_2_fully_flowing.png diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_wifi_signal_3_flowing.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_wifi_signal_3_flowing.png Binary files differnew file mode 100644 index 0000000..9c868f1 --- /dev/null +++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_wifi_signal_3_flowing.png diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_wifi_signal_3_fully_flowing.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_wifi_signal_3_fully_flowing.png Binary files differnew file mode 100644 index 0000000..e3a3cec --- /dev/null +++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_wifi_signal_3_fully_flowing.png diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_wifi_signal_4_flowing.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_wifi_signal_4_flowing.png Binary files differnew file mode 100644 index 0000000..b9ba6d5 --- /dev/null +++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_wifi_signal_4_flowing.png diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_wifi_signal_4_fully_flowing.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_wifi_signal_4_fully_flowing.png Binary files differnew file mode 100644 index 0000000..0ad77f1 --- /dev/null +++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_wifi_signal_4_fully_flowing.png diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_flowing.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_flowing.png Binary files differnew file mode 100644 index 0000000..0de5760 --- /dev/null +++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_flowing.png diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_fully_flowing.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_fully_flowing.png Binary files differnew file mode 100644 index 0000000..e042696 --- /dev/null +++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_fully_flowing.png diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_flowing.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_flowing.png Binary files differnew file mode 100644 index 0000000..88b08c8 --- /dev/null +++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_flowing.png diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_fully_flowing.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_fully_flowing.png Binary files differnew file mode 100644 index 0000000..940adf0 --- /dev/null +++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_fully_flowing.png diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_flowing.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_flowing.png Binary files differnew file mode 100644 index 0000000..3f4dedd --- /dev/null +++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_flowing.png diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_fully_flowing.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_fully_flowing.png Binary files differnew file mode 100644 index 0000000..83045ce --- /dev/null +++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_fully_flowing.png diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_flowing.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_flowing.png Binary files differnew file mode 100644 index 0000000..f5c0aa3 --- /dev/null +++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_flowing.png diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_fully_flowing.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_fully_flowing.png Binary files differnew file mode 100644 index 0000000..429e818 --- /dev/null +++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_fully_flowing.png diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_wifi_signal_1_flowing.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_wifi_signal_1_flowing.png Binary files differnew file mode 100644 index 0000000..42a798a --- /dev/null +++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_wifi_signal_1_flowing.png diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_wifi_signal_1_fully_flowing.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_wifi_signal_1_fully_flowing.png Binary files differnew file mode 100644 index 0000000..1643e6e --- /dev/null +++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_wifi_signal_1_fully_flowing.png diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_wifi_signal_2_flowing.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_wifi_signal_2_flowing.png Binary files differnew file mode 100644 index 0000000..06ae2ca --- /dev/null +++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_wifi_signal_2_flowing.png diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_wifi_signal_2_fully_flowing.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_wifi_signal_2_fully_flowing.png Binary files differnew file mode 100644 index 0000000..8f1831d --- /dev/null +++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_wifi_signal_2_fully_flowing.png diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_wifi_signal_3_flowing.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_wifi_signal_3_flowing.png Binary files differnew file mode 100644 index 0000000..12138d3 --- /dev/null +++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_wifi_signal_3_flowing.png diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_wifi_signal_3_fully_flowing.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_wifi_signal_3_fully_flowing.png Binary files differnew file mode 100644 index 0000000..11fd5e9 --- /dev/null +++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_wifi_signal_3_fully_flowing.png diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_wifi_signal_4_flowing.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_wifi_signal_4_flowing.png Binary files differnew file mode 100644 index 0000000..8bbc5ba --- /dev/null +++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_wifi_signal_4_flowing.png diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_wifi_signal_4_fully_flowing.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_wifi_signal_4_fully_flowing.png Binary files differnew file mode 100644 index 0000000..c817598 --- /dev/null +++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_wifi_signal_4_fully_flowing.png 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 a4c153f..c94f9ee 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java @@ -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("/"); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/TelephonyIcons.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/TelephonyIcons.java index 94c68ac..29d35e3 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/TelephonyIcons.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/TelephonyIcons.java @@ -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 |