Skip to content

Remove unnecessary media permissions to comply with Google Play policy#257

Merged
rileychh merged 5 commits into
masterfrom
remove-unnecessary-permissions
Feb 7, 2026
Merged

Remove unnecessary media permissions to comply with Google Play policy#257
rileychh merged 5 commits into
masterfrom
remove-unnecessary-permissions

Conversation

@rileychh
Copy link
Copy Markdown
Member

@rileychh rileychh commented Feb 7, 2026

Summary

  • Remove READ_MEDIA_IMAGES, READ_MEDIA_VIDEO, READ_MEDIA_AUDIO, READ_EXTERNAL_STORAGE, and WRITE_EXTERNAL_STORAGE permissions from Android manifest — the app only downloads files to app-scoped storage (getExternalStorageDirectory), which requires no permissions on any supported Android version (minSdk 24)
  • Force-remove READ_MEDIA_* permissions contributed by the open_filex plugin via manifest merger using tools:node="remove"
  • Simplify PermissionsUtil to always return true on Android since no storage permissions are needed for app-scoped storage, removing device_info_plus and permission_handler imports
  • Remove NSPhotoLibraryUsageDescription from iOS Info.plist since the app does not access the photo library

Test plan

  • Verify file downloads still work on Android without permission prompts
  • Verify merged manifest contains no READ_MEDIA_* permissions after build
  • Verify the file viewer page still opens downloaded files
  • Submit to Google Play and confirm the policy violation is resolved

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR aims to reduce platform permission surface area to comply with Google Play policy by removing unnecessary media/photo library permissions and simplifying the app’s runtime permission flow for file downloads.

Changes:

  • Removed Android media read permissions (READ_MEDIA_*) and legacy READ_EXTERNAL_STORAGE from AndroidManifest.xml.
  • Simplified Android storage permission checks in PermissionsUtil (no runtime permission requests on API 29+).
  • Removed iOS NSPhotoLibraryUsageDescription from Info.plist.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
lib/src/util/permissions_util.dart Simplifies Android storage permission logic based on SDK level.
ios/Runner/Info.plist Removes photo library usage description entry.
android/app/src/main/AndroidManifest.xml Removes media/external read permissions; keeps legacy write permission with maxSdkVersion.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lib/src/util/permissions_util.dart Outdated
Comment thread android/app/src/main/AndroidManifest.xml Outdated
Comment thread lib/src/util/permissions_util.dart Outdated
Comment thread pubspec.yaml
publish_to: 'none'

# CHECK THE BUILD CODE BEFORE DISTRIBUTION!!
version: 1.6.9+5269
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

not nice

@rileychh rileychh enabled auto-merge (squash) February 7, 2026 15:19
@rileychh rileychh merged commit 3333431 into master Feb 7, 2026
4 checks passed
@rileychh rileychh deleted the remove-unnecessary-permissions branch February 7, 2026 17:39
@rileychh rileychh mentioned this pull request Feb 7, 2026
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.

3 participants