| Index: chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java
|
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java b/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java
|
| index 8d27c545b41b2805a6f58d130ed74abd7ec5045f..8025813abc8da8cb5dcd593fe698372a65f5ac54 100644
|
| --- a/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java
|
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java
|
| @@ -494,7 +494,7 @@ public class PaymentRequestImpl implements PaymentRequest, PaymentRequestUI.Clie
|
|
|
| paymentMethodsCollector.addAcceptedPaymentMethodsIfRecognized(methods);
|
| }
|
| - return result;
|
| + return Collections.unmodifiableMap(result);
|
| }
|
|
|
| /** Queries the installed payment apps for their instruments that merchant supports. */
|
| @@ -508,7 +508,7 @@ public class PaymentRequestImpl implements PaymentRequest, PaymentRequestUI.Clie
|
| PaymentApp app = mApps.get(i);
|
| Map<String, PaymentMethodData> appMethods =
|
| filterMerchantMethodData(mMethodData, app.getAppMethodNames());
|
| - if (appMethods == null) {
|
| + if (appMethods == null || !app.supportsMethodsAndData(appMethods)) {
|
| mPendingApps.remove(app);
|
| } else {
|
| mArePaymentMethodsSupported = true;
|
| @@ -535,7 +535,7 @@ public class PaymentRequestImpl implements PaymentRequest, PaymentRequestUI.Clie
|
| result.put(method, merchantMethodData.get(method));
|
| }
|
| }
|
| - return result;
|
| + return result == null ? null : Collections.unmodifiableMap(result);
|
| }
|
|
|
| /**
|
| @@ -599,7 +599,7 @@ public class PaymentRequestImpl implements PaymentRequest, PaymentRequestUI.Clie
|
|
|
| mUiShoppingCart = new ShoppingCart(uiTotal, uiLineItems);
|
| mRawTotal = details.total;
|
| - mRawLineItems = Arrays.asList(details.displayItems);
|
| + mRawLineItems = Collections.unmodifiableList(Arrays.asList(details.displayItems));
|
|
|
| mUiShippingOptions = getShippingOptions(details.shippingOptions, totalCurrency, formatter);
|
|
|
| @@ -640,7 +640,7 @@ public class PaymentRequestImpl implements PaymentRequest, PaymentRequestUI.Clie
|
| item.label, "", formatter.format(item.amount.value), item.pending));
|
| }
|
|
|
| - return result;
|
| + return Collections.unmodifiableList(result);
|
| }
|
|
|
| /**
|
| @@ -668,7 +668,7 @@ public class PaymentRequestImpl implements PaymentRequest, PaymentRequestUI.Clie
|
| }
|
|
|
| return new SectionInformation(PaymentRequestUI.TYPE_SHIPPING_OPTIONS, selectedItemIndex,
|
| - result);
|
| + Collections.unmodifiableList(result));
|
| }
|
|
|
| /**
|
|
|