Fix failed tests for ApplicationPackageManagerTest

The getPackageCandidateVolumes of ApplicationPackageManager is protected
and @VisibleForTest, but ApplicationPackageManagerTest uses
MockApplicationPackageManager to extend it, and @VisibleForTest is lost
after extending. So this patch just adds override for this method, and
adds @VisibleForTest back for it.

Also, the Mockito.anyString() for isPackageDeviceAdminOnAnyUser mock
doesn't work correctly, so this patch replace it with real input
parameter - appInfo.packageName.

Test: atest android.app.ApplicationPackageManagerTest

Change-Id: I9261a432911756a48978a7028781e60039cb4c85
Signed-off-by: utzcoz <utzcoz@gmail.com>
1 file changed