Skip to content

Fix MissingPermission lint error in LocationRepositoryImpl#68

Merged
neteinstein merged 3 commits intobolt_deeplink_hackfrom
copilot/sub-pr-63
Jan 19, 2026
Merged

Fix MissingPermission lint error in LocationRepositoryImpl#68
neteinstein merged 3 commits intobolt_deeplink_hackfrom
copilot/sub-pr-63

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 17, 2026

Lint was failing on fusedLocationClient.getCurrentLocation() despite runtime permission checks being present. The @RequiresPermission annotation was incorrectly placed on a lambda expression where lint can't recognize it.

Changes:

  • Added @SuppressLint("MissingPermission") to getCurrentLocation() method
  • Removed misplaced @RequiresPermission annotation from lambda expression
  • Method already performs runtime hasLocationPermission() check before API call
@SuppressLint("MissingPermission")
override suspend fun getCurrentLocation(): Location? {
    if (!hasLocationPermission()) {
        Log.w("LocationRepository", "Location permission not granted")
        return null
    }
    
    return withContext(Dispatchers.IO) {
        // Location API call protected by runtime check above
        fusedLocationClient.getCurrentLocation(...)
    }
}

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: neteinstein <910242+neteinstein@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Jan 17, 2026

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • dl.google.com
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.xml/javax.xml.namespace=ALL-UNNAMED -XX:MaxMetaspaceSize=512m -XX:&#43;HeapDumpOnOutOfMemoryError -Xmx4g -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en -Duser.variant (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] Fix Bolt deep link with dual-intent fallback Fix MissingPermission lint error in LocationRepositoryImpl Jan 17, 2026
Copilot AI requested a review from neteinstein January 17, 2026 13:23
@neteinstein neteinstein marked this pull request as ready for review January 19, 2026 16:40
@neteinstein neteinstein merged commit 053ab5b into bolt_deeplink_hack Jan 19, 2026
@neteinstein neteinstein deleted the copilot/sub-pr-63 branch January 19, 2026 16:41
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.

2 participants