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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 } |
OLD | NEW |