Skip to content

feat: New QoL features#21

Open
secp192k1 wants to merge 28 commits into
VisionR1:masterfrom
secp192k1:master
Open

feat: New QoL features#21
secp192k1 wants to merge 28 commits into
VisionR1:masterfrom
secp192k1:master

Conversation

@secp192k1

Copy link
Copy Markdown

wip but we cooking

@secp192k1

Copy link
Copy Markdown
Author

I think is is good enough for now 😄

@secp192k1 secp192k1 marked this pull request as ready for review July 3, 2026 15:19
@VisionR1

VisionR1 commented Jul 3, 2026

Copy link
Copy Markdown
Owner

@secp192k1

Thanks 🙏🏻

Wow lot of changes, must examine carefully, because and me i have make some local change.

@VisionR1 VisionR1 added the enhancement New feature or request label Jul 6, 2026
@VisionR1

Copy link
Copy Markdown
Owner

@secp192k1

I see a lot of work.

Thanks 🙏🏻

You have finished or have more?

I think i have fix some issue on my local files, so when add my local changes, if need can you adapt the PR?

@secp192k1

Copy link
Copy Markdown
Author

@VisionR1
You're welcome! My telegram, discord and all my socials are [@]secp192k1 if you wanna get in touch

I don't have anything else in mind to add ^^
And yes if needed I can fix/refactor the PR

- Improvement AttestationRepository.java and KeyBoxXmlParser.java to load a keybox.xml

- Fix crash on Samsung Knox/RKP screens when integrity data is null

- General improve for display proper the error messages

- Update translation for the new error messages
@VisionR1

Copy link
Copy Markdown
Owner

@secp192k1

Just uploaded my changes.

@VisionR1

Copy link
Copy Markdown
Owner

@secp192k1

So, now is ready?

I'm curious to ask, why change the: import static io.github.vvb2060.keyattestation.lang.AttestationException.*;

and added every error code ?

@secp192k1

Copy link
Copy Markdown
Author

@VisionR1 hold on, missing some checks I noticed and local changes, ill add a comment soon
Also yes added all error codes, there were some missing

@VisionR1

VisionR1 commented Jul 13, 2026

Copy link
Copy Markdown
Owner

@VisionR1 hold on, missing some checks I noticed and local changes, ill add a comment soon Also yes added all error codes, there were some missing

Don't worry, take your time.

Yeah that i ask, why not keep the import static io.github.vvb2060.keyattestation.lang.AttestationException.*; and instead you have put all the code error separate?

@secp192k1

Copy link
Copy Markdown
Author

Yeah that i ask, why not keep the import static io.github.vvb2060.keyattestation.lang.AttestationException.*; and instead you have put all the code error separate?

They where already like that but sure I'll change :)

@secp192k1

Copy link
Copy Markdown
Author

@VisionR1 ready, all yours!
Let me know if you want anything else ^^

Cheers

@VisionR1

Copy link
Copy Markdown
Owner

Yeah that i ask, why not keep the import static io.github.vvb2060.keyattestation.lang.AttestationException.*; and instead you have put all the code error separate?

They where already like that but sure I'll change :)

Yeah, instead of all the code error we use the *, for that i ask you why you change it and add all the code error.

Also, in this file EatClaim.java instead of all the code error, keep the original: import static io.github.vvb2060.keyattestation.attestation.AuthorizationList.*;

Like this can take all, and no need separete, or maybe you have change anything and needeed separete ?

@secp192k1

Copy link
Copy Markdown
Author

Yeah that i ask, why not keep the import static io.github.vvb2060.keyattestation.lang.AttestationException.*; and instead you have put all the code error separate?

They where already like that but sure I'll change :)

Yeah, instead of all the code error we use the *, for that i ask you why you change it and add all the code error.

Also, in this file EatClaim.java instead of all the code error, keep the original: import static io.github.vvb2060.keyattestation.attestation.AuthorizationList.*;

Like this can take all, and no need separete, or maybe you have change anything and needeed separete ?

Nope, tested without it, i THINK i didnt miss anything else 😭

@VisionR1

Copy link
Copy Markdown
Owner

Yeah that i ask, why not keep the import static io.github.vvb2060.keyattestation.lang.AttestationException.*; and instead you have put all the code error separate?

They where already like that but sure I'll change :)

Yeah, instead of all the code error we use the , for that i ask you why you change it and add all the code error.
Also, in this file EatClaim.java instead of all the code error, keep the original: import static io.github.vvb2060.keyattestation.attestation.AuthorizationList.
;
Like this can take all, and no need separete, or maybe you have change anything and needeed separete ?

Nope, tested without it, i THINK i didnt miss anything else 😭

Don't worry, take a breath.

I will check it one more.

But maybe I missed something, we are human, we make mistakes.

@VisionR1

Copy link
Copy Markdown
Owner

@secp192k1

On RevocationList.java‎.

The volatile additions are perfect and really help with thread safety for the Double-Checked Locking pattern.

But, there is a issue with the timeout changes that will cause the refresh button to break on slow connections:

The Problem:
You correctly increased the internal network timeouts to 10 seconds (connect) and 20 seconds (read). But, the app still has a hard 3-second limit wrapping this task (future.get(3, TimeUnit.SECONDS)).

What happens on a slow network:

  1. The app waits 3 seconds, hits the future.get() limit, gives up, and moves on.

  2. But, the background network thread ignores the cancellation and keeps trying to connect/read for up to 30 seconds because of the new 10_000/20_000 limits.

  3. Because networkExecutor only has one thread (newSingleThreadExecutor), that thread is now stuck doing useless background work.

  4. If the user presses "refresh" during those 30 seconds, the new request gets stuck in a queue and does nothing because the single thread is busy.

So, to fix this:

Option 1: Change future.get(3, TimeUnit.SECONDS) to 30 so the app actually waits for new network timeouts to finish.

Option 2: Keep the 3-second UI failover, but change networkExecutor to Executors.newCachedThreadPool() so that a stuck background connection doesn't block the user from trying to refresh again.

Or if you have better fix,

Already, i have fix this issue with slow network or VPN, so we don't want break again.

See the issue: #16

@secp192k1

Copy link
Copy Markdown
Author

Option 1: Change future.get(3, TimeUnit.SECONDS) to 30 so the app actually waits for new network timeouts to finish.

This would make refresh visibly hang on bad networks

Option 2: Keep the 3-second UI failover, but change networkExecutor to Executors.newCachedThreadPool() so that a stuck background connection doesn't block the user from trying to refresh again.

This seems to work, but repeated refreshes on a slow network connection accumulates concurrent stuck-connection threads with no limit

Or if you have better fix,

My suggested fix keeps the 3s UI response limit, keeping the single-thread executor (fixing the issue from option 2), and doesn't touch the timeout values

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants