Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(172)

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/payments/AndroidPaymentAppFactory.java

Issue 2507223002: Implement IsReadyToPay handling (Closed)
Patch Set: Rebase Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.chrome.browser.payments; 5 package org.chromium.chrome.browser.payments;
6 6
7 import android.content.Context; 7 import android.content.Context;
8 import android.content.Intent; 8 import android.content.Intent;
9 import android.content.pm.PackageManager; 9 import android.content.pm.PackageManager;
10 import android.content.pm.ResolveInfo; 10 import android.content.pm.ResolveInfo;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 installedApp.addMethodName(methodName); 53 installedApp.addMethodName(methodName);
54 } 54 }
55 } 55 }
56 56
57 List<ResolveInfo> matches = 57 List<ResolveInfo> matches =
58 pm.queryIntentServices(new Intent(ACTION_IS_READY_TO_PAY), 0); 58 pm.queryIntentServices(new Intent(ACTION_IS_READY_TO_PAY), 0);
59 for (int i = 0; i < matches.size(); i++) { 59 for (int i = 0; i < matches.size(); i++) {
60 ResolveInfo match = matches.get(i); 60 ResolveInfo match = matches.get(i);
61 String packageName = match.serviceInfo.packageName; 61 String packageName = match.serviceInfo.packageName;
62 AndroidPaymentApp installedApp = installedApps.get(packageName); 62 AndroidPaymentApp installedApp = installedApps.get(packageName);
63 if (installedApp != null) installedApp.setIsReadyToPayService(match. serviceInfo.name); 63 if (installedApp != null) installedApp.setIsReadyToPayAction(match.s erviceInfo.name);
64 } 64 }
65 65
66 callback.onAllPaymentAppsCreated(); 66 callback.onAllPaymentAppsCreated();
67 } 67 }
68 } 68 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698