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

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

Issue 2507223002: Implement IsReadyToPay handling (Closed)
Patch Set: Fix oneway usage 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 } 67 }
68 installedApp.addMethodName(methodName); 68 installedApp.addMethodName(methodName);
69 } 69 }
70 } 70 }
71 71
72 List<ResolveInfo> matches = pm.queryIntentServices(new Intent(ACTION_IS_ READY_TO_PAY), 0); 72 List<ResolveInfo> matches = pm.queryIntentServices(new Intent(ACTION_IS_ READY_TO_PAY), 0);
73 for (int i = 0; i < matches.size(); i++) { 73 for (int i = 0; i < matches.size(); i++) {
74 ResolveInfo match = matches.get(i); 74 ResolveInfo match = matches.get(i);
75 String packageName = match.serviceInfo.packageName; 75 String packageName = match.serviceInfo.packageName;
76 AndroidPaymentApp installedApp = installedApps.get(packageName); 76 AndroidPaymentApp installedApp = installedApps.get(packageName);
77 if (installedApp != null) installedApp.setIsReadyToPayService(match. serviceInfo.name); 77 if (installedApp != null) installedApp.setIsReadyToPayAction(match.s erviceInfo.name);
78 } 78 }
79 79
80 callback.onAllPaymentAppsCreated(); 80 callback.onAllPaymentAppsCreated();
81 } 81 }
82 } 82 }
OLDNEW
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/payments/AndroidPaymentApp.java ('k') | content/public/android/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698