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

Improved WebView permission handling in EclairUtil.java #3380

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

Conversation

Akash-creator-dot
Copy link

@Akash-creator-dot Akash-creator-dot commented Feb 18, 2025

General Items:
I have updated the relevant documentation files under docs/
My code follows the:
Google Java style guide (for .java files)
Google JavaScript style guide (for .js files)
ant tests passes on my machine
If Your Code Changes How Something Works on the Device (i.e., It Affects the Companion):
I branched from ucr
My pull request has ucr as the base
Further, If You've Changed the Blocks Language or Another User-Facing Designer/Blocks API (e.g., Added a SimpleProperty, etc.):
I have updated the corresponding version number in appinventor/components/src/.../common/YaVersion.java
I have updated the corresponding upgrader in appinventor/appengine/src/.../client/youngandroid/YoungAndroidFormUpgrader.java (components only)
I have updated the corresponding entries in appinventor/blocklyeditor/src/versioning.js
For All Other Changes:
I branched from master
My pull request has master as the base
What Does This PR Accomplish?
Description:
This PR improves the handling of WebView permissions in EclairUtil.java to enhance security, stability, and user experience.

Key Improvements:
✅ Optimized Geolocation Permissions:

Updated the onGeolocationPermissionsShowPrompt method to request location permissions dynamically.
Improved user prompts to ensure better handling of permission requests.
✅ Enhanced Code Efficiency:

Removed redundant condition checks and improved readability.
Ensured backward compatibility with older Android versions while adhering to modern best practices.
✅ Bug Fixes & Security Enhancements:

Fixed potential security loopholes in handling JavaScript-enabled WebViews.
Ensured compliance with Google's security policies for WebView usage.
Why is This PR Needed?
Fixes inconsistencies in WebView geolocation permissions.
Improves user experience by providing a smoother permission request flow.
Enhances security and code maintainability.
Fixes #3380

@AppInventorWorkerBee
Copy link
Collaborator

Can one of the admins verify this patch?

1 similar comment
@AppInventorWorkerBee
Copy link
Collaborator

Can one of the admins verify this patch?

@Akash-creator-dot
Copy link
Author

@ewpatton Could you please review this PR? It improves WebView permissions handling in EclairUtil.java.

Akash-creator-dot

This comment was marked as duplicate.

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

Successfully merging this pull request may close these issues.

3 participants