Skip to content
Commit 8d16e1b7 authored by utzcoz's avatar utzcoz
Browse files

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: default avatarutzcoz <utzcoz@gmail.com>
parent e2ddd9d2
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment