Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(337)

Side by Side Diff: build/android/gyp/util/build_device.py

Issue 1166113002: Add InstallSplitApk function to device utils. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Copyright 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """ A simple device interface for build steps. 5 """ A simple device interface for build steps.
6 6
7 """ 7 """
8 8
9 import logging 9 import logging
10 import os 10 import os
(...skipping 24 matching lines...) Expand all
35 35
36 def PushChangedFiles(self, *args, **kwargs): 36 def PushChangedFiles(self, *args, **kwargs):
37 return self.device.PushChangedFiles(*args, **kwargs) 37 return self.device.PushChangedFiles(*args, **kwargs)
38 38
39 def GetSerialNumber(self): 39 def GetSerialNumber(self):
40 return self.id 40 return self.id
41 41
42 def Install(self, *args, **kwargs): 42 def Install(self, *args, **kwargs):
43 return self.device.Install(*args, **kwargs) 43 return self.device.Install(*args, **kwargs)
44 44
45 def InstallSplitApk(self, *args, **kwargs):
46 return self.device.InstallSplitApk(*args, **kwargs)
47
45 def GetInstallMetadata(self, apk_package): 48 def GetInstallMetadata(self, apk_package):
46 """Gets the metadata on the device for the apk_package apk.""" 49 """Gets the metadata on the device for the apk_package apk."""
47 # Matches lines like: 50 # Matches lines like:
48 # -rw-r--r-- system system 7376582 2013-04-19 16:34 \ 51 # -rw-r--r-- system system 7376582 2013-04-19 16:34 \
49 # org.chromium.chrome.shell.apk 52 # org.chromium.chrome.shell.apk
50 # -rw-r--r-- system system 7376582 2013-04-19 16:34 \ 53 # -rw-r--r-- system system 7376582 2013-04-19 16:34 \
51 # org.chromium.chrome.shell-1.apk 54 # org.chromium.chrome.shell-1.apk
52 apk_matcher = lambda s: re.match('.*%s(-[0-9]*)?.apk$' % apk_package, s) 55 apk_matcher = lambda s: re.match('.*%s(-[0-9]*)?.apk$' % apk_package, s)
53 matches = filter(apk_matcher, self.install_metadata) 56 matches = filter(apk_matcher, self.install_metadata)
54 return matches[0] if matches else None 57 return matches[0] if matches else None
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 assert len(configurations) == 1 99 assert len(configurations) == 1
97 return BuildDevice(configurations[0]) 100 return BuildDevice(configurations[0])
98 101
99 102
100 def GetBuildDeviceFromPath(path): 103 def GetBuildDeviceFromPath(path):
101 configurations = ReadConfigurations(path) 104 configurations = ReadConfigurations(path)
102 if len(configurations) > 0: 105 if len(configurations) > 0:
103 return GetBuildDevice(ReadConfigurations(path)) 106 return GetBuildDevice(ReadConfigurations(path))
104 return None 107 return None
105 108
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698