|
@@ -761,7 +761,8 @@ public class UploadFileOperation extends SyncOperation {
|
|
|
}
|
|
|
|
|
|
// check if charging conditions are met and delays the upload otherwise
|
|
|
- if (mWhileChargingOnly && !Device.getBatteryStatus(mContext).isCharging()) {
|
|
|
+ if (mWhileChargingOnly && (!Device.getBatteryStatus(mContext).isCharging() && Device.getBatteryStatus(mContext)
|
|
|
+ .getBatteryPercent() < 1)) {
|
|
|
Log_OC.d(TAG, "Upload delayed until the device is charging: " + getRemotePath());
|
|
|
remoteOperationResult = new RemoteOperationResult(ResultCode.DELAYED_FOR_CHARGING);
|
|
|
return remoteOperationResult;
|