[Title]Bug fix as sdblib is refactored
authorBonyong.lee <bonyong.lee@samsung.com>
Wed, 5 Jun 2013 07:49:45 +0000 (16:49 +0900)
committerBon-Yong Lee <bonyong.lee@samsung.com>
Wed, 5 Jun 2013 08:02:32 +0000 (17:02 +0900)
[Type]
[Module]
[Priority]
[CQ#]
[Redmine#]
[Problem]
[Cause]
[Solution]

org.tizen.common.sdblib/src/org/tizen/sdblib/SdbHelper.java
org.tizen.common.sdblib/src/org/tizen/sdblib/service/SyncService.java

index c59d059..5b169f8 100644 (file)
@@ -404,7 +404,7 @@ public class SdbHelper {
                 throw new IOException("channel EOF");
             } else if (count == 0) {
                 // TODO: need more accurate timeout?
-                if (timeout != 0 && numWaits * WAIT_TIME > timeout) {
+                if ( 0 < timeout && numWaits * WAIT_TIME > timeout) {
                     Log.d("sdb", "write: timeout");
                     throw new TimeoutException();
                 }
index 7efbe52..5459222 100644 (file)
@@ -267,10 +267,12 @@ implements Closeable
     doPull(
        final FileEntry remote,
        final OutputStream out,
-       final ISyncProgressMonitor monitor,
+       ISyncProgressMonitor monitor,
        final int timeOut
     )
     {
+       monitor = nvl( monitor, NullSyncProgressMonitor.getInstance() );
+       
        // access the destination file
 
        // create the stream to write in the file. We use a new try/catch block to differentiate