stripe / stripe-android

Stripe Android SDK
https://stripe.com/docs/mobile/android
MIT License
1.29k stars 647 forks source link

Add backend-provided `LinkMode` in `LinkSettings` #9285

Closed tillh-stripe closed 2 months ago

tillh-stripe commented 2 months ago

Summary

This pull request adds the backend-provided LinkMode, which replaces the client-only LinkMode that was constructed from other response fields.

(cc @mats-stripe)

Motivation

BANKCON-14521

Testing

Screenshots

Before After
before screenshot after screenshot

Changelog

github-actions[bot] commented 2 months ago

Diffuse output:

OLD: paymentsheet-example-release-master.apk (signature: V1, V2)
NEW: paymentsheet-example-release-pr.apk (signature: V1, V2)

          │          compressed           │          uncompressed          
          ├───────────┬───────────┬───────┼───────────┬───────────┬────────
 APK      │ old       │ new       │ diff  │ old       │ new       │ diff   
──────────┼───────────┼───────────┼───────┼───────────┼───────────┼────────
      dex │   3.9 MiB │   3.9 MiB │ +89 B │   8.6 MiB │   8.6 MiB │ +320 B 
     arsc │   2.3 MiB │   2.3 MiB │   0 B │   2.3 MiB │   2.3 MiB │    0 B 
 manifest │   5.1 KiB │   5.1 KiB │   0 B │  25.6 KiB │  25.6 KiB │    0 B 
      res │ 932.5 KiB │ 932.5 KiB │   0 B │   1.5 MiB │   1.5 MiB │    0 B 
   native │   2.6 MiB │   2.6 MiB │   0 B │     6 MiB │     6 MiB │    0 B 
    asset │   2.9 MiB │   2.9 MiB │   0 B │   2.9 MiB │   2.9 MiB │    0 B 
    other │ 195.8 KiB │ 195.8 KiB │  -2 B │ 430.3 KiB │ 430.3 KiB │    0 B 
──────────┼───────────┼───────────┼───────┼───────────┼───────────┼────────
    total │  12.8 MiB │  12.8 MiB │ +87 B │  21.7 MiB │  21.7 MiB │ +320 B 

 DEX     │ old   │ new   │ diff       
─────────┼───────┼───────┼────────────
   files │     1 │     1 │  0         
 strings │ 42589 │ 42596 │ +7 (+9 -2) 
   types │ 14110 │ 14110 │  0 (+0 -0) 
 classes │ 11752 │ 11752 │  0 (+0 -0) 
 methods │ 60308 │ 60308 │  0 (+1 -1) 
  fields │ 39989 │ 39989 │  0 (+5 -5) 

 ARSC    │ old  │ new  │ diff 
─────────┼──────┼──────┼──────
 configs │  242 │  242 │  0   
 entries │ 6245 │ 6245 │  0
APK ``` compressed │ uncompressed │ ──────────┬───────┼───────────┬────────┤ size │ diff │ size │ diff │ path ──────────┼───────┼───────────┼────────┼─────────────────────────────────────────── 3.9 MiB │ +89 B │ 8.6 MiB │ +320 B │ ∆ classes.dex 53.3 KiB │ -5 B │ 118.1 KiB │ 0 B │ ∆ META-INF/CERT.SF 272 B │ +3 B │ 120 B │ 0 B │ ∆ META-INF/version-control-info.textproto 1.2 KiB │ +1 B │ 1.2 KiB │ 0 B │ ∆ META-INF/CERT.RSA 50.1 KiB │ -1 B │ 118.1 KiB │ 0 B │ ∆ META-INF/MANIFEST.MF ──────────┼───────┼───────────┼────────┼─────────────────────────────────────────── 4 MiB │ +87 B │ 8.8 MiB │ +320 B │ (total) ```
DEX ``` STRINGS: old │ new │ diff ───────┼───────┼──────────── 42589 │ 42596 │ +7 (+9 -2) + , linkMode= + LINK_CARD_BRAND + LINK_PAYMENT_METHOD + LinkCardBrand + LinkPaymentMethod + PASSTHROUGH + VLZLLZ + link_card_brand + ~~R8{backend:dex,compilation-mode:release,has-checksums:false,min-api:21,pg-map-id:804708f,r8-mode:full,version:8.5.35} - PaymentMethod - ~~R8{backend:dex,compilation-mode:release,has-checksums:false,min-api:21,pg-map-id:2f51155,r8-mode:full,version:8.5.35} METHODS: old │ new │ diff ───────┼───────┼─────────── 60308 │ 60308 │ 0 (+1 -1) + L6.q0 (List, boolean, A0, Map, boolean) - L6.q0 (List, boolean, Map, boolean) FIELDS: old │ new │ diff ───────┼───────┼─────────── 39989 │ 39989 │ 0 (+5 -5) + L6.A0 S: A0[] + L6.A0 T: b + L6.q0 T: A0 + L6.q0 U: Map + L6.q0 V: boolean - L6.A0 S: A0 - L6.A0 T: A0 - L6.A0 U: A0[] - L6.q0 T: Map - L6.q0 U: boolean ```