Without this, the mocked version looks like it's calling
the default implementation (which immediately fails due to
a bunch of null fields) - with this it just returns null.
I would ultimately like to stop mocking out the controller
and instead use a mocked package manager (which there is
already some set up to do). But in the meanwhile, this at least
gets the test passing.
Test: Checked the test passes.
Change-Id: I92d1f2796cfce21bf55e927bd56690c582f41e91
}
@VisibleForTesting
- ResolveInfo getLastChosen() throws RemoteException {
+ public ResolveInfo getLastChosen() throws RemoteException {
return AppGlobals.getPackageManager().getLastChosenActivity(
mTargetIntent, mTargetIntent.resolveTypeIfNeeded(mContext.getContentResolver()),
PackageManager.MATCH_DEFAULT_ONLY);
}
@VisibleForTesting
- void setLastChosen(Intent intent, IntentFilter filter, int match)
+ public void setLastChosen(Intent intent, IntentFilter filter, int match)
throws RemoteException {
AppGlobals.getPackageManager().setLastChosenActivity(intent,
intent.resolveType(mContext.getContentResolver()),