android/source/AndroidManifest.xml                                |    2 
 android/source/build.gradle                                       |    4 -
 android/source/gradle/wrapper/gradle-wrapper.properties           |    4 -
 android/source/lint-baseline.xml                                  |   28 
++++++++--
 android/source/src/java/org/libreoffice/FormattingController.java |    2 
 5 files changed, 31 insertions(+), 9 deletions(-)

New commits:
commit 5ad26dfac2a4d3f209721c5c3c9b7b6d6ad71a6f
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Mon May 13 13:00:57 2024 +0200
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Tue May 14 08:37:43 2024 +0200

    android: Don't restrict taking photo to rear camera
    
    Check for `FEATURE_CAMERA_ANY` ("The device has at least
    one camera pointing in some direction, or can support an
    external camera being connected to it.") [1] instead
    of only the rear camera via `FEATURE_CAMERA`
    ("The device has a camera facing away from the screen.") [2]
    when taking a photo is selected in the "Insert" menu, as
    there's no need to restrict this to the rear camera.
    
    This addresses this warning shown in Android Studio:
    
    > You should look for any camera available on the device, not just the rear
    
    Note however that trying to use that feature (with or
    without this change in place) currently doesn't actually
    work at least on a current device (e.g. an API 34 AVD),
    "nothing happens" rather than the camera showing up to
    be able to take a photo. This will be addressed
    in an upcoming commit.
    
    [1] 
https://developer.android.com/reference/android/content/pm/PackageManager#FEATURE_CAMERA_ANY
    [2] 
https://developer.android.com/reference/android/content/pm/PackageManager#FEATURE_CAMERA
    
    Change-Id: I52d2147df8fb3f1fdfb277376d7796380f9a8da0
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167602
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>

diff --git a/android/source/AndroidManifest.xml 
b/android/source/AndroidManifest.xml
index 0a11a1d3654b..3ece77d62bfd 100644
--- a/android/source/AndroidManifest.xml
+++ b/android/source/AndroidManifest.xml
@@ -6,7 +6,7 @@
     <uses-feature android:glEsVersion="0x00020000" android:required="true" />
     <!-- App wants to know if device supports USB host capability(not 
mandatory) -->
     <uses-feature android:name="android.hardware.usb.host" 
android:required="false"/>
-    <uses-feature android:name="android.hardware.camera" 
android:required="false"/>
+    <uses-feature android:name="android.hardware.camera.any" 
android:required="false"/>
     <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
 
     <application
diff --git a/android/source/src/java/org/libreoffice/FormattingController.java 
b/android/source/src/java/org/libreoffice/FormattingController.java
index 49e81eb69784..1d72c10a2ac7 100644
--- a/android/source/src/java/org/libreoffice/FormattingController.java
+++ b/android/source/src/java/org/libreoffice/FormattingController.java
@@ -360,7 +360,7 @@ class FormattingController implements View.OnClickListener {
     }
 
     private void dispatchTakePictureIntent() {
-        if 
(!mContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA)) 
{
+        if 
(!mContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA_ANY))
 {
             Snackbar.make(mContext.findViewById(R.id.button_insert_picture),
                     
mContext.getResources().getString(R.string.no_camera_found), 
Snackbar.LENGTH_SHORT).show();
             return;
commit a24b79b91357a451d2bfa22a8543b076a2f4873e
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Mon May 13 11:35:20 2024 +0200
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Tue May 14 08:37:37 2024 +0200

    android: Update com.google.android.material:material to 1.12.0
    
    Change-Id: I4ac5b67ddf978d6646dbbd67f858ffad3a6adeca
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167587
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>

diff --git a/android/source/build.gradle b/android/source/build.gradle
index b537a9ae3e61..7012c275aa33 100644
--- a/android/source/build.gradle
+++ b/android/source/build.gradle
@@ -32,7 +32,7 @@ dependencies {
             "libreoffice.jar",
             "unoloader.jar"
     ])
-    implementation 'com.google.android.material:material:1.11.0'
+    implementation 'com.google.android.material:material:1.12.0'
     implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
     implementation "androidx.multidex:multidex:2.0.1"
 }
commit 1610ebc06b34263bf3e525babe1e583b932f6242
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Mon May 13 10:47:49 2024 +0200
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Tue May 14 08:37:30 2024 +0200

    android: Update Android Gradle Plugin to 8.4.0
    
    ... and gradle to 8.6, as suggested by Android Studio.
    
    Update the lint baseline file to initially ignore
    new warnings that the new version reports.
    These can be handled separately.
    
    Change-Id: I6ecd7300072c16ea583b5ba19b03de89d671b87e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167586
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>

diff --git a/android/source/build.gradle b/android/source/build.gradle
index 8cbef7744d8e..b537a9ae3e61 100644
--- a/android/source/build.gradle
+++ b/android/source/build.gradle
@@ -21,7 +21,7 @@ buildscript {
         google()
     }
     dependencies {
-        classpath 'com.android.tools.build:gradle:8.3.2'
+        classpath 'com.android.tools.build:gradle:8.4.0'
     }
 }
 
diff --git a/android/source/gradle/wrapper/gradle-wrapper.properties 
b/android/source/gradle/wrapper/gradle-wrapper.properties
index cdea548c75ee..af9c6a996c1d 100644
--- a/android/source/gradle/wrapper/gradle-wrapper.properties
+++ b/android/source/gradle/wrapper/gradle-wrapper.properties
@@ -1,7 +1,7 @@
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
-distributionSha256Sum=c16d517b50dd28b3f5838f0e844b7520b8f1eb610f2f29de7e4e04a1b7c9c79b
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-all.zip
+distributionSha256Sum=85719317abd2112f021d4f41f09ec370534ba288432065f4b477b6a3b652910d
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-all.zip
 validateDistributionUrl=true
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
diff --git a/android/source/lint-baseline.xml b/android/source/lint-baseline.xml
index 01fdd6f8d234..d973b4c4b078 100644
--- a/android/source/lint-baseline.xml
+++ b/android/source/lint-baseline.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.2" type="baseline" client="gradle" 
dependencies="false" name="AGP (8.3.2)" variant="all" version="8.3.2">
+<issues format="6" by="lint 8.4.0" type="baseline" client="gradle" 
dependencies="false" name="AGP (8.4.0)" variant="all" version="8.4.0">
 
     <issue
         id="ScopedStorage"
@@ -124,7 +124,7 @@
 
     <issue
         id="QueryPermissionsNeeded"
-        message="Consider adding a `&lt;queries>` declaration to your manifest 
when calling this \&#xA;method; see https://g.co/dev/packagevisibility for 
details"
+        message="Consider adding a `&lt;queries>` declaration to your manifest 
when calling this method; see https://g.co/dev/packagevisibility for details"
         errorLine1="        if 
(takePictureIntent.resolveActivity(mContext.getPackageManager()) != null) {"
         errorLine2="                              ~~~~~~~~~~~~~~~">
         <location
@@ -135,7 +135,7 @@
 
     <issue
         id="QueryPermissionsNeeded"
-        message="Consider adding a `&lt;queries>` declaration to your manifest 
when calling this \&#xA;method; see https://g.co/dev/packagevisibility for 
details"
+        message="Consider adding a `&lt;queries>` declaration to your manifest 
when calling this method; see https://g.co/dev/packagevisibility for details"
         errorLine1="                        
.queryIntentActivities(takePictureIntent, PackageManager.MATCH_DEFAULT_ONLY);"
         errorLine2="                         ~~~~~~~~~~~~~~~~~~~~~">
         <location
@@ -144,6 +144,17 @@
             column="26"/>
     </issue>
 
+    <issue
+        id="GradleDependency"
+        message="A newer version of com.google.android.material:material than 
1.11.0 is available: 1.12.0"
+        errorLine1="    implementation 
&apos;com.google.android.material:material:1.11.0&apos;"
+        errorLine2="                   
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+        <location
+            file="build.gradle"
+            line="35"
+            column="20"/>
+    </issue>
+
     <issue
         id="UnsupportedChromeOsCameraSystemFeature"
         message="You should look for any camera available on the device, not 
just the rear"
@@ -177,6 +188,17 @@
             column="13"/>
     </issue>
 
+    <issue
+        id="DiscouragedApi"
+        message="Use of `scheduleAtFixedRate` is strongly discouraged because 
it can lead to unexpected behavior when Android processes become cached (tasks 
may unexpectedly execute hundreds or thousands of times in quick succession 
when a process changes from cached to uncached); prefer using `schedule`"
+        errorLine1="        mAnimationTimer.scheduleAtFixedRate(new 
TimerTask() {"
+        errorLine2="        ^">
+        <location
+            file="src/java/org/mozilla/gecko/gfx/JavaPanZoomController.java"
+            line="526"
+            column="9"/>
+    </issue>
+
     <issue
         id="DiscouragedApi"
         message="Use of this function is discouraged because resource 
reflection makes it harder to perform build optimizations and compile-time 
verification of code. It is much more efficient to retrieve resources by 
identifier (e.g. `R.foo.bar`) than by name (e.g. 
`getIdentifier(&quot;bar&quot;, &quot;foo&quot;, null)`)."

Reply via email to