diff options
| author | 2020-06-26 14:13:07 +0800 | |
|---|---|---|
| committer | 2021-06-05 19:44:14 +0800 | |
| commit | 8d16e1b7de9c9faf1b11045d130b6df2a8203ca1 (patch) | |
| tree | 168b1cad03a9609e3bed3210c8fb96e846499ff0 /libs/androidfw/misc.cpp | |
| parent | e2ddd9d277876ee33e8526a792d0bc9538de6dfc (diff) | |
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>
Diffstat (limited to 'libs/androidfw/misc.cpp')
0 files changed, 0 insertions, 0 deletions