From ea8ec6b9c2317a0f23bc0f04f930d25ef932d710 Mon Sep 17 00:00:00 2001 From: Dennis Guse Date: Sun, 8 Oct 2023 20:50:13 +0200 Subject: [PATCH] Predictive back: enable. Part of #1708. --- src/main/AndroidManifest.xml | 1 + src/main/java/de/dennisguse/opentracks/AbstractActivity.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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; }