summaryrefslogtreecommitdiffstats
path: root/build/android/pylib/screenshot.py
diff options
context:
space:
mode:
Diffstat (limited to 'build/android/pylib/screenshot.py')
-rw-r--r--build/android/pylib/screenshot.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/build/android/pylib/screenshot.py b/build/android/pylib/screenshot.py
index e21d756..2704631 100644
--- a/build/android/pylib/screenshot.py
+++ b/build/android/pylib/screenshot.py
@@ -5,6 +5,7 @@
import os
import signal
import tempfile
+import time
from pylib import cmd_helper
@@ -82,10 +83,13 @@ class VideoRecorder(object):
Returns:
Output video file name on the host.
"""
- host_file_name = host_file or ('screen-recording-%s.mp4' %
- self._device.old_interface.GetTimestamp())
+ # TODO(jbudorick): Merge filename generation with the logic for doing so in
+ # DeviceUtils.
+ host_file_name = (
+ host_file
+ or 'screen-recording-%s.mp4' % time.strftime('%Y%m%dT%H%M%S',
+ time.localtime()))
host_file_name = os.path.abspath(host_file_name)
- self._device.old_interface.EnsureHostDirectory(host_file_name)
self._device.PullFile(self._device_file, host_file_name)
self._device.RunShellCommand('rm -f "%s"' % self._device_file)
return host_file_name