Use a mock PackageManager instead of the real one
The PackageManagerBackupAgent tests require an installed and
not-installed package to test different cases. Originally I used
`com.android.wallpaperbackup` as the installed package, as I thought
that would always be available. However, it turns out that not all form
factors may have this package.
Rather than trying to find a different package that is guaranteed to
always be installed, I've replaced the package manager with a mock. This
will also prevent future test breakages if the chosen package would ever
get removed.
Test: atest PackageManagerBackupAgent
Bug: 277594991
Bug: 330602059
Change-Id: I3ee899a11949dbb8531ff272d433c964f411c5f7
1 file changed