| Index: build/android/pylib/local/device/local_device_instrumentation_test_run.py
|
| diff --git a/build/android/pylib/local/device/local_device_instrumentation_test_run.py b/build/android/pylib/local/device/local_device_instrumentation_test_run.py
|
| index fd7cfbbad34d80352cac2630712f3eeeac0e139f..2d574de1fd2017149062cb63c9c4eb12e6023bad 100644
|
| --- a/build/android/pylib/local/device/local_device_instrumentation_test_run.py
|
| +++ b/build/android/pylib/local/device/local_device_instrumentation_test_run.py
|
| @@ -268,7 +268,13 @@ class LocalDeviceInstrumentationTestRun(
|
| logging.info(' %s', l)
|
| if (not self._env.skip_clear_data
|
| and self._test_instance.package_info):
|
| - device.ClearApplicationState(self._test_instance.package_info.package)
|
| + permissions = (
|
| + self._test_instance.apk_under_test.GetPermissions()
|
| + if self._test_instance.apk_under_test
|
| + else None)
|
| + device.ClearApplicationState(self._test_instance.package_info.package,
|
| + permissions=permissions)
|
| +
|
| else:
|
| logging.debug('raw output from %s:', test_display_name)
|
| for l in output:
|
|
|