android/source/build.gradle              |    4 ++--
 android/source/res/values-v35/themes.xml |    8 ++++++++
 2 files changed, 10 insertions(+), 2 deletions(-)

New commits:
commit 2b77994d455b8d066baf6b67c1820fbb736b538f
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Thu Jul 10 12:32:02 2025 +0200
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Fri Jul 11 07:09:32 2025 +0200

    android: Update compile/targetSdkVersion to 35, disable edge-to-edge
    
    Update compileSdk and targetSdkVersion to 35 (Android 15).
    
    In a quick test, running the app seems fine in an API 36 (Android 16)
    AVD configured to use 16 KB Page Size, for which support was added
    in Android 15 [1].
    
    Changing the targetSdkVersion to 35 implies that edge-to-edge
    would now enabled by default [2]. That would result in the
    app par overlapping with the system bar and interaction would
    be broken. For now, avoid that by explicitly opting out of
    edge-to-edge support by setting
    android:windowOptOutEdgeToEdgeEnforcement for API versions >= 35
    in the LibreOfficeTheme used by all activities by now.
    
    Helpful article: [3]
    
    That won't work for targetSdkVersion 36 any more (see [4]),
    but at least helps to comply with the upcoming required
    targetSdkVersion of 35 in Google Play and gives some time
    to implement proper support for edge-to-edge
    for Android 16+ devices before increasing the targetSdkVersion
    further.
    
    Android Viewer works as expected in a quick test
    with an API 36 (Android 16) x86_64 AVD
    and an API 24 (Android 7) x86 AVD (with an additional
    local revert of commit 9d1e76f7da12353afc3d9479d3b2ecddbb2a71e6
    to prevent a deadlock when opening documents that is unrelated
    to this change here).
    
    [1] https://developer.android.com/about/versions/15/behavior-changes-all
    [2] 
https://developer.android.com/about/versions/15/behavior-changes-15#window-insets
    [3] 
https://medium.com/androiddevelopers/insets-handling-tips-for-android-15s-edge-to-edge-enforcement-872774e8839b
    [4] 
https://developer.android.com/about/versions/16/behavior-changes-16#edge-to-edge
    
    Change-Id: Id6d33bfbb7ca49c65e3875efb87c3c575be5f5ce
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187627
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>

diff --git a/android/source/build.gradle b/android/source/build.gradle
index 4a2d6da4cf4d..e1a881f4749e 100644
--- a/android/source/build.gradle
+++ b/android/source/build.gradle
@@ -43,7 +43,7 @@ base {
 
 android {
     namespace 'org.libreoffice'
-    compileSdk 34
+    compileSdk 35
     buildFeatures {
         buildConfig = true
     }
@@ -60,7 +60,7 @@ android {
     }
     defaultConfig {
         // minSdkVersion is set in liboSettings.gradle
-        targetSdkVersion 34
+        targetSdkVersion 35
         vectorDrawables.useSupportLibrary = true
     }
     buildTypes {
diff --git a/android/source/res/values-v35/themes.xml 
b/android/source/res/values-v35/themes.xml
new file mode 100644
index 000000000000..6b92655a2a93
--- /dev/null
+++ b/android/source/res/values-v35/themes.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+    <style name="LibreOfficeTheme" 
parent="Theme.AppCompat.DayNight.NoActionBar">
+        <item name="android:windowOptOutEdgeToEdgeEnforcement">
+            true
+        </item>
+    </style>
+</resources>

Reply via email to