Skip to content

Commit 0eee256

Browse files
committed
see 04/27 log
1 parent 3c00472 commit 0eee256

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

.travis.yml

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ android:
1919
licenses:
2020
- android-sdk-license-.+
2121
- '.+'
22+
2223
notifications:
2324
email: false
2425

app/proguard-rules.pro

+1-5
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,4 @@
1414
# class:
1515
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
1616
# public *;
17-
#}
18-
19-
-keep class com.blankj.utilcode.** { *; }
20-
-keep classmembers class com.blankj.utilcode.** { *; }
21-
-dontwarn com.blankj.utilcode.**
17+
#}

utilcode/src/main/java/com/blankj/utilcode/util/DeviceUtils.java

+1
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ public static String getMacAddress() {
9797
@SuppressLint("HardwareIds")
9898
private static String getMacAddressByWifiInfo() {
9999
try {
100+
@SuppressLint("WifiManagerLeak")
100101
WifiManager wifi = (WifiManager) Utils.getContext().getSystemService(Context.WIFI_SERVICE);
101102
if (wifi != null) {
102103
WifiInfo info = wifi.getConnectionInfo();

utilcode/src/main/java/com/blankj/utilcode/util/NetworkUtils.java

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package com.blankj.utilcode.util;
22

3+
import android.annotation.SuppressLint;
34
import android.content.Context;
45
import android.content.Intent;
56
import android.net.ConnectivityManager;
@@ -147,6 +148,7 @@ public static boolean is4G() {
147148
* @return {@code true}: 是<br>{@code false}: 否
148149
*/
149150
public static boolean getWifiEnabled() {
151+
@SuppressLint("WifiManagerLeak")
150152
WifiManager wifiManager = (WifiManager) Utils.getContext().getSystemService(Context.WIFI_SERVICE);
151153
return wifiManager.isWifiEnabled();
152154
}
@@ -158,6 +160,7 @@ public static boolean getWifiEnabled() {
158160
* @param enabled {@code true}: 打开<br>{@code false}: 关闭
159161
*/
160162
public static void setWifiEnabled(boolean enabled) {
163+
@SuppressLint("WifiManagerLeak")
161164
WifiManager wifiManager = (WifiManager) Utils.getContext().getSystemService(Context.WIFI_SERVICE);
162165
if (enabled) {
163166
if (!wifiManager.isWifiEnabled()) {

0 commit comments

Comments
 (0)