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

Issue 2888803003: [Payments] Use Autofill assets on Android Payment Request (Closed)

Created:
3 years, 7 months ago by Mathieu
Modified:
3 years, 7 months ago
CC:
chromium-reviews, rouslan+autofill_chromium.org, rogerm+autofillwatch_chromium.org, sebsg+autofillwatch_chromium.org, browser-components-watch_chromium.org, gogerald+paymentswatch_chromium.org, rouslan+payments_chromium.org, mathp+autofillwatch_chromium.org, agrieve+watch_chromium.org, mahmadi+paymentswatch_chromium.org, estade+watch_chromium.org, vabr+watchlistautofill_chromium.org, sebsg+paymentswatch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

[Payments] Use Autofill assets on Android Payment Request Previously there were many PNGs for the cards in Payment Request. Now this code uses the Autofill assets, which are vector drawables. Additionally: * MIR, JCB and Diners cards are now a drawable in Autofill (previously PNG or generic icon on Android) * Fixed a few other drawables. * Removing the border from the PR icons because it's now built-in the asset * Using setImageDrawable because it appears to be more efficient BUG=722651 TEST=visual Review-Url: https://codereview.chromium.org/2888803003 Cr-Commit-Position: refs/heads/master@{#473908} Committed: https://chromium.googlesource.com/chromium/src/+/10cefa4851de9c468e6527d92205640e738f4890

Patch Set 1 #

Patch Set 2 : Initial #

Total comments: 2

Patch Set 3 : addressed rouslan's comment #

Patch Set 4 : update diners and jcb #

Patch Set 5 : re-upload #

Patch Set 6 : AppCompatResources in more places #

Unified diffs Side-by-side diffs Delta from patch set Stats (+274 lines, -307 lines) Patch
A chrome/android/java/res/drawable-hdpi/diners_card.png View 1 2 3 Binary file 0 comments Download
A chrome/android/java/res/drawable-hdpi/jcb_card.png View 1 2 3 Binary file 0 comments Download
D chrome/android/java/res/drawable-hdpi/mir_card.png View Binary file 0 comments Download
D chrome/android/java/res/drawable-hdpi/pr_amex.png View Binary file 0 comments Download
D chrome/android/java/res/drawable-hdpi/pr_dinersclub.png View Binary file 0 comments Download
D chrome/android/java/res/drawable-hdpi/pr_discover.png View Binary file 0 comments Download
D chrome/android/java/res/drawable-hdpi/pr_generic.png View Binary file 0 comments Download
D chrome/android/java/res/drawable-hdpi/pr_jcb.png View Binary file 0 comments Download
D chrome/android/java/res/drawable-hdpi/pr_mc.png View Binary file 0 comments Download
D chrome/android/java/res/drawable-hdpi/pr_mir.png View Binary file 0 comments Download
D chrome/android/java/res/drawable-hdpi/pr_unionpay.png View Binary file 0 comments Download
D chrome/android/java/res/drawable-hdpi/pr_visa.png View Binary file 0 comments Download
A chrome/android/java/res/drawable-mdpi/diners_card.png View 1 2 3 Binary file 0 comments Download
A chrome/android/java/res/drawable-mdpi/jcb_card.png View 1 2 3 Binary file 0 comments Download
D chrome/android/java/res/drawable-mdpi/mir_card.png View Binary file 0 comments Download
D chrome/android/java/res/drawable-mdpi/pr_amex.png View Binary file 0 comments Download
D chrome/android/java/res/drawable-mdpi/pr_dinersclub.png View Binary file 0 comments Download
D chrome/android/java/res/drawable-mdpi/pr_discover.png View Binary file 0 comments Download
D chrome/android/java/res/drawable-mdpi/pr_generic.png View Binary file 0 comments Download
D chrome/android/java/res/drawable-mdpi/pr_jcb.png View Binary file 0 comments Download
D chrome/android/java/res/drawable-mdpi/pr_mc.png View Binary file 0 comments Download
D chrome/android/java/res/drawable-mdpi/pr_mir.png View Binary file 0 comments Download
D chrome/android/java/res/drawable-mdpi/pr_unionpay.png View Binary file 0 comments Download
D chrome/android/java/res/drawable-mdpi/pr_visa.png View Binary file 0 comments Download
A chrome/android/java/res/drawable-xhdpi/diners_card.png View 1 2 3 Binary file 0 comments Download
A chrome/android/java/res/drawable-xhdpi/jcb_card.png View 1 2 3 Binary file 0 comments Download
D chrome/android/java/res/drawable-xhdpi/mir_card.png View Binary file 0 comments Download
D chrome/android/java/res/drawable-xhdpi/pr_amex.png View Binary file 0 comments Download
D chrome/android/java/res/drawable-xhdpi/pr_dinersclub.png View Binary file 0 comments Download
D chrome/android/java/res/drawable-xhdpi/pr_discover.png View Binary file 0 comments Download
D chrome/android/java/res/drawable-xhdpi/pr_generic.png View Binary file 0 comments Download
D chrome/android/java/res/drawable-xhdpi/pr_jcb.png View Binary file 0 comments Download
D chrome/android/java/res/drawable-xhdpi/pr_mc.png View Binary file 0 comments Download
D chrome/android/java/res/drawable-xhdpi/pr_mir.png View Binary file 0 comments Download
D chrome/android/java/res/drawable-xhdpi/pr_unionpay.png View Binary file 0 comments Download
D chrome/android/java/res/drawable-xhdpi/pr_visa.png View Binary file 0 comments Download
A chrome/android/java/res/drawable-xxhdpi/diners_card.png View 1 2 3 Binary file 0 comments Download
A chrome/android/java/res/drawable-xxhdpi/jcb_card.png View 1 2 3 Binary file 0 comments Download
D chrome/android/java/res/drawable-xxhdpi/mir_card.png View Binary file 0 comments Download
D chrome/android/java/res/drawable-xxhdpi/pr_amex.png View Binary file 0 comments Download
D chrome/android/java/res/drawable-xxhdpi/pr_dinersclub.png View Binary file 0 comments Download
D chrome/android/java/res/drawable-xxhdpi/pr_discover.png View Binary file 0 comments Download
D chrome/android/java/res/drawable-xxhdpi/pr_generic.png View Binary file 0 comments Download
D chrome/android/java/res/drawable-xxhdpi/pr_jcb.png View Binary file 0 comments Download
D chrome/android/java/res/drawable-xxhdpi/pr_mc.png View Binary file 0 comments Download
D chrome/android/java/res/drawable-xxhdpi/pr_mir.png View Binary file 0 comments Download
D chrome/android/java/res/drawable-xxhdpi/pr_unionpay.png View Binary file 0 comments Download
D chrome/android/java/res/drawable-xxhdpi/pr_visa.png View Binary file 0 comments Download
A chrome/android/java/res/drawable-xxxhdpi/diners_card.png View 1 2 3 Binary file 0 comments Download
A chrome/android/java/res/drawable-xxxhdpi/jcb_card.png View 1 2 3 Binary file 0 comments Download
D chrome/android/java/res/drawable-xxxhdpi/mir_card.png View Binary file 0 comments Download
D chrome/android/java/res/drawable-xxxhdpi/pr_amex.png View Binary file 0 comments Download
D chrome/android/java/res/drawable-xxxhdpi/pr_dinersclub.png View Binary file 0 comments Download
D chrome/android/java/res/drawable-xxxhdpi/pr_discover.png View Binary file 0 comments Download
D chrome/android/java/res/drawable-xxxhdpi/pr_generic.png View Binary file 0 comments Download
D chrome/android/java/res/drawable-xxxhdpi/pr_jcb.png View Binary file 0 comments Download
D chrome/android/java/res/drawable-xxxhdpi/pr_mc.png View Binary file 0 comments Download
D chrome/android/java/res/drawable-xxxhdpi/pr_mir.png View Binary file 0 comments Download
D chrome/android/java/res/drawable-xxxhdpi/pr_unionpay.png View Binary file 0 comments Download
D chrome/android/java/res/drawable-xxxhdpi/pr_visa.png View Binary file 0 comments Download
M chrome/android/java/res/drawable/discover_card.xml View 1 chunk +57 lines, -115 lines 0 comments Download
A chrome/android/java/res/drawable/mir_card.xml View 1 chunk +43 lines, -0 lines 0 comments Download
M chrome/android/java/res/drawable/unionpay_card.xml View 1 chunk +108 lines, -71 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/payments/AutofillPaymentInstrument.java View 1 2 3 4 5 3 chunks +4 lines, -5 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/payments/CardEditor.java View 2 chunks +10 lines, -10 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/payments/ui/EditorIconsField.java View 1 2 3 4 5 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/payments/ui/EditorLabelField.java View 2 chunks +3 lines, -4 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/payments/ui/EditorTextField.java View 1 2 3 chunks +2 lines, -2 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/payments/ui/PaymentRequestSection.java View 1 4 chunks +4 lines, -12 lines 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestAbortTest.java View 1 chunk +1 line, -1 line 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestBasicCardTest.java View 1 chunk +1 line, -1 line 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestBillingAddressTest.java View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestBillingAddressWithoutPhoneTest.java View 1 chunk +1 line, -1 line 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestCanMakePaymentQueryNoCardTest.java View 1 chunk +1 line, -1 line 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestCanMakePaymentQueryTest.java View 1 chunk +1 line, -1 line 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestCardEditorAutoAdvanceTest.java View 1 chunk +1 line, -1 line 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestCcCanMakePaymentQueryNoCardTest.java View 1 chunk +1 line, -1 line 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestCcCanMakePaymentQueryTest.java View 1 chunk +1 line, -1 line 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestContactDetailsAndFreeShippingTest.java View 1 chunk +1 line, -1 line 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestDynamicShippingSingleAddressTest.java View 1 chunk +1 line, -1 line 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestEmailAndFreeShippingTest.java View 1 chunk +1 line, -1 line 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestExpiredLocalCardTest.java View 1 chunk +1 line, -1 line 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestExtraShippingOptionsTest.java View 1 chunk +1 line, -1 line 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestFailCompleteTest.java View 1 chunk +1 line, -1 line 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestFreeShippingTest.java View 1 chunk +1 line, -1 line 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestIdTest.java View 1 chunk +1 line, -1 line 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestIncompleteServerCardTest.java View 1 chunk +1 line, -1 line 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestJourneyLoggerTest.java View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestMetricsTest.java View 1 chunk +1 line, -1 line 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestNameAndFreeShippingTest.java View 1 chunk +1 line, -1 line 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestNameTest.java View 1 chunk +1 line, -1 line 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestNoShippingTest.java View 1 chunk +1 line, -1 line 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestPaymentAppAndCardsTest.java View 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestPaymentAppsSortingTest.java View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestPhoneAndFreeShippingTest.java View 1 chunk +1 line, -1 line 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestRemoveBillingAddressTest.java View 1 chunk +1 line, -1 line 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestServerCardTest.java View 1 chunk +1 line, -1 line 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestShippingAddressChangeTest.java View 1 chunk +1 line, -1 line 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestShippingAddressTest.java View 1 chunk +1 line, -1 line 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestShowTwiceTest.java View 1 chunk +1 line, -1 line 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestTabTest.java View 1 chunk +1 line, -1 line 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestUseStatsTest.java View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/android/resource_id.h View 2 chunks +2 lines, -13 lines 0 comments Download
M components/autofill/core/browser/autofill_data_util.cc View 2 chunks +0 lines, -20 lines 0 comments Download
M components/resources/autofill_scaled_resources.grdp View 1 chunk +0 lines, -15 lines 0 comments Download

Messages

Total messages: 42 (18 generated)
Mathieu
Rouslan, PTAL whole patch Ted, I have a question about setImageDrawable. Should we use it, ...
3 years, 7 months ago (2017-05-17 18:20:19 UTC) #6
Mathieu
Added screenshots on the bug
3 years, 7 months ago (2017-05-17 19:20:28 UTC) #8
Ted C
+twellington AppCompatResources.getDrawable is the right thing to handle inflating vectors (and other types). One question ...
3 years, 7 months ago (2017-05-17 19:41:24 UTC) #10
Mathieu
On 2017/05/17 19:41:24, Ted C wrote: > +twellington > > AppCompatResources.getDrawable is the right thing ...
3 years, 7 months ago (2017-05-17 19:46:57 UTC) #11
please use gerrit instead
lgtm % comment https://codereview.chromium.org/2888803003/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/EditorTextField.java File chrome/android/java/src/org/chromium/chrome/browser/payments/ui/EditorTextField.java (right): https://codereview.chromium.org/2888803003/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/EditorTextField.java#newcode275 chrome/android/java/src/org/chromium/chrome/browser/payments/ui/EditorTextField.java:275: mValueIcon.setImageDrawable(AppCompatResources.getDrawable(mContext, mValueIconId)); You can use getContext(), ...
3 years, 7 months ago (2017-05-17 19:56:34 UTC) #12
Mathieu
Thanks, still need to investigate diners club and others as mentioned. https://codereview.chromium.org/2888803003/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/EditorTextField.java File chrome/android/java/src/org/chromium/chrome/browser/payments/ui/EditorTextField.java (right): ...
3 years, 7 months ago (2017-05-17 20:00:41 UTC) #13
Mathieu
I've updated diners and jcb to be PNG because their PNGs are smaller than the ...
3 years, 7 months ago (2017-05-17 21:08:39 UTC) #14
Mathieu
Hi all, the result of my investigation into the remaining 6 card icons is at ...
3 years, 7 months ago (2017-05-18 02:51:18 UTC) #15
Mathieu
On 2017/05/18 02:51:18, Mathieu wrote: > Hi all, the result of my investigation into the ...
3 years, 7 months ago (2017-05-18 02:57:54 UTC) #16
Evan Stade
On 2017/05/18 02:51:18, Mathieu wrote: > Hi all, the result of my investigation into the ...
3 years, 7 months ago (2017-05-18 14:39:29 UTC) #17
Ted C
+agrieve the xml should get compressed when it is packaged into the APK. I think ...
3 years, 7 months ago (2017-05-18 14:47:03 UTC) #19
Mathieu
On 2017/05/18 14:47:03, Ted C wrote: > +agrieve > > the xml should get compressed ...
3 years, 7 months ago (2017-05-18 19:51:20 UTC) #20
agrieve
On 2017/05/18 19:51:20, Mathieu wrote: > On 2017/05/18 14:47:03, Ted C wrote: > > +agrieve ...
3 years, 7 months ago (2017-05-18 19:56:04 UTC) #21
Mathieu
On 2017/05/18 19:56:04, agrieve wrote: > On 2017/05/18 19:51:20, Mathieu wrote: > > On 2017/05/18 ...
3 years, 7 months ago (2017-05-18 20:19:03 UTC) #22
Mathieu
On 2017/05/18 20:19:03, Mathieu wrote: > On 2017/05/18 19:56:04, agrieve wrote: > > On 2017/05/18 ...
3 years, 7 months ago (2017-05-19 00:51:32 UTC) #24
Ted C
lgtm...thanks for investigating the xml file. at least my original diner's club comment was a ...
3 years, 7 months ago (2017-05-19 18:49:37 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2888803003/60001
3 years, 7 months ago (2017-05-19 19:53:48 UTC) #28
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/298532)
3 years, 7 months ago (2017-05-19 21:25:04 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2888803003/60001
3 years, 7 months ago (2017-05-21 13:20:18 UTC) #32
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/299149)
3 years, 7 months ago (2017-05-21 15:20:32 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2888803003/120001
3 years, 7 months ago (2017-05-23 14:35:11 UTC) #37
commit-bot: I haz the power
Committed patchset #6 (id:120001) as https://chromium.googlesource.com/chromium/src/+/10cefa4851de9c468e6527d92205640e738f4890
3 years, 7 months ago (2017-05-23 15:27:05 UTC) #40
estevenson
On 2017/05/23 15:27:05, commit-bot: I haz the power wrote: > Committed patchset #6 (id:120001) as ...
3 years, 7 months ago (2017-05-25 15:25:52 UTC) #41
Mathieu
3 years, 7 months ago (2017-05-25 15:35:12 UTC) #42
Message was sent while issue was closed.
On 2017/05/25 15:25:52, estevenson wrote:
> On 2017/05/23 15:27:05, commit-bot: I haz the power wrote:
> > Committed patchset #6 (id:120001) as
> >
>
https://chromium.googlesource.com/chromium/src/+/10cefa4851de9c468e6527d92205...
> 
> Thanks for looking into this!
> 
> Shaved 200kb off of MonochromePublic.apk!
> 
>
https://chromeperf.appspot.com/report?sid=99caa6c5389f77e13b562afa5703ad8fc1d...

I'm glad :D

Powered by Google App Engine
This is Rietveld 408576698