[Libreoffice-commits] core.git: android/source

Michael Weghorn (via logerrit) logerrit at kemper.freedesktop.org
Fri Mar 13 21:01:59 UTC 2020


 android/source/src/java/org/libreoffice/FormattingController.java |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 9d4b614f2a7617ffe05733e1bb17d075df8898f5
Author:     Michael Weghorn <m.weghorn at posteo.de>
AuthorDate: Fri Mar 13 10:31:36 2020 +0100
Commit:     Michael Weghorn <m.weghorn at posteo.de>
CommitDate: Fri Mar 13 22:01:25 2020 +0100

    android: Pass Intent's action in ctor already
    
    This also prevents some static analysis tool from
    issuing a false positive that "The application uses
    implicit intent that may be insecure under certain
    conditions".
    
    Change-Id: I1d4198b1c26c764c927d99c9a9e144da96ebc109
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90457
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.weghorn at posteo.de>

diff --git a/android/source/src/java/org/libreoffice/FormattingController.java b/android/source/src/java/org/libreoffice/FormattingController.java
index 20a5cf3b7944..a34c4c41ee29 100644
--- a/android/source/src/java/org/libreoffice/FormattingController.java
+++ b/android/source/src/java/org/libreoffice/FormattingController.java
@@ -378,9 +378,8 @@ class FormattingController implements View.OnClickListener {
     }
 
     private void sendImagePickingIntent() {
-        Intent intent = new Intent();
+        Intent intent = new Intent(Intent.ACTION_PICK);
         intent.setType("image/*");
-        intent.setAction(Intent.ACTION_PICK);
         mContext.startActivityForResult(Intent.createChooser(intent,
                 mContext.getResources().getString(R.string.select_photo_title)), SELECT_PHOTO);
     }


More information about the Libreoffice-commits mailing list