From 9d4b614f2a7617ffe05733e1bb17d075df8898f5 Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Fri, 13 Mar 2020 10:31:36 +0100 Subject: 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 --- android/source/src/java/org/libreoffice/FormattingController.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'android') 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); } -- cgit