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

[Identity] Remove query strings from uri for images #6341

Merged
merged 3 commits into from
Mar 9, 2023

Conversation

ccen-stripe
Copy link
Contributor

@ccen-stripe ccen-stripe commented Mar 9, 2023

Summary

Remove query params. This might happen if the SDK is called from react native and the uri would have query params as follows: http://path/to/icon.png?platform=android&hash=somehash

Motivation

Testing

  • Added tests
  • Modified tests
  • Manually verified

Screenshots

Before After
before screenshot after screenshot

Changelog

@ccen-stripe ccen-stripe requested review from a team as code owners March 9, 2023 21:47
@github-actions
Copy link
Contributor

github-actions bot commented Mar 9, 2023

Diffuse output:

OLD: identity-example-release-base.apk (signature: V1, V2)
NEW: identity-example-release-pr.apk (signature: V1, V2)

          │            compressed            │           uncompressed           
          ├───────────┬───────────┬──────────┼───────────┬───────────┬──────────
 APK      │ old       │ new       │ diff     │ old       │ new       │ diff     
──────────┼───────────┼───────────┼──────────┼───────────┼───────────┼──────────
      dex │   1.8 MiB │   1.8 MiB │    -13 B │   3.8 MiB │   3.8 MiB │   +192 B 
     arsc │   1.2 MiB │   1.2 MiB │      0 B │   1.2 MiB │   1.2 MiB │      0 B 
 manifest │   2.1 KiB │   2.1 KiB │      0 B │   7.4 KiB │   7.4 KiB │      0 B 
      res │ 337.4 KiB │ 337.4 KiB │      0 B │ 466.3 KiB │ 466.3 KiB │      0 B 
   native │   6.2 MiB │   6.2 MiB │      0 B │  15.8 MiB │  15.8 MiB │      0 B 
    asset │  67.3 KiB │  66.2 KiB │ -1.1 KiB │  87.3 KiB │  86.2 KiB │ -1.1 KiB 
    other │ 109.2 KiB │ 109.2 KiB │     +7 B │ 249.9 KiB │ 249.9 KiB │      0 B 
──────────┼───────────┼───────────┼──────────┼───────────┼───────────┼──────────
    total │   9.8 MiB │   9.8 MiB │ -1.1 KiB │  21.6 MiB │  21.6 MiB │   -947 B 

 DEX     │ old   │ new   │ diff         
─────────┼───────┼───────┼──────────────
   files │     1 │     1 │  0           
 strings │ 18996 │ 18997 │ +1 (+2 -1)   
   types │  5862 │  5862 │  0 (+0 -0)   
 classes │  4754 │  4754 │  0 (+0 -0)   
 methods │ 29355 │ 29360 │ +5 (+40 -35) 
  fields │ 16366 │ 16366 │  0 (+0 -0)   

 ARSC    │ old  │ new  │ diff 
─────────┼──────┼──────┼──────
 configs │  258 │  258 │  0   
 entries │ 5108 │ 5108 │  0
APK
     compressed      │     uncompressed     │                               
──────────┬──────────┼───────────┬──────────┤                               
 size     │ diff     │ size      │ diff     │ path                          
──────────┼──────────┼───────────┼──────────┼───────────────────────────────
  4.5 KiB │ -1.1 KiB │   4.4 KiB │ -1.1 KiB │ ∆ assets/dexopt/baseline.prof 
  1.8 MiB │    -13 B │   3.8 MiB │   +192 B │ ∆ classes.dex                 
 47.5 KiB │     +9 B │ 108.8 KiB │      0 B │ ∆ META-INF/CERT.SF            
 30.4 KiB │     -2 B │ 108.7 KiB │      0 B │ ∆ META-INF/MANIFEST.MF        
──────────┼──────────┼───────────┼──────────┼───────────────────────────────
  1.9 MiB │ -1.1 KiB │     4 MiB │   -947 B │ (total)
DEX
STRINGS:

   old   │ new   │ diff       
  ───────┼───────┼────────────
   18996 │ 18997 │ +1 (+2 -1) 
  + URI(scheme, authority, p…ull, fragment).toString()
  + ~~R8{backend:dex,compilation-mode:release,has-checksums:false,min-api:21,pg-map-id:e0f4dce,r8-mode:full,version:4.0.52}
  
  - ~~R8{backend:dex,compilation-mode:release,has-checksums:false,min-api:21,pg-map-id:e90d854,r8-mode:full,version:4.0.52}
  

METHODS:

   old   │ new   │ diff         
  ───────┼───────┼──────────────
   29355 │ 29360 │ +5 (+40 -35) 
  + i5.a O1(Uri) → String
  + i5.a P1(ByteArrayOutputStream, b)
  + i5.a Q1(ByteArrayOutputStream, b, String)
  + i5.a S1(ByteArrayOutputStream, b)
  + u7.l T1(Iterable, int) → int
  + u7.l U1(Collection) → ArrayList
  + u7.m V1(List, Comparator)
  + u7.n W1(Iterable, Collection)
  + u7.n X1(Iterable, c) → boolean
  + u7.n Y1(List, c)
  + u7.n Z1(ArrayList) → Object
  + u7.o A2(Iterable) → Set
  + u7.o a2(Iterable, Serializable) → boolean
  + u7.o b2(List) → ArrayList
  + u7.o c2(Collection) → Object
  + u7.o d2(List) → Object
  + u7.o e2(Collection) → Object
  + u7.o f2(List) → Object
  + u7.o g2(Iterable, Collection) → Set
  + u7.o h2(Iterable, StringBuilder, CharSequence, CharSequence, CharSequence, int, CharSequence, c)
  + u7.o i2(Iterable, StringBuilder, q, int)
  + u7.o j2(Iterable, String, String, String, c, int) → String
  + u7.o k2(List) → Object
  + u7.o l2(Iterable) → Object
  + u7.o m2(List) → Object
  + u7.o n2(ArrayList) → Comparable
  + u7.o p2(Collection) → Float
  + u7.o q2(Iterable, Collection) → ArrayList
  + u7.o r2(Collection, Object) → ArrayList
  + u7.o s2(AbstractList) → List
  + u7.o t2(Iterable, o) → List
  + u7.o u2(Iterable, AbstractCollection)
  + u7.o v2(ArrayList) → int[]
  + u7.o w2(Iterable) → List
  + u7.o x2(Collection) → ArrayList
  + u7.o y2(Iterable) → List
  + android.net.Uri getFragment() → String
  + android.net.Uri getPath() → String
  + java.net.URI <init>(String, String, String, String, String)
  + java.net.URI toString() → String
  
  - i5.a O1(ByteArrayOutputStream, b)
  - i5.a P1(ByteArrayOutputStream, b, String)
  - i5.a Q1(ByteArrayOutputStream, b)
  - u7.l S1(Iterable, int) → int
  - u7.l T1(Collection) → ArrayList
  - u7.m U1(List, Comparator)
  - u7.n V1(Iterable, Collection)
  - u7.n W1(Iterable, c) → boolean
  - u7.n X1(List, c)
  - u7.n Y1(ArrayList) → Object
  - u7.o Z1(Iterable, Serializable) → boolean
  - u7.o a2(List) → ArrayList
  - u7.o b2(Collection) → Object
  - u7.o c2(List) → Object
  - u7.o d2(Collection) → Object
  - u7.o e2(List) → Object
  - u7.o f2(Iterable, Collection) → Set
  - u7.o g2(Iterable, StringBuilder, CharSequence, CharSequence, CharSequence, int, CharSequence, c)
  - u7.o h2(Iterable, StringBuilder, q, int)
  - u7.o i2(Iterable, String, String, String, c, int) → String
  - u7.o j2(List) → Object
  - u7.o k2(Iterable) → Object
  - u7.o l2(List) → Object
  - u7.o m2(ArrayList) → Comparable
  - u7.o n2(Collection) → Float
  - u7.o p2(Iterable, Collection) → ArrayList
  - u7.o q2(Collection, Object) → ArrayList
  - u7.o r2(AbstractList) → List
  - u7.o s2(Iterable, o) → List
  - u7.o t2(Iterable, AbstractCollection)
  - u7.o u2(ArrayList) → int[]
  - u7.o v2(Iterable) → List
  - u7.o w2(Collection) → ArrayList
  - u7.o x2(Iterable) → List
  - u7.o y2(Iterable) → Set

jameswoo-stripe
jameswoo-stripe previously approved these changes Mar 9, 2023
@ccen-stripe ccen-stripe merged commit 99e2e67 into master Mar 9, 2023
@ccen-stripe ccen-stripe deleted the ccen/removeUriQueries branch March 9, 2023 23:21
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