mirror of
https://github.com/nextcloud/android.git
synced 2024-11-23 05:35:39 +03:00
Fix style and static analysis issues
- Rename ShortcutUtils.kt to ShortcutUtil.kt to match contained class - Remove unused const - Fix formatting with spotless Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
This commit is contained in:
parent
8a24ea03a0
commit
280a92be51
1 changed files with 7 additions and 5 deletions
|
@ -45,8 +45,6 @@ import com.owncloud.android.utils.theme.ViewThemeUtils
|
|||
import javax.inject.Inject
|
||||
import kotlin.math.roundToInt
|
||||
|
||||
private const val i = 108
|
||||
|
||||
class ShortcutUtil @Inject constructor(private val mContext: Context) {
|
||||
|
||||
/**
|
||||
|
@ -95,8 +93,10 @@ class ShortcutUtil @Inject constructor(private val mContext: Context) {
|
|||
.build()
|
||||
val pinnedShortcutCallbackIntent = shortcutManager.createShortcutResultIntent(pinShortcutInfo)
|
||||
val successCallback = PendingIntent.getBroadcast(
|
||||
mContext, 0,
|
||||
pinnedShortcutCallbackIntent, FLAG_IMMUTABLE
|
||||
mContext,
|
||||
0,
|
||||
pinnedShortcutCallbackIntent,
|
||||
FLAG_IMMUTABLE
|
||||
)
|
||||
shortcutManager.requestPinShortcut(
|
||||
pinShortcutInfo,
|
||||
|
@ -116,7 +116,9 @@ class ShortcutUtil @Inject constructor(private val mContext: Context) {
|
|||
val bitmap = Bitmap.createBitmap(adaptiveIconSize, adaptiveIconSize, Bitmap.Config.ARGB_8888)
|
||||
val canvas = Canvas(bitmap)
|
||||
drawable.setBounds(
|
||||
adaptiveIconOuterSides, adaptiveIconOuterSides, adaptiveIconSize - adaptiveIconOuterSides,
|
||||
adaptiveIconOuterSides,
|
||||
adaptiveIconOuterSides,
|
||||
adaptiveIconSize - adaptiveIconOuterSides,
|
||||
adaptiveIconSize - adaptiveIconOuterSides
|
||||
)
|
||||
drawable.draw(canvas)
|
Loading…
Reference in a new issue