Skip to content
Commit c7769999 authored by arangelov's avatar arangelov Committed by Antoan Angelov
Browse files

Add a null check in canForwardTo for getProfileParent.

PackageManagerService#canForwardTo assumes the method is called
from a work profile. However, with the new changes in the intent
resolver and share sheet, we use this method from the personal
profile as well, in order to determine if an intent is
cross-profile or not. Without this null check, we get a NPE
when we call canForwardTo from the personal profile.

Test: CTS tests are not relevant in this case, as
PackageManagerService#canForwardTo is not a public API
and the only place it's called from is IntentForwarderActivity,
which does not have CTS coverage.
Fixes: 149311698
Change-Id: I172f572920c258723b6a51ac35f2abc0c3aabbf8
parent 06092ad9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment