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

Commit c7b56875 authored by Jack Yu's avatar Jack Yu
Browse files

Use Intent.EXTRA_USER for ACTION_CHANGE_DEFAULT

Use Intent.EXTRA_USER to pass the UserHandle as the extra field of
ACTION_CHANGE_DEFAULT.

Bug: 215300017
Test: manual
Change-Id: I8862ae509638c7c264f49c4bc5753a65e8fdcfbc
parent e299e375
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -58,7 +58,11 @@ public final class PaymentDefaultDialog extends AlertActivity implements
        ComponentName component = intent.getParcelableExtra(
                CardEmulation.EXTRA_SERVICE_COMPONENT);
        String category = intent.getStringExtra(CardEmulation.EXTRA_CATEGORY);
        int userId = intent.getIntExtra(CardEmulation.EXTRA_USERID, UserHandle.myUserId());
        UserHandle userHandle = intent.getParcelableExtra(Intent.EXTRA_USER);
        if (userHandle == null) {
            userHandle = UserHandle.CURRENT;
        }
        int userId = userHandle.getIdentifier();

        setResult(RESULT_CANCELED);
        if (!buildDialog(component, category, userId)) {