Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ce673ffd authored by Nicolas Prevot's avatar Nicolas Prevot Committed by Nicolas Prévot
Browse files

Using the selector to check if an intent can be forwarded.

In IntentFowarderActivity, if the selector of an intent is defined,
use it to check if the intent can be forwarded.

Change-Id: Ic77f70bca5596e0a5fb0fec9b7a693afaa649089
parent 4dfd455d
Loading
Loading
Loading
Loading
+5 −1
Original line number Original line Diff line number Diff line
@@ -83,7 +83,11 @@ public class IntentForwarderActivity extends Activity {
        String resolvedType = newIntent.resolveTypeIfNeeded(getContentResolver());
        String resolvedType = newIntent.resolveTypeIfNeeded(getContentResolver());
        boolean canForward = false;
        boolean canForward = false;
        try {
        try {
            canForward = ipm.canForwardTo(newIntent, resolvedType, callingUserId,
            Intent selector = newIntent.getSelector();
            if (selector == null) {
                selector = newIntent;
            }
            canForward = ipm.canForwardTo(selector, resolvedType, callingUserId,
                    userDest.getIdentifier());
                    userDest.getIdentifier());
        } catch (RemoteException e) {
        } catch (RemoteException e) {
            Slog.e(TAG, "PackageManagerService is dead?");
            Slog.e(TAG, "PackageManagerService is dead?");