权限未申请时的保护。

This commit is contained in:
u0u0
2020-01-27 16:58:02 +08:00
parent b81a44f5a8
commit 73ede7c37c

View File

@@ -17,6 +17,9 @@ public class PSDevice {
}
private static String getMacAddress() {
if (mContext == null) {
return null;
}
WifiManager wifi = (WifiManager) mContext.getApplicationContext()
.getSystemService(Context.WIFI_SERVICE);
WifiInfo info = wifi.getConnectionInfo();
@@ -38,4 +41,4 @@ public class PSDevice {
}
return id;
}
}
}