Using ApplicationId from BuildConfig

This commit is contained in:
Constantin Wartenburger 2020-10-13 20:17:56 +02:00
parent c0a5402684
commit 7bee558e01
No known key found for this signature in database
GPG Key ID: 7439D96D8E1DB894
3 changed files with 9 additions and 1 deletions

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shortcuts xmlns:android="http://schemas.android.com/apk/res/android">
<share-target android:targetClass="im.vector.app.features.share.IncomingShareActivity">
<data android:mimeType="*/*" />
<category android:name="im.vector.app.debug.SHORTCUT_SHARE" />
</share-target>
</shortcuts>

View File

@ -23,6 +23,7 @@ import androidx.annotation.WorkerThread
import androidx.core.content.pm.ShortcutInfoCompat import androidx.core.content.pm.ShortcutInfoCompat
import androidx.core.content.pm.ShortcutManagerCompat import androidx.core.content.pm.ShortcutManagerCompat
import androidx.core.graphics.drawable.IconCompat import androidx.core.graphics.drawable.IconCompat
import im.vector.app.BuildConfig
import im.vector.app.core.glide.GlideApp import im.vector.app.core.glide.GlideApp
import im.vector.app.core.utils.DimensionConverter import im.vector.app.core.utils.DimensionConverter
import im.vector.app.features.home.room.detail.RoomDetailActivity import im.vector.app.features.home.room.detail.RoomDetailActivity
@ -33,7 +34,7 @@ import javax.inject.Inject
private val useAdaptiveIcon = Build.VERSION.SDK_INT >= Build.VERSION_CODES.O private val useAdaptiveIcon = Build.VERSION.SDK_INT >= Build.VERSION_CODES.O
private const val adaptiveIconSizeDp = 108 private const val adaptiveIconSizeDp = 108
private const val adaptiveIconOuterSidesDp = 18 private const val adaptiveIconOuterSidesDp = 18
private const val directShareCategory = "im.vector.app.SHORTCUT_SHARE" private const val directShareCategory = BuildConfig.APPLICATION_ID + ".SHORTCUT_SHARE"
class ShortcutCreator @Inject constructor( class ShortcutCreator @Inject constructor(
private val context: Context, private val context: Context,