Skip to content

Conversation

@t895
Copy link
Contributor

@t895 t895 commented Jan 4, 2025

No description provided.

t895 added 3 commits January 3, 2025 23:22
Introduced in Android 15, and while this isn't required, this avoids any internal exceptions

override fun onTimeout(startId: Int, fgsType: Int) {
super.onTimeout(startId, fgsType)
stopSelf()
Copy link
Member

Choose a reason for hiding this comment

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

This behavior doesn't fit with the service's purpose

Copy link
Contributor Author

Choose a reason for hiding this comment

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

onTimeout is called after 6 hours of background activity, so would it be best to allow it to throw an exception then?
It's probably fair to assume that this service shouldn't be running for very long right?

Copy link
Member

Choose a reason for hiding this comment

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

https://developer.android.com/about/versions/15/behavior-changes-15#datasync-timeout

We can change the service type from dataSync to specialUse to avoid this API 35 requirement for dataSync. We can't publish this app on the Play Store and it wouldn't make sense to do it since it should update itself, so we don't need to deal with specialUse being approved.

Copy link
Member

Choose a reason for hiding this comment

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

We use specialUse in System Updater already.

Copy link
Member

Choose a reason for hiding this comment

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

Handled with 4959168.

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