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

Show a warning if calendar or contacts storage is deactivated or missing #1243

Conversation

sunkup
Copy link
Member

@sunkup sunkup commented Jan 15, 2025

Purpose

Sometimes users (mostly on Lineage) disable system apps. We can show a warning in the accounts view and a notification on sync with link to the manual.

Notification at sync seems complex and should be a separate issue: #1253

Short description

Warning in Accounts View

  • no need to request permission in manifest, because contact and calendar storage are system apps.
  • use packageChangedFlow from BroadCastReceiverFlow to check whether contacts and calendar providers are installed and enabled
  • iff missing/disabled: show action cards with warning and link to DAVx5 manual (introduction)

For testing these adb commands are helpful:

adb shell pm disable-user --user 0 com.android.providers.calendar
adb shell pm enable com.android.providers.calendar

adb shell pm uninstall -k --user 0 com.android.providers.calendar
adb shell cmd package install-existing com.android.providers.calendar

Checklist

  • The PR has a proper title, description and label.
  • I have self-reviewed the PR.
  • I have added documentation to complex functions and functions that can be used by other modules.
  • I have added reasonable tests or consciously decided to not add tests.

@sunkup sunkup self-assigned this Jan 15, 2025
@sunkup sunkup added the enhancement New feature or request label Jan 15, 2025
@sunkup sunkup force-pushed the 1228-show-a-warning-in-the-main-screen-if-calendar-or-contacts-storage-is-deactivatedmissing branch 2 times, most recently from 303063a to 7ecc5e0 Compare January 16, 2025 14:38
@sunkup sunkup requested a review from ArnyminerZ January 16, 2025 14:44
@sunkup sunkup marked this pull request as ready for review January 16, 2025 14:47
@sunkup sunkup removed the request for review from ArnyminerZ January 20, 2025 12:43
@sunkup sunkup marked this pull request as draft January 20, 2025 12:44
@sunkup sunkup marked this pull request as ready for review January 20, 2025 13:05
@sunkup sunkup requested a review from ArnyminerZ January 20, 2025 13:06
Copy link
Member

@ArnyminerZ ArnyminerZ left a comment

Choose a reason for hiding this comment

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

Just this detail. I haven't been able to test though, just checked out the code.

app/src/main/res/drawable/ic_database_off.xml Show resolved Hide resolved
@sunkup sunkup requested a review from rfc2822 January 21, 2025 09:51
ArnyminerZ
ArnyminerZ previously approved these changes Jan 21, 2025
app/src/main/res/values/strings.xml Outdated Show resolved Hide resolved
app/src/main/res/values/strings.xml Outdated Show resolved Hide resolved
@sunkup sunkup force-pushed the 1228-show-a-warning-in-the-main-screen-if-calendar-or-contacts-storage-is-deactivatedmissing branch from d315b4c to 79a066f Compare January 23, 2025 14:14
@sunkup sunkup requested a review from rfc2822 January 23, 2025 14:16
@rfc2822 rfc2822 force-pushed the 1228-show-a-warning-in-the-main-screen-if-calendar-or-contacts-storage-is-deactivatedmissing branch from f04c537 to 81cc226 Compare January 24, 2025 16:44
@rfc2822 rfc2822 force-pushed the 1228-show-a-warning-in-the-main-screen-if-calendar-or-contacts-storage-is-deactivatedmissing branch from 81cc226 to 6db4fc5 Compare January 24, 2025 16:45
@rfc2822 rfc2822 merged commit 2d686be into main-ose Jan 24, 2025
7 checks passed
@rfc2822 rfc2822 deleted the 1228-show-a-warning-in-the-main-screen-if-calendar-or-contacts-storage-is-deactivatedmissing branch January 24, 2025 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Show a warning in the main screen if Calendar or Contacts storage is deactivated/missing.
3 participants