summaryrefslogtreecommitdiff
path: root/ddms
diff options
context:
space:
mode:
authorKeiji Ariyama <keiji_ariyama@c-lis.co.jp>2014-05-11 21:43:03 +0900
committerSiva Velusamy <vsiva@google.com>2014-05-12 15:19:44 +0000
commit6d5c9d36bba6e2a9f689119ae36ae4da355a748c (patch)
tree387167b185e10267f4cf99ca79dba0b4466ed371 /ddms
parentf337ff6c482a59fda897e659db68f7da0b6cf960 (diff)
downloadswt-6d5c9d36bba6e2a9f689119ae36ae4da355a748c.tar.gz
Showing recording time at screen record.
Change-Id: Ic404bb38ae0f20c1ad3aba34a90f0d2f68f8d288
Diffstat (limited to 'ddms')
-rw-r--r--ddms/ddmuilib/src/main/java/com/android/ddmuilib/screenrecord/ScreenRecorderAction.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/ddms/ddmuilib/src/main/java/com/android/ddmuilib/screenrecord/ScreenRecorderAction.java b/ddms/ddmuilib/src/main/java/com/android/ddmuilib/screenrecord/ScreenRecorderAction.java
index d7c57a5..2cdaee1 100644
--- a/ddms/ddmuilib/src/main/java/com/android/ddmuilib/screenrecord/ScreenRecorderAction.java
+++ b/ddms/ddmuilib/src/main/java/com/android/ddmuilib/screenrecord/ScreenRecorderAction.java
@@ -76,6 +76,7 @@ public class ScreenRecorderAction {
@Override
public void run(IProgressMonitor monitor)
throws InvocationTargetException, InterruptedException {
+ int timeInSecond = 0;
monitor.beginTask("Recording...", IProgressMonitor.UNKNOWN);
while (true) {
@@ -84,10 +85,15 @@ public class ScreenRecorderAction {
break;
}
+ // update recording time in second
+ monitor.subTask(String.format("Recording...%d seconds elapsed", timeInSecond++);
+
// If not, check if user has cancelled
if (monitor.isCanceled()) {
receiver.cancel();
+ monitor.subTask("Stopping...");
+
// wait for an additional second to make sure that the command
// completed and screenrecorder finishes writing the output
latch.await(1, TimeUnit.SECONDS);