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

Use activity instead of fragment for cardscan #6253

Conversation

awush-stripe
Copy link
Collaborator

@awush-stripe awush-stripe commented Feb 23, 2023

Summary

The cardscan fragment is causing crashes on the stripe payment sheets page. Replace the fragment with the full-screen scan, which should not have the same camera error issues.

Motivation

#6116

Testing

  • Added tests
  • Modified tests
  • Manually verified

Screenshots

Before After
IMG_0032 IMG_0031

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.

Would be nice to see before/after if it looks different.

Do we need release notes?

@github-actions
Copy link
Contributor

github-actions bot commented Feb 23, 2023

Diffuse output:

OLD: paymentsheet-example-release-master.apk (signature: none)
NEW: paymentsheet-example-release-pr.apk (signature: none)

          │          compressed          │          uncompressed          
          ├──────────┬──────────┬────────┼───────────┬───────────┬────────
 APK      │ old      │ new      │ diff   │ old       │ new       │ diff   
──────────┼──────────┼──────────┼────────┼───────────┼───────────┼────────
      dex │  5.8 MiB │  5.8 MiB │ +131 B │  15.1 MiB │  15.1 MiB │ -484 B 
     arsc │  2.1 MiB │  2.1 MiB │    0 B │   2.1 MiB │   2.1 MiB │    0 B 
 manifest │  4.4 KiB │  4.4 KiB │    0 B │    21 KiB │    21 KiB │    0 B 
      res │  1.1 MiB │  1.1 MiB │    0 B │   1.9 MiB │   1.9 MiB │    0 B 
   native │  2.6 MiB │  2.6 MiB │    0 B │     6 MiB │     6 MiB │    0 B 
    asset │    3 MiB │    3 MiB │  +11 B │     3 MiB │     3 MiB │  +11 B 
    other │ 83.3 KiB │ 83.3 KiB │    0 B │ 159.7 KiB │ 159.7 KiB │    0 B 
──────────┼──────────┼──────────┼────────┼───────────┼───────────┼────────
    total │ 14.6 MiB │ 14.6 MiB │ +142 B │  28.3 MiB │  28.3 MiB │ -473 B 

         │          raw           │            unique            
         ├────────┬────────┬──────┼────────┬────────┬────────────
 DEX     │ old    │ new    │ diff │ old    │ new    │ diff       
─────────┼────────┼────────┼──────┼────────┼────────┼────────────
   files │      2 │      2 │    0 │        │        │            
 strings │  93162 │  93161 │   -1 │  77965 │  77964 │ -1 (+0 -1) 
   types │  24542 │  24541 │   -1 │  22199 │  22198 │ -1 (+0 -1) 
 classes │  19958 │  19957 │   -1 │  19958 │  19957 │ -1 (+0 -1) 
 methods │ 106247 │ 106240 │   -7 │ 101902 │ 101897 │ -5 (+0 -5) 
  fields │ 102883 │ 102883 │    0 │ 101616 │ 101616 │  0 (+0 -0) 

 ARSC    │ old  │ new  │ diff 
─────────┼──────┼──────┼──────
 configs │  333 │  333 │  0   
 entries │ 6867 │ 6867 │  0
APK
    compressed    │   uncompressed   │                               
─────────┬────────┼─────────┬────────┤                               
 size    │ diff   │ size    │ diff   │ path                          
─────────┼────────┼─────────┼────────┼───────────────────────────────
 2.3 MiB │ +131 B │ 6.5 MiB │ -484 B │ ∆ classes2.dex                
 8.2 KiB │  +11 B │ 8.1 KiB │  +11 B │ ∆ assets/dexopt/baseline.prof 
─────────┼────────┼─────────┼────────┼───────────────────────────────
 2.4 MiB │ +142 B │ 6.5 MiB │ -473 B │ (total)
DEX
STRINGS:

   old   │ new   │ diff       
  ───────┼───────┼────────────
   77965 │ 77964 │ -1 (+0 -1) 
  - Lcom/stripe/android/ui/core/cardscan/CardScanActivity_onStart_1;
  

TYPES:

   old   │ new   │ diff       
  ───────┼───────┼────────────
   22199 │ 22198 │ -1 (+0 -1) 
  - Lcom/stripe/android/ui/core/cardscan/CardScanActivity_onStart_1;
  

METHODS:

   old    │ new    │ diff       
  ────────┼────────┼────────────
   101902 │ 101897 │ -5 (+0 -5) 
  - com.stripe.android.ui.core.cardscan.CardScanActivity_onStart_1 <init>(Object)
  - com.stripe.android.ui.core.cardscan.CardScanActivity_onStart_1 invoke(Object) → Object
  - com.stripe.android.ui.core.cardscan.CardScanActivity_onStart_1 invoke(CardScanSheetResult)
  - com.stripe.android.ui.core.cardscan.CardScanActivity onStart()
  - com.stripe.android.ui.core.cardscan.CardScanActivity onStop()

@awush-stripe
Copy link
Collaborator Author

Would be nice to see before/after if it looks different.

Do we need release notes?

Good call! I've updated the CHANGELOG. I'll add a before + after momentarily

@awush-stripe awush-stripe enabled auto-merge (squash) February 23, 2023 18:38
@awush-stripe awush-stripe merged commit 97d7561 into master Feb 23, 2023
@awush-stripe awush-stripe deleted the awush/RUN_INTERVENTIONS-9/use_activity_instead_of_fragment_for_cardscan branch February 23, 2023 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants