summaryrefslogtreecommitdiff
path: root/android
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2020-03-13 10:31:36 +0100
committerMichael Weghorn <m.weghorn@posteo.de>2020-03-13 22:01:25 +0100
commit9d4b614f2a7617ffe05733e1bb17d075df8898f5 (patch)
treeaa1c441b9a8729f51d1b674e543f3bf49fcb0a15 /android
parente52df8390274bfbf9eeb4a72a2b580ba03152ba0 (diff)
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@posteo.de>
Diffstat (limited to 'android')
-rw-r--r--android/source/src/java/org/libreoffice/FormattingController.java3
1 files changed, 1 insertions, 2 deletions
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);
}