Skip to content

Commit ffd3df4

Browse files
authored
refactor(android): remove unused code (#88)
1 parent 4f070b1 commit ffd3df4

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

android/src/main/java/com/getcapacitor/community/media/photoviewer/helper/ShareImage.kt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import android.graphics.Bitmap
77
import android.graphics.drawable.Drawable
88
import android.net.Uri
99
import android.os.Build
10-
import android.os.Environment
1110
import android.os.StrictMode
1211
import android.view.Gravity
1312
import android.widget.Toast
@@ -47,10 +46,7 @@ class ShareImage {
4746
shareIntent.action = Intent.ACTION_SEND
4847
shareIntent.type = "\"image/*\""
4948
shareIntent.putExtra(Intent.EXTRA_STREAM, uri)
50-
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
51-
shareIntent.setClipData(ClipData.newRawUri(null, uri));
52-
}
53-
49+
shareIntent.clipData = ClipData.newRawUri(null, uri)
5450
shareIntent.addFlags(
5551
Intent.FLAG_GRANT_READ_URI_PERMISSION or
5652
Intent.FLAG_GRANT_WRITE_URI_PERMISSION or

android/src/main/java/com/getcapacitor/community/media/photoviewer/helper/SquareLayout.kt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
package com.getcapacitor.community.media.photoviewer.helper
22

3-
import android.widget.RelativeLayout;
4-
import android.os.Build
5-
import android.annotation.TargetApi
3+
import android.widget.RelativeLayout
64
import android.content.Context
75
import android.util.AttributeSet
86

@@ -13,7 +11,6 @@ class SquareLayout: RelativeLayout {
1311

1412
constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int) : super(context, attrs, defStyleAttr)
1513

16-
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
1714
constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int, defStyleRes: Int) :
1815
super(context, attrs, defStyleAttr, defStyleRes)
1916

0 commit comments

Comments
 (0)