Loading core/java/com/android/internal/app/ChooserActivity.java +4 −0 Original line number Original line Diff line number Diff line Loading @@ -3023,6 +3023,10 @@ public class ChooserActivity extends ResolverActivity implements currentRootAdapter.updateDirectShareExpansion(); currentRootAdapter.updateDirectShareExpansion(); } } void prepareIntentForCrossProfileLaunch(Intent intent) { intent.fixUris(UserHandle.myUserId()); } /** /** * Adapter for all types of items and targets in ShareSheet. * Adapter for all types of items and targets in ShareSheet. * Note that ranked sections like Direct Share - while appearing grid-like - are handled on the * Note that ranked sections like Direct Share - while appearing grid-like - are handled on the Loading core/java/com/android/internal/app/ResolverActivity.java +9 −2 Original line number Original line Diff line number Diff line Loading @@ -1235,8 +1235,8 @@ public class ResolverActivity extends Activity implements } } if (target != null) { if (target != null) { if (intent != null) { if (intent != null && isLaunchingTargetInOtherProfile()) { intent.fixUris(UserHandle.myUserId()); prepareIntentForCrossProfileLaunch(intent); } } safelyStartActivity(target); safelyStartActivity(target); Loading @@ -1250,6 +1250,13 @@ public class ResolverActivity extends Activity implements return true; return true; } } void prepareIntentForCrossProfileLaunch(Intent intent) {} private boolean isLaunchingTargetInOtherProfile() { return mMultiProfilePagerAdapter.getCurrentUserHandle().getIdentifier() != UserHandle.myUserId(); } @VisibleForTesting @VisibleForTesting public void safelyStartActivity(TargetInfo cti) { public void safelyStartActivity(TargetInfo cti) { // We're dispatching intents that might be coming from legacy apps, so // We're dispatching intents that might be coming from legacy apps, so Loading Loading
core/java/com/android/internal/app/ChooserActivity.java +4 −0 Original line number Original line Diff line number Diff line Loading @@ -3023,6 +3023,10 @@ public class ChooserActivity extends ResolverActivity implements currentRootAdapter.updateDirectShareExpansion(); currentRootAdapter.updateDirectShareExpansion(); } } void prepareIntentForCrossProfileLaunch(Intent intent) { intent.fixUris(UserHandle.myUserId()); } /** /** * Adapter for all types of items and targets in ShareSheet. * Adapter for all types of items and targets in ShareSheet. * Note that ranked sections like Direct Share - while appearing grid-like - are handled on the * Note that ranked sections like Direct Share - while appearing grid-like - are handled on the Loading
core/java/com/android/internal/app/ResolverActivity.java +9 −2 Original line number Original line Diff line number Diff line Loading @@ -1235,8 +1235,8 @@ public class ResolverActivity extends Activity implements } } if (target != null) { if (target != null) { if (intent != null) { if (intent != null && isLaunchingTargetInOtherProfile()) { intent.fixUris(UserHandle.myUserId()); prepareIntentForCrossProfileLaunch(intent); } } safelyStartActivity(target); safelyStartActivity(target); Loading @@ -1250,6 +1250,13 @@ public class ResolverActivity extends Activity implements return true; return true; } } void prepareIntentForCrossProfileLaunch(Intent intent) {} private boolean isLaunchingTargetInOtherProfile() { return mMultiProfilePagerAdapter.getCurrentUserHandle().getIdentifier() != UserHandle.myUserId(); } @VisibleForTesting @VisibleForTesting public void safelyStartActivity(TargetInfo cti) { public void safelyStartActivity(TargetInfo cti) { // We're dispatching intents that might be coming from legacy apps, so // We're dispatching intents that might be coming from legacy apps, so Loading