Skip to content

Commit

Permalink
Fixed isBatteryCharging type from string to boolean
Browse files Browse the repository at this point in the history
  • Loading branch information
andreshj87 committed Dec 13, 2016
1 parent 32a56b9 commit b67d327
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public interface DeviceDetailsInfo {

String getBatteryPercentage();

String isBatteryCharging();
boolean isBatteryCharging();

String getNetworkConnectivity();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public class FeedbackWrapper {
final private String osVersion;
final private String deviceId;
final private String batteryPercentage;
final private String isBatteryCharging;
final private boolean isBatteryCharging;
final private String networkConnectivity;
final private String screenResolution;
final private String ramUsed;
Expand All @@ -51,7 +51,7 @@ public class FeedbackWrapper {
public FeedbackWrapper(String packageName, String appVersionName, String osName, String screen,
String screenShotBase64, String feedBackMessage, String vendor, String model, String type,
String appId, String bugType, String osVersion, String deviceId, String batteryPercentage,
String isBatteryCharging, String networkConnectivity, String screenResolution, String ramUsed,
boolean isBatteryCharging, String networkConnectivity, String screenResolution, String ramUsed,
String ramTotal, String freeDiskPercentage, String screenOrientation) {

this.packageName = packageName;
Expand Down Expand Up @@ -164,7 +164,7 @@ public String getBatteryPercentage() {
return batteryPercentage;
}

public String getIsBatteryCharging() {
public boolean isBatteryCharging() {
return isBatteryCharging;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class ApiDeviceData {
@SerializedName("type") @Expose private final String type;
@SerializedName("id") @Expose private final String id;
@SerializedName("battery") @Expose private final String battery;
@SerializedName("batteryStatus") @Expose private final String batteryStatus;
@SerializedName("batteryStatus") @Expose private final boolean batteryStatus;
@SerializedName("network") @Expose private final String network;
@SerializedName("resolution") @Expose private final String resolution;
@SerializedName("ramUsed") @Expose private final String ramUsed;
Expand All @@ -39,7 +39,7 @@ public class ApiDeviceData {
@SerializedName("orientation") @Expose private final String orientation;

public ApiDeviceData(String model, String vendor, String type, String id, String battery,
String batteryStatus, String network, String resolution, String ramUsed, String ramTotal,
boolean batteryStatus, String network, String resolution, String ramUsed, String ramTotal,
String diskFree, String orientation) {
this.model = model;
this.vendor = vendor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public class ApiDeviceRequestMapper implements RequestMapper<FeedbackWrapper, Ap
String type = feedbackWrapper.getType();
String deviceId = feedbackWrapper.getDeviceId();
String batteryPercentage = feedbackWrapper.getBatteryPercentage();
String isBatteryCharging = feedbackWrapper.getIsBatteryCharging();
boolean isBatteryCharging = feedbackWrapper.isBatteryCharging();
String networkConnectivity = feedbackWrapper.getNetworkConnectivity();
String screenResolution = feedbackWrapper.getScreenResolution();
String ramUsed = feedbackWrapper.getRamUsed();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public class AndroidDeviceDetailsInfo implements DeviceDetailsInfo {
return batteryPercentage;
}

@Override public String isBatteryCharging() {
@Override public boolean isBatteryCharging() {
Context context = AppliverySdk.getApplicationContext();
boolean isBatteryCharging = false;
Intent batteryStatus = getBatteryStatus(context);
Expand All @@ -130,7 +130,7 @@ public class AndroidDeviceDetailsInfo implements DeviceDetailsInfo {
isBatteryCharging = isBatteryCharging || plugged == BatteryManager.BATTERY_PLUGGED_WIRELESS;
}

return String.valueOf(isBatteryCharging);
return isBatteryCharging;
}

@Override public String getNetworkConnectivity() {
Expand Down

0 comments on commit b67d327

Please sign in to comment.