diff --git a/src/main/AndroidManifest.xml b/src/main/AndroidManifest.xml index 353248b851..538121546d 100644 --- a/src/main/AndroidManifest.xml +++ b/src/main/AndroidManifest.xml @@ -69,6 +69,7 @@ limitations under the License. android:allowBackup="true" android:fullBackupContent="@xml/backup_rules_30_lower" android:dataExtractionRules="@xml/backup_rules_31_higher" + android:enableOnBackInvokedCallback="true" android:hardwareAccelerated="true" android:hasFragileUserData="false" android:icon="@drawable/ic_launcher" diff --git a/src/main/java/de/dennisguse/opentracks/AbstractActivity.java b/src/main/java/de/dennisguse/opentracks/AbstractActivity.java index aae4c9b7db..4a6a9bb67b 100644 --- a/src/main/java/de/dennisguse/opentracks/AbstractActivity.java +++ b/src/main/java/de/dennisguse/opentracks/AbstractActivity.java @@ -40,7 +40,7 @@ protected void onCreate(Bundle savedInstanceState) { @Override public boolean onSupportNavigateUp() { - onBackPressed(); + getOnBackPressedDispatcher().onBackPressed(); return true; }