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 support for requesting update ownership on Android 14+ #591

Merged
merged 1 commit into from
Jun 8, 2024

Conversation

chenxiaolong
Copy link
Contributor

@chenxiaolong chenxiaolong commented May 25, 2024

If update ownership is requested during the initial install (it is a no-op for updates), then other app stores are not allowed to update the app without explicit user action. This stops Google Play from updating Firefox because the versionCode of the APKs published there are always higher.

The feature is disabled by default and is hidden if the device is running older versions of Android or if the installer method is not the session installer. EDIT: No longer optional


Screenshot of Google Play's page for Firefox when this option is used: Screenshot_20240525-113105. Firefox also no longer shows up in Google Play's pending updates list.

@Tobi823
Copy link
Owner

Tobi823 commented May 25, 2024

Thanks for your work. I will look into it. Maybe I need a few days.

@Tobi823
Copy link
Owner

Tobi823 commented Jun 2, 2024

Notes for me:

When I use setRequestUpdateOwnership and update an app with another store:

image

To revoke the update ownership, I have to uninstall FFUpdater (deleting storage is not enough)

@Tobi823
Copy link
Owner

Tobi823 commented Jun 4, 2024

I think it is better not to offer the option to enable/disable update ownership enforcement for installed apps because:

  • I want to keep FFUpdater simple and another option makes testing more complex / bugfixing more difficult
  • Enabling update ownership enforcement is (in my opinion) the expected behavior (for the majority of users).
  • An option would only make sense if FFUpdater can drop its update ownership. But I found no way ( params.setRequestUpdateOwnership(false) did not work). If an user does not want the update ownership enforcement, it is much simpler to reinstall FFUpdater than reinstall the browser app (with important data) (because the setting can only be change by FFUpdater if the browser app is reinstalled).
  • If users dont want the update ownership, they can simple reinstall FFUpdater. With an reinstall, the update ownership will be deleted.

I will change your PR in the next days and then merge it.

@chenxiaolong
Copy link
Contributor Author

chenxiaolong commented Jun 4, 2024

Sure, that makes sense. If it makes it any easier, I can update this PR to remove the option and always enable update ownership for Android 14+.

EDIT: Done

If update ownership is requested during the initial install (it is a
no-op for updates), then other app stores are not allowed to update the
app without explicit user action. This stops Google Play from updating
Firefox because the versionCode of the APKs published there are always
higher.

Signed-off-by: Andrew Gunnerson <[email protected]>
@Tobi823
Copy link
Owner

Tobi823 commented Jun 8, 2024

Thanks

@Tobi823
Copy link
Owner

Tobi823 commented Jun 8, 2024

@all-contributors please add @chenxiaolong for code

Copy link
Contributor

@Tobi823

I've put up a pull request to add @chenxiaolong! 🎉

@Tobi823 Tobi823 merged commit 5a99bcc into Tobi823:master Jun 8, 2024
@chenxiaolong chenxiaolong deleted the update_ownership branch June 8, 2024 14:39
Tobi823 added a commit that referenced this pull request Jun 30, 2024
- Thanks nortio for fixing primaryColor for status bar color (#609)
- Thanks Andrew Gunnerson (chenxiaolong) for setting "update ownership" when installing a new app (#591)
- Thanks for the Weblate contributions from: Priit Jõerüüt, Cirnos, Coool (github.com/Coool), Retrial, Flavio F. M., gallegonovato, Scrambled777, 大王叫我来巡山, Kazushi Hayama, Giovanni Donisi, Kirill Isakov, 109247019824
- Dont check for updates / don't download updates when power save mode is enabled
- Dont use OkHttp to cache network responses, use custom data structure
- Try to fix download timeouts by increasing OkHttp timeout thresholds
- Try to fix bug by initialize WorkManager if it is not initialized (#586)
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.

2 participants