Refactor Android permission prompt callback API#4509
Merged
shai-almog merged 1 commit intomasterfrom Feb 11, 2026
Merged
Conversation
|
Developer Guide build artifacts are available for download from this workflow run:
Developer Guide quality checks: |
✅ Continuous Quality ReportTest & Coverage
Static Analysis
Generated automatically by the PR CI workflow. |
Collaborator
Author
Android screenshot updatesCompared 31 screenshots: 30 matched, 1 error.
Native Android coverage
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
AndroidImplementation.javasmaller by extracting the permission callback contract to a dedicated top-level type.AndroidImplementationandAndroidNativeUtiluse the samePermissionPromptCallbackinterface instead of two different nested definitions.permissionPromptCallbackfield is declared with the other static fields near the top ofAndroidImplementationfor clarity.Description
com.codename1.impl.android.PermissionPromptCallbackinPorts/Android/src/com/codename1/impl/android/PermissionPromptCallback.javaand removed the nested interface definitions.permissionPromptCallbackfield into the main static field section ofAndroidImplementationand kept the existing setter/getter and prompt helpers (setPermissionPromptCallback,getPermissionPromptCallback,showPermissionPrompt,showPermissionMessage).AndroidNativeUtil.setPermissionPromptCallback(...)to delegate directly toAndroidImplementation.setPermissionPromptCallback(...)and removed the adapter code.docs/demos/android/.../PermissionSnippets.javato import and use the sharedPermissionPromptCallbacktype.Testing
git diff --checkto validate whitespace/formatting issues and it succeeded.git status --shortas a sanity check on working tree changes and it succeeded../scripts/fast-core-unit-smoke.shwith the Java 8 environment variables but it failed because the expected Java 8 runtime path is not present in this environment (failure due to missingJAVA_HOME).Codex Task