version:2.0
fix:修复获取个人信息失败 add:
This commit is contained in:
@@ -1580,11 +1580,19 @@ public class NetInterfaceManager {
|
||||
softwareJson.addProperty("learning_version", ApkUtils.getAPPVersionName(mContext, "com.info.learning"));
|
||||
softwareJson.addProperty("chat_version", ApkUtils.getAPPVersionName(mContext, "com.info.chat"));
|
||||
softwareJson.addProperty("jpush_id", JPushInterface.getRegistrationID(mContext));
|
||||
softwareJson.addProperty("notice_version", ApkUtils.getAPPVersionName(mContext, "com.uiui.info"));
|
||||
softwareJson.addProperty("browser_version", ApkUtils.getAPPVersionName(mContext, "com.uiui.browser"));
|
||||
softwareJson.addProperty("desktop_version", ApkUtils.getAPPVersionName(mContext, "com.uiui.os"));
|
||||
|
||||
String addr = jsonObject.toString();
|
||||
String machine = Utils.getMachine(mContext);
|
||||
String hardware = Utils.getHardware(mContext);
|
||||
Log.e(TAG, "updateAdminInfo: getHardware = " + hardware);
|
||||
String software = softwareJson.toString();
|
||||
if (BuildConfig.DEBUG){
|
||||
Log.e(TAG, "updateAdminInfo: machine = " + machine);
|
||||
Log.e(TAG, "updateAdminInfo: getHardware = " + hardware);
|
||||
Log.e(TAG, "updateAdminInfo: software = " + software);
|
||||
}
|
||||
getUpdateAdminSnControl().sendAdminSn(
|
||||
Utils.getSerial(),
|
||||
addr,
|
||||
|
||||
@@ -1007,7 +1007,12 @@ public class Utils {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static void getBatterymAh(Context context) {
|
||||
/**
|
||||
* 获取电池容量
|
||||
* @param context
|
||||
* @return
|
||||
*/
|
||||
public static double getBatterymAh(Context context) {
|
||||
Object mPowerProfile;
|
||||
double batteryCapacity = 0; //电池的容量mAh
|
||||
final String POWER_PROFILE_CLASS = "com.android.internal.os.PowerProfile";
|
||||
@@ -1019,6 +1024,7 @@ public class Utils {
|
||||
Log.e("getBattery", "get batteryCapacity mAh error:" + batteryCapacity);
|
||||
e.printStackTrace();
|
||||
}
|
||||
return batteryCapacity;
|
||||
}
|
||||
|
||||
synchronized private static int getBatteryLevel(Context mContext) {
|
||||
@@ -1226,6 +1232,7 @@ public class Utils {
|
||||
jsonObject.put("wifi_ssid", getWifiSSID(context));
|
||||
jsonObject.put("wifi_time", wifi_time);
|
||||
jsonObject.put("boot_time", SystemClock.elapsedRealtime());
|
||||
jsonObject.put("battery_capacity", Utils.getBatterymAh(context));
|
||||
Log.e(TAG, "getHardware: " + jsonObject.toJSONString());
|
||||
return jsonObject.toJSONString();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user