Files
odfstudio/android/source/src
Michael Weghorn 354c70556b android: Port from deprecated ComponentActivity.onBackPressed (II)
Port LibreOfficeUIActivity from overriding the deprecated
androidx.ComponentActivity.onBackPressed method [1]
and register a androidx.activity.OnBackPressedCallback [2].

Overriding the deprecated API was already triggering a warning
and that was turned into a build/lint error in a WIP branch updating the
compileSdkVersion and targetSdkVersion to 36.

Interaction when using the back button (or gesture)
remains the same after enabling experimental editing option
and clicking the "+" button to display the options to create
new filesin a quick test (with an additional
local revert of commit 9d1e76f7da
to prevent a deadlock when opening documents that is unrelated
to this change here).

[1] https://developer.android.com/reference/androidx/activity/ComponentActivity#onBackPressed()
[2] https://developer.android.com/reference/androidx/activity/OnBackPressedCallback

Change-Id: Ie5e9f3be7321d40f43ebf584db367432afb70577
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187573
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2025-07-10 07:25:30 +02:00
..