Skip to content

feat: Allow disabling kDrive display in ContentProvider#2015

Merged
aymericmariaux merged 9 commits into
mainfrom
disable-kdrive-in-file-app
May 11, 2026
Merged

feat: Allow disabling kDrive display in ContentProvider#2015
aymericmariaux merged 9 commits into
mainfrom
disable-kdrive-in-file-app

Conversation

@aymericmariaux
Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings April 28, 2026 13:07
@aymericmariaux aymericmariaux force-pushed the disable-kdrive-in-file-app branch from fb2ddb0 to 1cb1e52 Compare April 28, 2026 13:11
@aymericmariaux aymericmariaux marked this pull request as draft April 28, 2026 13:24
@aymericmariaux aymericmariaux marked this pull request as ready for review April 28, 2026 13:24
@aymericmariaux aymericmariaux force-pushed the disable-kdrive-in-file-app branch 2 times, most recently from 0480d50 to 1cb1e52 Compare April 29, 2026 11:29
@aymericmariaux aymericmariaux requested review from NicolasBourdin88 and Copilot and removed request for NicolasBourdin88 and Copilot April 29, 2026 12:57
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

Adds a new Security settings screen that lets users toggle whether kDrive’s DocumentsProvider is exposed to the system “Files” app (and other third‑party file pickers), and wires that screen into the existing Settings navigation.

Changes:

  • Added “Show in Files” strings (with multiple localizations) and a new Security settings screen UI.
  • Added a new SecuritySettingsFragment and navigation route from SettingsFragment.
  • Implemented a persisted “provider disabled” flag in CloudStorageProvider and enforced it in queryChildDocuments() / openDocument().

Reviewed changes

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

Show a summary per file
File Description
app/src/main/res/values/strings.xml Adds new strings for the “Show in Files” toggle and provider-disabled error.
app/src/main/res/values-*/strings.xml Adds translations for the new provider toggle/error strings (sv/pt/pl/nl/nb/it/fr/fi/es/el/de/da).
app/src/main/res/navigation/main_navigation.xml Adds navigation action from Settings to the new Security settings fragment; registers the fragment destination.
app/src/main/res/layout/fragment_settings_security.xml New Security settings screen layout containing app lock and provider toggle.
app/src/main/res/layout/fragment_settings.xml Replaces the previous “App Security” row with a chevron row leading to Security settings.
app/src/main/java/com/infomaniak/drive/ui/menu/settings/SettingsFragment.kt Updates Settings click handling to navigate to the new Security settings screen.
app/src/main/java/com/infomaniak/drive/ui/menu/settings/SecuritySettingsFragment.kt New fragment controlling app-lock entry and “Show in Files” provider toggle.
app/src/main/java/com/infomaniak/drive/ui/menu/settings/AppSecuritySettingsActivity.kt Forces provider disable when enabling app lock.
app/src/main/java/com/infomaniak/drive/data/documentprovider/CloudStorageProvider.kt Adds shared-pref flag + enforcement for disabled provider behavior and root refresh notifications.

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

Comment thread app/src/main/res/layout/fragment_settings.xml Outdated
Comment thread app/src/main/res/layout/fragment_settings_security.xml Outdated
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

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


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

Comment thread app/src/main/res/navigation/main_navigation.xml Outdated
@aymericmariaux aymericmariaux requested a review from Copilot April 30, 2026 07:25
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

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


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

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

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


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

@aymericmariaux aymericmariaux force-pushed the disable-kdrive-in-file-app branch from b4ac763 to 812f383 Compare May 4, 2026 11:11
@FabianDevel FabianDevel changed the title feat: Allow disabling kDrive display in files feat: Allow disabling kDrive display in ContentProvider May 6, 2026
Comment thread app/src/main/res/layout/fragment_settings_security.xml Outdated
Prevents contentProviderSwitch from re-triggering its listener in onResume, avoiding redundant calls to CloudStorageProvider.setDisabled() and notifyRootsChanged().
Previously, the Content Provider was locked as soon as the app lock screen appeared, even if the user cancelled the password entry by pressing back.

Now, the Content Provider is only locked if the lock process is completed successfully.
@aymericmariaux aymericmariaux force-pushed the disable-kdrive-in-file-app branch from 11018e6 to 08be97a Compare May 11, 2026 14:54
@FabianDevel FabianDevel enabled auto-merge May 11, 2026 14:58
@FabianDevel FabianDevel disabled auto-merge May 11, 2026 15:00
@aymericmariaux aymericmariaux enabled auto-merge May 11, 2026 15:02
@sonarqubecloud
Copy link
Copy Markdown

@aymericmariaux aymericmariaux merged commit 79b1665 into main May 11, 2026
7 checks passed
@aymericmariaux aymericmariaux deleted the disable-kdrive-in-file-app branch May 11, 2026 15:17
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