Skip to content
This repository was archived by the owner on Oct 15, 2024. It is now read-only.

Conversation

@msfjarvis
Copy link
Member

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring
  • Dependency updates

📜 Description

Updates dependencies, slightly refactors instances of registerForActivityResult and fixes the pull request workflow to correctly run in all needed scenarios.

💡 Motivation and Context

  • github: switch PR workflow from an allowlist to a blocklist

Pull Requests currently do not run for changes to autofill-parser, this fixes that and makes the workflow require less changes going forward.

  • all: refactor ActivityResultContracts usages to adhere to API requirements

The API now strictly demands all contracts be eagerly registered at class init, we now comply with this requirement.

  • build: uprev dependencies

Updates to Biometric for memory leak fixes, to Activity and Fragment for new contract registration requirements and a fix for request code pool starvation, and to Core for no good reason :P

💚 How did you test it?

Verified biometrics works as before and all previously lazy registrations of activity result contracts don't trigger crashes now.

📝 Checklist

  • I formatted the code with the IDE's reformat action (Ctrl + Shift + L/Cmd + Shift + L)
  • I reviewed submitted code
  • I added a CHANGELOG entry if applicable

🔮 Next steps

📸 Screenshots / GIFs

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
…ments

The newest versions of AndroidX Activity and Fragments correctly enforce the
requirement for all contracts to be registered at class init or before
the lifecycle has reached `Lifecycle.State.STARTED`. To comply with these requirements,
move all instances of `registerForActivityResult` being called at arbitrary points
in the code to be done at class init.

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
fmeum
fmeum previously approved these changes Oct 2, 2020
Copy link
Member

@fmeum fmeum left a comment

Choose a reason for hiding this comment

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

Looks good to me with one suggested change. I don't like the additional class members, but also don't see a way around them.

const serviceChanged = result.data.filter(f => f.filename.startsWith("app/") || f.filename.startsWith("buildSrc/") || f.filename.endsWith("gradle") || f.filename.startsWith(".github/workflows/pull_request.yml") || f.filename.startsWith("gradle") || f.filename.endsWith("properties")).length > 0
console.log(serviceChanged)
return serviceChanged
const shouldRun = result.data.filter(f => !f.filename.endsWith("md") || !f.filename.endsWith("txt") || !f.filename.startsWith("contrib") || !f.filename.endsWith("yml")).length > 0
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
const shouldRun = result.data.filter(f => !f.filename.endsWith("md") || !f.filename.endsWith("txt") || !f.filename.startsWith("contrib") || !f.filename.endsWith("yml")).length > 0
const shouldRun = result.data.filter(f => !f.filename.endsWith(".md") || !f.filename.endsWith(".txt") || !f.filename.startsWith("contrib/") || !f.filename.endsWith(".yml")).length > 0

This is going to be less work to maintain going forward since we won't need to
change it every time we include a new subproject.

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
@msfjarvis msfjarvis merged commit 9dc5621 into android-password-store:develop Oct 2, 2020
@msfjarvis msfjarvis deleted the dependency-updates branch October 2, 2020 14:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants