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

Remove Google Pay launcher init events #9553

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

samer-stripe
Copy link
Collaborator

@samer-stripe samer-stripe commented Nov 4, 2024

Summary

Remove initialization events for Google Pay in the Android SDK.

Motivation

Removes noisy initialization events

Resolves https://jira.corp.stripe.com/browse/RUN_MOBILESDK-3192

Testing

  • Added tests
  • Modified tests
  • Manually verified

Copy link
Contributor

github-actions bot commented Nov 4, 2024

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.8 MiB │   3.8 MiB │ -265 B │   8.4 MiB │   8.4 MiB │ -304 B 
     arsc │   2.3 MiB │   2.3 MiB │    0 B │   2.3 MiB │   2.3 MiB │    0 B 
 manifest │     5 KiB │     5 KiB │    0 B │  24.9 KiB │  24.9 KiB │    0 B 
      res │ 902.2 KiB │ 902.2 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 │   -2 B │   1.6 MiB │   1.6 MiB │   -2 B 
    other │ 199.8 KiB │ 199.8 KiB │   +1 B │ 440.1 KiB │ 440.1 KiB │    0 B 
──────────┼───────────┼───────────┼────────┼───────────┼───────────┼────────
    total │  11.4 MiB │  11.4 MiB │ -266 B │  20.2 MiB │  20.2 MiB │ -306 B 

 DEX     │ old   │ new   │ diff           
─────────┼───────┼───────┼────────────────
   files │     1 │     1 │  0             
 strings │ 39739 │ 39735 │ -4 (+3 -7)     
   types │ 13701 │ 13701 │  0 (+2 -2)     
 classes │ 11396 │ 11396 │  0 (+1 -1)     
 methods │ 58556 │ 58557 │ +1 (+67 -66)   
  fields │ 38867 │ 38866 │ -1 (+109 -110) 

 ARSC    │ old  │ new  │ diff 
─────────┼──────┼──────┼──────
 configs │  242 │  242 │  0   
 entries │ 6188 │ 6188 │  0
APK
    compressed     │    uncompressed    │                                           
──────────┬────────┼───────────┬────────┤                                           
 size     │ diff   │ size      │ diff   │ path                                      
──────────┼────────┼───────────┼────────┼───────────────────────────────────────────
  3.8 MiB │ -265 B │   8.4 MiB │ -304 B │ ∆ classes.dex                             
   53 KiB │   +6 B │ 117.6 KiB │    0 B │ ∆ META-INF/CERT.SF                        
 49.7 KiB │   -3 B │ 117.5 KiB │    0 B │ ∆ META-INF/MANIFEST.MF                    
  7.8 KiB │   -2 B │   7.6 KiB │   -2 B │ ∆ assets/dexopt/baseline.prof             
    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                       
──────────┼────────┼───────────┼────────┼───────────────────────────────────────────
  3.9 MiB │ -266 B │   8.6 MiB │ -306 B │ (total)
DEX
STRINGS:

   old   │ new   │ diff       
  ───────┼───────┼────────────
   39739 │ 39735 │ -4 (+3 -7) 
  
  + Li6/a0;
  + [Lw7/i;
  + ~~R8{"backend":"dex","compilation-mode":"release","has-checksums":false,"min-api":21,"pg-map-id":"53c291e","r8-mode":"full","version":"8.7.14"}
  
  - GooglePayLauncherInit
  - GooglePayPaymentMethodLauncherInit
  - Lw7/A;
  - [Lw7/j;
  - googlepaylauncher_init
  - googlepaypaymentmethodlauncher_init
  - ~~R8{"backend":"dex","compilation-mode":"release","has-checksums":false,"min-api":21,"pg-map-id":"f8cc807","r8-mode":"full","version":"8.7.14"}
  

TYPES:

   old   │ new   │ diff      
  ───────┼───────┼───────────
   13701 │ 13701 │ 0 (+2 -2) 
  
  + Li6/a0;
  + [Lw7/i;
  
  - Lw7/A;
  - [Lw7/j;
  

METHODS:

   old   │ new   │ diff         
  ───────┼───────┼──────────────
   58556 │ 58557 │ +1 (+67 -66) 
  
  + B6.e b() → p
  + a7.l <init>(F, e)
  + i6.a0 <init>(int)
  + i6.a0 <init>(h)
  + i6.a0 a() → c
  + j6.a <init>(a0)
  + k6.E <init>(d)
  + k6.E b(r) → e
  + w7.b <init>(g, g, g, Application, z)
  + w7.c a() → a0
  + w7.d <init>(Object, int)
  + w7.e <init>(b, r)
  + w7.e <init>(g, r)
  + w7.e <init>(i, r)
  + w7.e a() → j
  + w7.f <init>(p, int)
  + w7.f a(Object)
  + w7.f c() → e
  + w7.f equals(Object) → boolean
  + w7.f hashCode() → int
  + w7.g <init>(p, d)
  + w7.g h(Object, Object) → Object
  + w7.g n(d, Object) → d
  + w7.g p(Object) → Object
  + w7.h <init>(p, d)
  + w7.i <clinit>()
  + w7.i valueOf(String) → i
  + w7.i values() → i[]
  + w7.k <init>()
  + w7.k getMessage() → String
  + w7.l <clinit>()
  + w7.m <init>(p, A, H, d)
  + w7.m h(Object, Object) → Object
  + w7.m n(d, Object) → d
  + w7.m p(Object) → Object
  + w7.o <init>(p, z, d)
  + w7.p <init>(x, F, a, k, C, D, c, c, Context, b, z, B, j, boolean, Set, a, y, K, v, x, i, f, boolean, i, i, a)
  + w7.p a(p, f1)
  + w7.p b(b2, N1, S1)
  + w7.p c(String, N1, S1)
  + w7.p d()
  + w7.p e(A, H)
  + w7.p f(z, m, boolean)
  + w7.p g()
  + w7.q <init>(a, e, e, l, e, e, a, e, a, a, e, e, j, a, a, e, a, a, a, a, i, g, e, a, j, a)
  + w7.q get() → Object
  + w7.r <init>(j)
  + w7.r registerForActivityResult(a, b) → d
  + w7.s <init>(b2, N1)
  + w7.s equals(Object) → boolean
  + w7.s hashCode() → int
  + w7.s toString() → String
  + w7.t <init>(x, b2, N1, boolean, S1, d)
  + w7.t h(Object, Object) → Object
  + w7.t n(d, Object) → d
  + w7.t p(Object) → Object
  + w7.u <init>(x, c)
  + w7.v <init>(x, Throwable, S1, d)
  + w7.v h(Object, Object) → Object
  + w7.v n(d, Object) → d
  + w7.w <init>(x, H, d)
  + w7.x <init>(w, i, b, z, I)
  + w7.x a(x, b2, N1, boolean, S1, c) → Object
  + w7.x b(x, S1, Throwable, u) → Object
  + w7.y <clinit>()
  + w7.z <init>(Application, g0)
  + w7.z i() → H
  
  - B6.e b() → q
  - a7.l <init>(F, f)
  - j6.a <init>(f)
  - k6.E <init>(e)
  - k6.E b(r) → f
  - w7.A <init>(Application, g0)
  - w7.A i() → H
  - w7.b <init>(g, g, g, Application, A)
  - w7.c a() → d
  - w7.d <init>(int)
  - w7.d a() → c
  - w7.e <init>(Object, int)
  - w7.f <init>(b, r)
  - w7.f <init>(g, r)
  - w7.f <init>(i, r)
  - w7.f a() → j
  - w7.g <init>(q, int)
  - w7.g a(Object)
  - w7.g c() → e
  - w7.g equals(Object) → boolean
  - w7.g hashCode() → int
  - w7.h <init>(q, d)
  - w7.i <init>(q, d)
  - w7.i h(Object, Object) → Object
  - w7.i n(d, Object) → d
  - w7.i p(Object) → Object
  - w7.j valueOf(String) → j
  - w7.j values() → j[]
  - w7.k <clinit>()
  - w7.l <init>()
  - w7.l getMessage() → String
  - w7.m <clinit>()
  - w7.n <init>(q, A, H, d)
  - w7.p <init>(q, z, d)
  - w7.p h(Object, Object) → Object
  - w7.p n(d, Object) → d
  - w7.p p(Object) → Object
  - w7.q <init>(x, F, a, k, C, D, c, c, Context, b, A, B, j, boolean, Set, a, y, K, v, y, i, f, boolean, i, i, a)
  - w7.q a(q, f1)
  - w7.q b(b2, N1, S1)
  - w7.q c(String, N1, S1)
  - w7.q d()
  - w7.q e(A, H)
  - w7.q f(z, m, boolean)
  - w7.q g()
  - w7.r <init>(a, e, e, l, e, e, a, e, a, a, e, e, j, a, a, e, a, a, a, a, i, g, e, a, j, a)
  - w7.r get() → Object
  - w7.s <init>(j)
  - w7.s registerForActivityResult(a, b) → d
  - w7.t <init>(b2, N1)
  - w7.t equals(Object) → boolean
  - w7.t hashCode() → int
  - w7.t toString() → String
  - w7.u <init>(y, b2, N1, boolean, S1, d)
  - w7.u h(Object, Object) → Object
  - w7.u n(d, Object) → d
  - w7.v <init>(y, c)
  - w7.w <init>(y, Throwable, S1, d)
  - w7.x <init>(y, H, d)
  - w7.x h(Object, Object) → Object
  - w7.x n(d, Object) → d
  - w7.x p(Object) → Object
  - w7.y <init>(w, i, b, A, I)
  - w7.y a(y, 
...✂

@samer-stripe samer-stripe marked this pull request as ready for review November 4, 2024 17:18
@samer-stripe samer-stripe requested review from a team as code owners November 4, 2024 17:18
Copy link
Collaborator

@jaynewstrom-stripe jaynewstrom-stripe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought the goal was to only send it once, rather than on every init.

@samer-stripe
Copy link
Collaborator Author

samer-stripe commented Nov 4, 2024

I thought the goal was to only send it once, rather than on every init.

My understanding was that init should only add the product usage rather then log it. iOS does not have an equivalent init event for STPApplePayContext (per STPAnalyticEvent)

We could keep it and simply track if we have already initialized it with a global variable.

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.

2 participants