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 ImmutableByteArray.chunked and its only user #768

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

Conversation

phcoder
Copy link
Collaborator

@phcoder phcoder commented Oct 20, 2021

In its current form we would just get infinite recursion. It's not actually
ever called. Kill it and its only user

In its current form we would just get infinite recursion. It's not actually
ever called. Kill it and its only user
micolous added a commit to micolous/metrodroid-working-copy that referenced this pull request Oct 23, 2021
@micolous
Copy link
Collaborator

Ah, I have a TODO for this:

// TODO: Request more than 1 block
var addr = 0
var result = fp.readWithoutEncryption(systemNumber, serviceCode, addr)
while (result != null) {
blocks += FelicaBlock(result)
addr++
if (addr >= 0x20 && liteMagic)
break
result = fp.readWithoutEncryption(systemNumber, serviceCode, addr)
}

Unfortunately there's no documented way to probe the card how big a Service is, so I think the only option is to hard code it and hope for the best.

I've got another commit which should fix the looping issue, and fetches multiple blocks at a time. It improves performance a fair bit too

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