把平板右上角的wifi状态图标从白色变成蓝色。。改动代码把SystemUI导入到设备后需要reboot重启一下才奏效。
这是A33-v2.0 d901的代码里面没有蓝色wifi的图标,我把a23-v2.0的资源拷贝过来了,并且代码修改如下:
niming@ubuntu:/home/user/workspace2/niming/a33-v2.0/android/frameworks/base/packages/SystemUI$ git diff src/com/android/systemui/statusbar/policy/WifiIcons.java
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/WifiIcons.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/WifiIcons.java
old mode 100644
new mode 100755
index 57ddf7a..fe06469
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/WifiIcons.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/WifiIcons.java
@@ -20,11 +20,11 @@ import com.android.systemui.R;
class WifiIcons {
static final int[][] WIFI_SIGNAL_STRENGTH = {
- { R.drawable.stat_sys_wifi_signal_0,
- R.drawable.stat_sys_wifi_signal_1_fully,
- R.drawable.stat_sys_wifi_signal_2_fully,
- R.drawable.stat_sys_wifi_signal_3_fully,
- R.drawable.stat_sys_wifi_signal_4_fully },
+ { R.drawable.stat_sys_wifi_signal_0,
+ R.drawable.stat_sys_wifi_signal_1_fully_nm,
+ R.drawable.stat_sys_wifi_signal_2_fully_nm,
+ R.drawable.stat_sys_wifi_signal_3_fully_nm,
+ R.drawable.stat_sys_wifi_signal_4_fully_nm },
{ R.drawable.stat_sys_wifi_signal_0,
R.drawable.stat_sys_wifi_signal_1_fully,
R.drawable.stat_sys_wifi_signal_2_fully,
如果蓝牙信号为满格的话,它会过一会儿有蓝色的图标编程白色的图标,因为代码里选择了该二维数组的第二组数据里的最后一个数据R.drawable.stat_sys_wifi_signal_4_fully,则修改代码如下:
niming@ubuntu:/home/user/workspace2/niming/a33-v2.0/android/frameworks/base/packages/SystemUI$ git diff src/com/android/systemui/statusbar/policy/NetworkController.java
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.
index 19846e4..ff69135 100755
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java
@@ -1027,7 +1027,7 @@ public class NetworkController extends BroadcastReceiver implements DemoMode {
Log.d(TAG, "updateConnectivity: connectionStatus=" + connectionStatus);
}
- mInetCondition = (connectionStatus > INET_CONDITION_THRESHOLD ? 1 : 0);
+// mInetCondition = (connectionStatus > INET_CONDITION_THRESHOLD ? 1 : 0);
if (info != null && info.getType() == ConnectivityManager.TYPE_BLUETOOTH) {
mBluetoothTethered = info.isConnected();
https://coding.imooc.com/class/267.html#Anchor 最近在看这个。