Adding retry in case of stale object exception

This util class is used by GTS tests and the fix 
attempts retry within timeout bounds. The fix would
help in reducing flake caused by StaleObjectException. 

Bug: 245383328
Test: m gts && gts-tradefed run gts -m GtsPermissionControllerHostTestCases -t android.permissioncontroller.gts.PermissionControllerHostTest#testViewPermissionManagerFragment
Change-Id: I95888cce46bd24641c2738352a7b3aa48841c8c8
1 file changed