Commit 82c80498 by sikang

bug fix

parent 84db658a
......@@ -123,6 +123,7 @@ public class DeviceUtils {
* 如果APP更改了语言,需要在更改之前初始化
*/
public void init(Context context) {
try {
deviceInfoBean.setScreenWidth(context.getResources().getDisplayMetrics().widthPixels);
deviceInfoBean.setScreenHeight(context.getResources().getDisplayMetrics().heightPixels);
deviceInfoBean.setRoot(AppInfoUtils.isRoot());
......@@ -143,12 +144,16 @@ public class DeviceUtils {
deviceInfoBean.setBaseBandVersion(getBaseBandVersion());
deviceInfoBean.setBattery(getBattery(context));
deviceInfoBean.setBluetooth(Settings.Secure.getString(context.getContentResolver(), "bluetooth_address"));
deviceInfoBean.setCameraNum(Camera.getNumberOfCameras());
deviceInfoBean.setDebug((Settings.Secure.getInt(context.getContentResolver(), Settings.Secure.ADB_ENABLED, 0) > 0));
deviceInfoBean.setSimulator(isSimulator());
deviceInfoBean.setKernelVersion(getKernelVersion());
deviceInfoBean.setMacAddress(getMacAddress());
deviceInfoBean.setUpTime(SystemClock.elapsedRealtime());
deviceInfoBean.setCameraNum(Camera.getNumberOfCameras());
}catch (Exception e){
}
// WifiManager wifi = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);
// deviceInfoBean.setWifiSsid(wifi.getConnectionInfo().getSSID());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment