Merge pull request #7221 from nextcloud/reduceEmojiSize

Reduce apk size by ~20 MB
This commit is contained in:
Andy Scherzinger 2020-11-03 22:48:53 +01:00 committed by GitHub
commit 26ae153bfc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 12 deletions

View file

@ -322,8 +322,7 @@ dependencies {
implementation 'com.caverock:androidsvg:1.4'
implementation 'androidx.annotation:annotation:1.1.0'
implementation 'com.google.code.gson:gson:2.8.6'
implementation group: 'androidx.emoji', name: 'emoji-bundled', version: '1.1.0'
implementation 'com.github.vanniktech:Emoji:0.7.0'
implementation 'com.vanniktech:emoji-google:0.7.0'
implementation 'com.github.cotechde.hwsecurity:hwsecurity-fido:4.1.0'
implementation 'com.github.cotechde.hwsecurity:hwsecurity-fido2:4.1.0'

View file

@ -33,8 +33,6 @@ import android.widget.AdapterView.OnItemSelectedListener
import android.widget.ArrayAdapter
import androidx.annotation.VisibleForTesting
import androidx.appcompat.app.AlertDialog
import androidx.emoji.bundled.BundledEmojiCompatConfig
import androidx.emoji.text.EmojiCompat
import androidx.fragment.app.DialogFragment
import androidx.recyclerview.widget.LinearLayoutManager
import com.google.gson.Gson
@ -58,7 +56,7 @@ import com.owncloud.android.utils.DisplayUtils
import com.owncloud.android.utils.ThemeUtils
import com.vanniktech.emoji.EmojiManager
import com.vanniktech.emoji.EmojiPopup
import com.vanniktech.emoji.googlecompat.GoogleCompatEmojiProvider
import com.vanniktech.emoji.google.GoogleEmojiProvider
import kotlinx.android.synthetic.main.dialog_set_status.*
import java.util.ArrayList
import java.util.Calendar
@ -122,11 +120,7 @@ class SetStatusDialogFragment :
}
}
val config = BundledEmojiCompatConfig(requireContext())
config.setReplaceAll(true)
val emojiCompat = EmojiCompat.init(config)
EmojiManager.install(GoogleCompatEmojiProvider(emojiCompat))
EmojiManager.install(GoogleEmojiProvider())
}
@SuppressLint("InflateParams")

View file

@ -359,8 +359,7 @@
android:cursorVisible="false"
android:gravity="center"
android:text="@string/default_emoji"
android:textSize="25sp"
app:maxEmojiCount="1" />
android:textSize="25sp" />
</com.google.android.material.card.MaterialCardView>