1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package com.simpligility.maven.plugins.android.common;
17
18
19 import com.android.ddmlib.SyncService;
20 import org.apache.maven.plugin.logging.Log;
21
22
23
24
25
26
27
28 public class LogSyncProgressMonitor implements SyncService.ISyncProgressMonitor
29 {
30 private static final String INDENT = " ";
31 private Log log;
32
33 public LogSyncProgressMonitor( Log log )
34 {
35 this.log = log;
36 }
37
38 public void start( int totalWork )
39 {
40 log.info( "Starting transfer of " + totalWork + ". See debug log for progress" );
41 }
42
43 public void stop()
44 {
45 log.info( "Stopped transfer" );
46 }
47
48 public boolean isCanceled()
49 {
50 return false;
51 }
52
53 public void startSubTask( String name )
54 {
55 log.info( INDENT + "Started sub task " + name );
56 }
57
58 public void advance( int work )
59 {
60 log.debug( INDENT + "Transferred " + work );
61 }
62 }