diff options
| author | 2024-04-25 01:32:01 +0000 | |
|---|---|---|
| committer | 2024-04-25 01:32:01 +0000 | |
| commit | 012adf2aa6c9e7af231e1fdfbf898a2b28f25750 (patch) | |
| tree | c59c33f19090d32fedbe66068be391830bbe8592 /java/src | |
| parent | cf3e87d14e1a4cd145cd7d08234f767592507e00 (diff) | |
| parent | d1b19e513ade6007688ff3afd55b531cff9219be (diff) | |
Merge "Fix incorrect cross-profile share check." into main
Diffstat (limited to 'java/src')
| -rw-r--r-- | java/src/com/android/intentresolver/ResolverListAdapter.java | 2 | ||||
| -rw-r--r-- | java/src/com/android/intentresolver/emptystate/NoCrossProfileEmptyStateProvider.java | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/java/src/com/android/intentresolver/ResolverListAdapter.java b/java/src/com/android/intentresolver/ResolverListAdapter.java index 9843cf8d..2a8fcfa4 100644 --- a/java/src/com/android/intentresolver/ResolverListAdapter.java +++ b/java/src/com/android/intentresolver/ResolverListAdapter.java @@ -840,7 +840,7 @@ public class ResolverListAdapter extends BaseAdapter { userHandle); } - public final List<Intent> getIntents() { + public List<Intent> getIntents() { // TODO: immutable copy? return mIntents; } diff --git a/java/src/com/android/intentresolver/emptystate/NoCrossProfileEmptyStateProvider.java b/java/src/com/android/intentresolver/emptystate/NoCrossProfileEmptyStateProvider.java index e6d5d1c4..2b4a7ada 100644 --- a/java/src/com/android/intentresolver/emptystate/NoCrossProfileEmptyStateProvider.java +++ b/java/src/com/android/intentresolver/emptystate/NoCrossProfileEmptyStateProvider.java @@ -34,8 +34,8 @@ import com.android.intentresolver.shared.model.User; import java.util.List; /** - * Empty state provider that does not allow cross profile sharing, it will return a blocker - * in case if the profile of the current tab is not the same as the profile of the calling app. + * Empty state provider that informs about a lack of cross profile sharing. It will return + * an empty state in case there are no intents which can be forwarded to another profile. */ public class NoCrossProfileEmptyStateProvider implements EmptyStateProvider { @@ -79,7 +79,8 @@ public class NoCrossProfileEmptyStateProvider implements EmptyStateProvider { // Allow access to the tab when launched by the same user as the tab owner // or when there is at least one target which is permitted for cross-profile. - if (launchedAsSameUser || anyCrossProfileAllowedIntents(adapter, tabOwnerHandle)) { + if (launchedAsSameUser || anyCrossProfileAllowedIntents(adapter, + /* source = */ launchedAs.getHandle())) { return null; } |