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][CardScan] Move callback from present to creation #4778

Merged
merged 11 commits into from Mar 30, 2022

Conversation

ccen-stripe
Copy link
Collaborator

@ccen-stripe ccen-stripe commented Mar 26, 2022

Summary

  • The result callback needs to be registered during creation so that they gets re-registered when hosting activity is recreated.

  • Please see this internal ticket for more details

  • Note: this is a breaking API change and would require a major version bump

Motivation

Recovers Identity/CardScan's state when hosting activity is destroyed.

Testing

  • Added tests
  • Modified tests
  • Manually verified

Screenshots

Before After
before screenshot after screenshot

Changelog

  • [Changed] CardImageVerificationSheet - removed the callback from present to create, wrapping it inside a CardImageVerificationResultCallback object

/**
* Callback to notify when scanning finishes and a result is available.
*/
fun interface CardScanResultCallback {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is added to ease Java integration. There is a similar callback for payment at PaymentResultCallback

@github-actions
Copy link
Contributor

github-actions bot commented Mar 26, 2022

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 │  12.6 MiB │  12.6 MiB │  0 B │  42.3 MiB │  42.3 MiB │  0 B 
     arsc │   1.6 MiB │   1.6 MiB │  0 B │   1.6 MiB │   1.6 MiB │  0 B 
 manifest │   2.8 KiB │   2.8 KiB │  0 B │  12.1 KiB │  12.1 KiB │  0 B 
      res │ 772.5 KiB │ 772.5 KiB │  0 B │   1.2 MiB │   1.2 MiB │  0 B 
    asset │  78.9 KiB │  78.9 KiB │  0 B │ 108.4 KiB │ 108.4 KiB │  0 B 
    other │  79.6 KiB │  79.6 KiB │  0 B │ 154.6 KiB │ 154.6 KiB │  0 B 
──────────┼───────────┼───────────┼──────┼───────────┼───────────┼──────
    total │  15.1 MiB │  15.1 MiB │  0 B │  45.4 MiB │  45.4 MiB │  0 B 

         │          raw           │           unique            
         ├────────┬────────┬──────┼────────┬────────┬───────────
 DEX     │ old    │ new    │ diff │ old    │ new    │ diff      
─────────┼────────┼────────┼──────┼────────┼────────┼───────────
   files │      3 │      3 │    0 │        │        │           
 strings │ 204111 │ 204111 │    0 │ 180928 │ 180928 │ 0 (+0 -0) 
   types │  34911 │  34911 │    0 │  32587 │  32587 │ 0 (+0 -0) 
 classes │  30085 │  30085 │    0 │  30085 │  30085 │ 0 (+0 -0) 
 methods │ 175777 │ 175777 │    0 │ 170409 │ 170409 │ 0 (+0 -0) 
  fields │ 118124 │ 118124 │    0 │ 117382 │ 117382 │ 0 (+0 -0) 

 ARSC    │ old  │ new  │ diff 
─────────┼──────┼──────┼──────
 configs │  298 │  298 │  0   
 entries │ 5568 │ 5568 │  0

awush-stripe
awush-stripe previously approved these changes Mar 26, 2022
awush-stripe
awush-stripe previously approved these changes Mar 28, 2022
@ccen-stripe ccen-stripe enabled auto-merge (squash) March 30, 2022 01:09
@ccen-stripe ccen-stripe merged commit dcc48ef into master Mar 30, 2022
@ccen-stripe ccen-stripe deleted the moveCallback branch March 30, 2022 16:54
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.

None yet

2 participants