Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separate Web & Native Link Activity Contract #9934

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

toluo-stripe
Copy link
Contributor

@toluo-stripe toluo-stripe commented Jan 17, 2025

Summary

Separate web and native link contracts. This will allow us to separate the intent parsing logic and launch either specifically.

The goal is to short-circuit to WebLink when attestation fails

Motivation

JIRA

Testing

  • Added tests
  • Modified tests
  • Manually verified

Changelog

Copy link
Contributor

github-actions bot commented Jan 17, 2025

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 │     4 MiB │     4 MiB │ +959 B │  8.6 MiB │  8.7 MiB │ +1.3 KiB 
     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.2 KiB │ 25.2 KiB │      0 B 
      res │ 908.4 KiB │ 908.4 KiB │    0 B │  1.4 MiB │  1.4 MiB │      0 B 
   native │   2.6 MiB │   2.6 MiB │    0 B │    6 MiB │    6 MiB │      0 B 
    asset │   1.6 MiB │   1.6 MiB │  +38 B │  1.6 MiB │  1.6 MiB │    +38 B 
    other │   1.4 MiB │   1.4 MiB │   -5 B │  1.6 MiB │  1.6 MiB │      0 B 
──────────┼───────────┼───────────┼────────┼──────────┼──────────┼──────────
    total │  12.7 MiB │  12.7 MiB │ +992 B │ 21.6 MiB │ 21.6 MiB │ +1.3 KiB 

 DEX     │ old   │ new   │ diff        
─────────┼───────┼───────┼─────────────
   files │     1 │     1 │  0          
 strings │ 40885 │ 40891 │ +6 (+7 -1)  
   types │ 14094 │ 14096 │ +2 (+2 -0)  
 classes │ 11764 │ 11766 │ +2 (+2 -0)  
 methods │ 59979 │ 59988 │ +9 (+10 -1) 
  fields │ 40107 │ 40112 │ +5 (+10 -5) 

 ARSC    │ old  │ new  │ diff 
─────────┼──────┼──────┼──────
 configs │  243 │  243 │  0   
 entries │ 6209 │ 6209 │  0
APK
    compressed     │     uncompressed     │                                           
──────────┬────────┼───────────┬──────────┤                                           
 size     │ diff   │ size      │ diff     │ path                                      
──────────┼────────┼───────────┼──────────┼───────────────────────────────────────────
    4 MiB │ +959 B │   8.7 MiB │ +1.3 KiB │ ∆ classes.dex                             
  7.8 KiB │  +36 B │   7.6 KiB │    +36 B │ ∆ assets/dexopt/baseline.prof             
 53.5 KiB │   -4 B │ 118.7 KiB │      0 B │ ∆ META-INF/CERT.SF                        
  1,003 B │   +2 B │     871 B │     +2 B │ ∆ assets/dexopt/baseline.profm            
    271 B │   -1 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.3 KiB │   -1 B │ 118.6 KiB │      0 B │ ∆ META-INF/MANIFEST.MF                    
──────────┼────────┼───────────┼──────────┼───────────────────────────────────────────
  4.1 MiB │ +992 B │   8.9 MiB │ +1.3 KiB │ (total)
DEX
STRINGS:

   old   │ new   │ diff       
  ───────┼───────┼────────────
   40885 │ 40891 │ +6 (+7 -1) 
  
  + LINK_WEB_FAILED_TO_PARSE_RESULT_URI
  + Lcom/stripe/android/link/NativeLinkActivityContract;
  + Lcom/stripe/android/link/WebLinkActivityContract;
  + link.web.result.parsing_failed
  + nativeLinkActivityContract
  + webLinkActivityContract
  + ~~R8{"backend":"dex","compilation-mode":"release","has-checksums":false,"min-api":21,"pg-map-id":"551d0c8","r8-mode":"full","version":"8.7.14"}
  
  - ~~R8{"backend":"dex","compilation-mode":"release","has-checksums":false,"min-api":21,"pg-map-id":"96a0f6d","r8-mode":"full","version":"8.7.14"}
  

TYPES:

   old   │ new   │ diff       
  ───────┼───────┼────────────
   14094 │ 14096 │ +2 (+2 -0) 
  
  + Lcom/stripe/android/link/NativeLinkActivityContract;
  + Lcom/stripe/android/link/WebLinkActivityContract;
  

METHODS:

   old   │ new   │ diff        
  ───────┼───────┼─────────────
   59979 │ 59988 │ +9 (+10 -1) 
  
  + com.stripe.android.link.LinkActivityContract <init>(NativeLinkActivityContract, WebLinkActivityContract)
  + com.stripe.android.link.NativeLinkActivityContract <init>()
  + com.stripe.android.link.NativeLinkActivityContract a(Context, Object) → Intent
  + com.stripe.android.link.NativeLinkActivityContract c(Intent, int) → Object
  + com.stripe.android.link.NativeLinkActivityContract d(Intent, int) → k
  + com.stripe.android.link.WebLinkActivityContract <init>(V, f)
  + com.stripe.android.link.WebLinkActivityContract a(Context, Object) → Intent
  + com.stripe.android.link.WebLinkActivityContract c(Intent, int) → Object
  + com.stripe.android.link.WebLinkActivityContract d(Context, e) → Intent
  + com.stripe.android.link.WebLinkActivityContract e(Intent, int) → k
  
  - com.stripe.android.link.LinkActivityContract <init>(V)
  

FIELDS:

   old   │ new   │ diff        
  ───────┼───────┼─────────────
   40107 │ 40112 │ +5 (+10 -5) 
  
  + M7.b I: x0
  + M7.b J: h
  + M7.b K: m
  + M7.b O: h
  + com.stripe.android.link.LinkActivityContract a: NativeLinkActivityContract
  + com.stripe.android.link.LinkActivityContract b: WebLinkActivityContract
  + com.stripe.android.link.WebLinkActivityContract a: V
  + com.stripe.android.link.WebLinkActivityContract b: f
  + j7.e x: e
  + j7.e y: e[]
  
  - M7.b I: h
  - M7.b J: m
  - M7.b K: h
  - com.stripe.android.link.LinkActivityContract a: V
  - j7.e x: e[]

@toluo-stripe toluo-stripe marked this pull request as ready for review January 17, 2025 21:07
@toluo-stripe toluo-stripe requested review from a team as code owners January 17, 2025 21:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant