Index: build/android/gyp/apk_install.py |
diff --git a/build/android/gyp/apk_install.py b/build/android/gyp/apk_install.py |
index bdbfbf9213a3e07c416144429056207ea623c64e..f8e7caab8d562ec2923e2071c995544307e6dd94 100755 |
--- a/build/android/gyp/apk_install.py |
+++ b/build/android/gyp/apk_install.py |
@@ -14,7 +14,12 @@ import subprocess |
import sys |
from util import build_utils |
+from util import md5_check |
newt (away)
2013/04/04 03:07:08
is this a new file? did you forget to upload it?
cjhopman
2013/04/04 15:29:59
This was added with https://codereview.chromium.or
|
+BUILD_ANDROID_DIR = os.path.join(os.path.dirname(__file__), '..') |
+sys.path.append(BUILD_ANDROID_DIR) |
+ |
+from pylib import android_commands |
def main(argv): |
parser = optparse.OptionParser() |
@@ -32,7 +37,14 @@ def main(argv): |
'install', '-r', |
options.apk_path] |
- build_utils.CheckCallDie(install_cmd) |
+ serial_number = android_commands.AndroidCommands().Adb().GetSerialNumber() |
+ md5_stamp = '%s.%s.md5' % (options.apk_path, serial_number) |
+ |
+ md5_checker = md5_check.Md5Checker( |
+ stamp=md5_stamp, inputs=[options.apk_path], command=install_cmd) |
+ if md5_checker.IsStale(): |
+ build_utils.CheckCallDie(install_cmd) |
+ md5_checker.Write() |
if options.stamp: |
build_utils.Touch(options.stamp) |