1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-02-20 20:09:11 +00:00

Add broadcast_media_mounted method to android device

New method to force a re-index of the mediaserver cache for the
specified directory. Used in workloads that require external media files
as dependencies.
This commit is contained in:
John Richardson 2016-08-31 10:18:34 +01:00
parent 5b59d101ef
commit b510b31052

View File

@ -682,6 +682,13 @@ class AndroidDevice(BaseLinuxDevice): # pylint: disable=W0223
except KeyError:
return None
def broadcast_media_mounted(self, dirpath):
"""
Force a re-index of the mediaserver cache for the specified directory.
"""
command = 'am broadcast -a android.intent.action.MEDIA_MOUNTED -d file://'
self.execute(command + dirpath)
# Internal methods: do not use outside of the class.
def _update_build_properties(self, props):