Merge "Improve flakiness of PlatformCompatGating test" am: d500b8afd6 am: 8fabad25ca
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1556300 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: Iaaca84851e4085b979bd2d6a7566469a4ff367b5
This commit is contained in:
committed by
Automerger Merge Worker
commit
e0f9b5217a
@@ -131,6 +131,10 @@ class PlatformCompatCommandNotInstalledTest {
|
|||||||
assertThat(platformCompat.isChangeEnabled(TEST_CHANGE_ID, appInfo)).isEqualTo(params.result)
|
assertThat(platformCompat.isChangeEnabled(TEST_CHANGE_ID, appInfo)).isEqualTo(params.result)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun command(command: String) =
|
private fun command(command: String): String {
|
||||||
FileReader(uiAutomation.executeShellCommand(command).fileDescriptor).readText()
|
val fileDescriptor = uiAutomation.executeShellCommand(command)
|
||||||
|
return String(ParcelFileDescriptor.AutoCloseInputStream(fileDescriptor).use {
|
||||||
|
inputStream -> inputStream.readBytes()
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user