[ATS] Fix testPreGrantsWithRemoteExceptions test

Fix by changing the signature of the failing method and taking in
PackageInfo, not packageName. This way we can remove the failing API
call to getPackageInfo() API and remove silent try catch block.

For more information, please see the bug.

Bug: 242576864
Test: run ats -m GtsPermissionTestCases -t com.google.android.permission.gts.DefaultPermissionGrantPolicyTest#testPreGrantsWithRemoteExceptions
Change-Id: Idad4df6e09f0727b7a893ad758bbada0f4f78362
1 file changed