Merge "Correct null UserHandle handling for ACTION_CHANGE_DEFAULT" into tm-dev

This commit is contained in:
TreeHugger Robot
2022-03-15 02:48:20 +00:00
committed by Android (Google) Code Review

View File

@@ -59,10 +59,13 @@ public final class PaymentDefaultDialog extends AlertActivity implements
CardEmulation.EXTRA_SERVICE_COMPONENT);
String category = intent.getStringExtra(CardEmulation.EXTRA_CATEGORY);
UserHandle userHandle = intent.getParcelableExtra(Intent.EXTRA_USER);
int userId;
if (userHandle == null) {
userHandle = UserHandle.CURRENT;
userId = UserHandle.myUserId();
} else {
userId = userHandle.getIdentifier();
}
int userId = userHandle.getIdentifier();
setResult(RESULT_CANCELED);
if (!buildDialog(component, category, userId)) {