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

Add setting for users to determine frequency of backup creation #13199

Open
wants to merge 22 commits into
base: main
Choose a base branch
from

Conversation

farewelltospring
Copy link

@farewelltospring farewelltospring commented Oct 2, 2023

First time contributor checklist

Contributor checklist

  • Sony Xperia 5iii, Android 13
  • Virtual device Pixel 3, Android 13
  • My contribution is fully baked and ready to be merged as is
  • I ensure that all the open issues my contribution fixes are mentioned in the commit message of my first commit using the Fixes #1234 syntax

Description

This pull request allows users change the frequency that backups are made to a selected interval (weekly, monthly, quarterly, every 6 months, annually).

Currently, when backups are enabled, Signal will create a fresh backup every 24-hours. This causes unnecessary write cycles on the device's internal storage or SD card.

  • Making backups is a power-intensive process which drains battery and uses CPU cycles which can put a strain on daily usage when users are out and about, and slow down other apps on the device while the backups are being created.
  • Different users have different needs from backups. Some users message on Signal all day long, and others message on Signal infrequently. A 24-hour backup schedule is useful for the first group, but is of dubious value for the second group. It will write an identical file over and over.
  • Low-end devices are wearing out prematurely. Many low-end Android phones have low-durability eMMC chips. A 24-hour backup schedule makes their already-short lifespan even shorter. eMMC chips will fail catastrophically when they reach end-of-life. The device bricks, and the user must replace the whole thing. This disproportionately hurts Signal's poor users and produces environmental pollution.

A setting to control the backup frequency would also give people more control over their data, which is an important value to cultivate in today's society.

Verified that this behaviour works by setting backup frequency to 30 days and then waiting that long to see if a backup got created (I restarted the device several times during that time period to verify that it persists).

Screen_recording_20240111_000341.mp4

farewelltospring added 14 commits May 10, 2023 01:07
Yes I know this is bad practice but it's just for testing purposes
Rename OK button and add cancel button
Apparently it's a Unix timestamp in milliseconds and this took me way
too long to figure out myself
When changing backup frequency settings, schedule the next backup using
the new setting, but relative to the timestamp of the latest backup,
instead of immediately.

This ensures that backups are not created too frequently. A backup will
only be immediately created if the latest backup was too long ago,
relative to the new frequency setting, or if there is no latest backup.
Copy link

stale bot commented Dec 1, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Dec 1, 2023
farewelltospring added 3 commits December 3, 2023 01:24
- Replace debug toast with debug log statement
- Use MaterialAlertDialog instead of boring AlertDialog
@stale stale bot removed the wontfix label Dec 3, 2023
@farewelltospring
Copy link
Author

Fixed the localisation issue. I have only added a string for English but at least there are resources now.

farewelltospring added 2 commits December 4, 2023 01:22
Just because the plural has a single manifestation in English doesn't
mean we don't need to have plurals for it in other languages.
@farewelltospring
Copy link
Author

Is there anything I can do to make this PR better?

@farewelltospring
Copy link
Author

farewelltospring commented Jan 11, 2024

Added a video recording demonstrating the feature. (link)

Copy link

stale bot commented Mar 12, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Mar 12, 2024
@stale stale bot removed the wontfix label Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant