OLD | NEW |
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 Loading... |
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 } |
OLD | NEW |