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

Unified Diff: build/android/devil/android/apk_helper.py

Issue 1316803004: [Android] Set permission when installing apks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | build/android/devil/android/device_utils.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/devil/android/apk_helper.py
diff --git a/build/android/devil/android/apk_helper.py b/build/android/devil/android/apk_helper.py
index 8b2d9179653bdd44f6aece6011badeed50de77bd..0159ad100c09baa2487e49ba86dd370ba001f6fc 100644
--- a/build/android/devil/android/apk_helper.py
+++ b/build/android/devil/android/apk_helper.py
@@ -111,6 +111,13 @@ class ApkHelper(object):
return self._package_name
raise Exception('Failed to determine package name of %s' % self._apk_path)
+ def GetPermissions(self):
+ manifest_info = self._GetManifest()
+ try:
+ return manifest_info['manifest']['uses-permission']['android:name']
+ except KeyError:
+ return []
+
def GetSplitName(self):
"""Returns the name of the split of the apk."""
if self._split_name:
« no previous file with comments | « no previous file | build/android/devil/android/device_utils.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698