diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2022-02-23 12:37:03 +0300 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2022-02-23 12:37:03 +0300 |
commit | ad493938a03cadb4747613040bad9c28cf244789 (patch) | |
tree | 28f9571e6c153c878e6918845f77741e57d31906 /src | |
parent | 4129ca6af8f22fc64cca891052615d3d2755ad79 (diff) |
bump appcompat, migrate to emoji2 and get rid of emoji flavor
Diffstat (limited to 'src')
21 files changed, 44 insertions, 254 deletions
diff --git a/src/compat/java/eu/siacs/conversations/ui/widget/EmojiWrapperEditText.java b/src/compat/java/eu/siacs/conversations/ui/widget/EmojiWrapperEditText.java deleted file mode 100644 index 01905e376..000000000 --- a/src/compat/java/eu/siacs/conversations/ui/widget/EmojiWrapperEditText.java +++ /dev/null @@ -1,18 +0,0 @@ -package eu.siacs.conversations.ui.widget; - -import android.content.Context; -import android.util.AttributeSet; - -import androidx.emoji.widget.EmojiAppCompatEditText; - -public class EmojiWrapperEditText extends EmojiAppCompatEditText { - - public EmojiWrapperEditText(Context context) { - super(context); - } - - public EmojiWrapperEditText(Context context, AttributeSet attrs) { - super(context, attrs); - } - -}
\ No newline at end of file diff --git a/src/compat/java/eu/siacs/conversations/utils/EmojiWrapper.java b/src/compat/java/eu/siacs/conversations/utils/EmojiWrapper.java deleted file mode 100644 index 3b6cf71e1..000000000 --- a/src/compat/java/eu/siacs/conversations/utils/EmojiWrapper.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) 2017, Daniel Gultsch All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation and/or - * other materials provided with the distribution. - * - * 3. Neither the name of the copyright holder nor the names of its contributors - * may be used to endorse or promote products derived from this software without - * specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -package eu.siacs.conversations.utils; - -import androidx.emoji.text.EmojiCompat; - -public class EmojiWrapper { - - public static CharSequence transform(CharSequence input) { - try { - if (EmojiCompat.get().getLoadState() == EmojiCompat.LOAD_STATE_SUCCEEDED) { - return EmojiCompat.get().process(input); - } else { - return input; - } - } catch (IllegalStateException e) { - return input; - } - } -} diff --git a/src/free/java/eu/siacs/conversations/services/EmojiInitializationService.java b/src/free/java/eu/siacs/conversations/services/EmojiInitializationService.java new file mode 100644 index 000000000..2618d3809 --- /dev/null +++ b/src/free/java/eu/siacs/conversations/services/EmojiInitializationService.java @@ -0,0 +1,14 @@ +package eu.siacs.conversations.services; + +import android.content.Context; + +import androidx.emoji2.bundled.BundledEmojiCompatConfig; +import androidx.emoji2.text.EmojiCompat; + +public class EmojiInitializationService { + + public static void execute(final Context context) { + EmojiCompat.init(new BundledEmojiCompatConfig(context).setReplaceAll(true)); + } + +} diff --git a/src/freeCompat/java/eu/siacs/conversations/ui/service/EmojiService.java b/src/freeCompat/java/eu/siacs/conversations/ui/service/EmojiService.java deleted file mode 100644 index 1f60368bb..000000000 --- a/src/freeCompat/java/eu/siacs/conversations/ui/service/EmojiService.java +++ /dev/null @@ -1,27 +0,0 @@ -package eu.siacs.conversations.ui.service; - -import android.content.Context; -import android.os.Build; -import androidx.emoji.text.EmojiCompat; -import androidx.emoji.text.FontRequestEmojiCompatConfig; -import androidx.emoji.bundled.BundledEmojiCompatConfig; - -public class EmojiService { - - private final Context context; - - public EmojiService(Context context) { - this.context = context; - } - - public void init() { - BundledEmojiCompatConfig config = new BundledEmojiCompatConfig(context); - //On recent Androids we assume to have the latest emojis - //there are some annoying bugs with emoji compat that make it a safer choice not to use it when possible - // a) the text preview has annoying glitches when the cut of text contains emojis (the emoji will be half visible) - // b) can trigger a hardware rendering bug https://issuetracker.google.com/issues/67102093 - config.setReplaceAll(Build.VERSION.SDK_INT < Build.VERSION_CODES.O); - EmojiCompat.init(config); - } - -}
\ No newline at end of file diff --git a/src/main/java/eu/siacs/conversations/ui/ConferenceDetailsActivity.java b/src/main/java/eu/siacs/conversations/ui/ConferenceDetailsActivity.java index d35d4808c..fb716044c 100644 --- a/src/main/java/eu/siacs/conversations/ui/ConferenceDetailsActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/ConferenceDetailsActivity.java @@ -46,7 +46,6 @@ import eu.siacs.conversations.ui.util.MyLinkify; import eu.siacs.conversations.ui.util.SoftKeyboardUtils; import eu.siacs.conversations.utils.AccountUtils; import eu.siacs.conversations.utils.Compatibility; -import eu.siacs.conversations.utils.EmojiWrapper; import eu.siacs.conversations.utils.StringUtils; import eu.siacs.conversations.utils.StylingHelper; import eu.siacs.conversations.utils.XmppUri; @@ -471,11 +470,11 @@ public class ConferenceDetailsActivity extends XmppActivity implements OnConvers String subject = mucOptions.getSubject(); final boolean hasTitle; if (printableValue(roomName)) { - this.binding.mucTitle.setText(EmojiWrapper.transform(roomName)); + this.binding.mucTitle.setText(roomName); this.binding.mucTitle.setVisibility(View.VISIBLE); hasTitle = true; } else if (!printableValue(subject)) { - this.binding.mucTitle.setText(EmojiWrapper.transform(mConversation.getName())); + this.binding.mucTitle.setText(mConversation.getName()); hasTitle = true; this.binding.mucTitle.setVisibility(View.VISIBLE); } else { @@ -486,7 +485,7 @@ public class ConferenceDetailsActivity extends XmppActivity implements OnConvers SpannableStringBuilder spannable = new SpannableStringBuilder(subject); StylingHelper.format(spannable, this.binding.mucSubject.getCurrentTextColor()); MyLinkify.addLinks(spannable, false); - this.binding.mucSubject.setText(EmojiWrapper.transform(spannable)); + this.binding.mucSubject.setText(spannable); this.binding.mucSubject.setTextAppearance(this, subject.length() > (hasTitle ? 128 : 196) ? R.style.TextAppearance_Conversations_Body1_Linkified : R.style.TextAppearance_Conversations_Subhead); this.binding.mucSubject.setAutoLinkMask(0); this.binding.mucSubject.setVisibility(View.VISIBLE); diff --git a/src/main/java/eu/siacs/conversations/ui/ConversationsActivity.java b/src/main/java/eu/siacs/conversations/ui/ConversationsActivity.java index cc46ed33f..308e139fc 100644 --- a/src/main/java/eu/siacs/conversations/ui/ConversationsActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/ConversationsActivity.java @@ -81,7 +81,6 @@ import eu.siacs.conversations.ui.util.ActivityResult; import eu.siacs.conversations.ui.util.ConversationMenuConfigurator; import eu.siacs.conversations.ui.util.MenuDoubleTabUtil; import eu.siacs.conversations.ui.util.PendingItem; -import eu.siacs.conversations.utils.EmojiWrapper; import eu.siacs.conversations.utils.ExceptionHelper; import eu.siacs.conversations.utils.SignupUtils; import eu.siacs.conversations.utils.XmppUri; @@ -625,7 +624,7 @@ public class ConversationsActivity extends XmppActivity implements OnConversatio if (mainFragment instanceof ConversationFragment) { final Conversation conversation = ((ConversationFragment) mainFragment).getConversation(); if (conversation != null) { - actionBar.setTitle(EmojiWrapper.transform(conversation.getName())); + actionBar.setTitle(conversation.getName()); actionBar.setDisplayHomeAsUpEnabled(true); ActionBarUtil.setActionBarOnClickListener( binding.toolbar, diff --git a/src/main/java/eu/siacs/conversations/ui/XmppActivity.java b/src/main/java/eu/siacs/conversations/ui/XmppActivity.java index 4b5382b44..4ca49fa50 100644 --- a/src/main/java/eu/siacs/conversations/ui/XmppActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/XmppActivity.java @@ -71,10 +71,10 @@ import eu.siacs.conversations.entities.Message; import eu.siacs.conversations.entities.Presences; import eu.siacs.conversations.services.AvatarService; import eu.siacs.conversations.services.BarcodeProvider; +import eu.siacs.conversations.services.EmojiInitializationService; import eu.siacs.conversations.services.QuickConversationsService; import eu.siacs.conversations.services.XmppConnectionService; import eu.siacs.conversations.services.XmppConnectionService.XmppConnectionBinder; -import eu.siacs.conversations.ui.service.EmojiService; import eu.siacs.conversations.ui.util.MenuDoubleTabUtil; import eu.siacs.conversations.ui.util.PresenceSelector; import eu.siacs.conversations.ui.util.SoftKeyboardUtils; @@ -408,7 +408,7 @@ public abstract class XmppActivity extends ActionBarActivity { super.onCreate(savedInstanceState); metrics = getResources().getDisplayMetrics(); ExceptionHelper.init(getApplicationContext()); - new EmojiService(this).init(); + EmojiInitializationService.execute(this); this.isCameraFeatureAvailable = getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA_ANY); this.mTheme = findTheme(); setTheme(this.mTheme); diff --git a/src/main/java/eu/siacs/conversations/ui/adapter/ConversationAdapter.java b/src/main/java/eu/siacs/conversations/ui/adapter/ConversationAdapter.java index 049703597..662120d84 100644 --- a/src/main/java/eu/siacs/conversations/ui/adapter/ConversationAdapter.java +++ b/src/main/java/eu/siacs/conversations/ui/adapter/ConversationAdapter.java @@ -23,7 +23,6 @@ import eu.siacs.conversations.ui.ConversationFragment; import eu.siacs.conversations.ui.XmppActivity; import eu.siacs.conversations.ui.util.AvatarWorkerTask; import eu.siacs.conversations.ui.util.StyledAttributes; -import eu.siacs.conversations.utils.EmojiWrapper; import eu.siacs.conversations.utils.IrregularUnicodeDetector; import eu.siacs.conversations.utils.UIHelper; import eu.siacs.conversations.xmpp.Jid; @@ -57,7 +56,7 @@ public class ConversationAdapter extends RecyclerView.Adapter<ConversationAdapte if (name instanceof Jid) { viewHolder.binding.conversationName.setText(IrregularUnicodeDetector.style(activity, (Jid) name)); } else { - viewHolder.binding.conversationName.setText(EmojiWrapper.transform(name)); + viewHolder.binding.conversationName.setText(name); } if (conversation == ConversationFragment.getConversation(activity)) { @@ -85,7 +84,7 @@ public class ConversationAdapter extends RecyclerView.Adapter<ConversationAdapte if (draft != null) { viewHolder.binding.conversationLastmsgImg.setVisibility(View.GONE); - viewHolder.binding.conversationLastmsg.setText(EmojiWrapper.transform(draft.getMessage())); + viewHolder.binding.conversationLastmsg.setText(draft.getMessage()); viewHolder.binding.senderName.setText(R.string.draft); viewHolder.binding.senderName.setVisibility(View.VISIBLE); viewHolder.binding.conversationLastmsg.setTypeface(null, Typeface.NORMAL); @@ -128,7 +127,7 @@ public class ConversationAdapter extends RecyclerView.Adapter<ConversationAdapte } final Pair<CharSequence, Boolean> preview = UIHelper.getMessagePreview(activity, message, viewHolder.binding.conversationLastmsg.getCurrentTextColor()); if (showPreviewText) { - viewHolder.binding.conversationLastmsg.setText(EmojiWrapper.transform(UIHelper.shorten(preview.first))); + viewHolder.binding.conversationLastmsg.setText(UIHelper.shorten(preview.first)); } else { viewHolder.binding.conversationLastmsgImg.setContentDescription(preview.first); } diff --git a/src/main/java/eu/siacs/conversations/ui/adapter/ListItemAdapter.java b/src/main/java/eu/siacs/conversations/ui/adapter/ListItemAdapter.java index 4e7213380..5d6d72684 100644 --- a/src/main/java/eu/siacs/conversations/ui/adapter/ListItemAdapter.java +++ b/src/main/java/eu/siacs/conversations/ui/adapter/ListItemAdapter.java @@ -22,7 +22,6 @@ import eu.siacs.conversations.ui.SettingsActivity; import eu.siacs.conversations.ui.XmppActivity; import eu.siacs.conversations.ui.util.AvatarWorkerTask; import eu.siacs.conversations.ui.util.StyledAttributes; -import eu.siacs.conversations.utils.EmojiWrapper; import eu.siacs.conversations.utils.IrregularUnicodeDetector; import eu.siacs.conversations.xmpp.Jid; @@ -85,7 +84,7 @@ public class ListItemAdapter extends ArrayAdapter<ListItem> { } else { viewHolder.jid.setVisibility(View.GONE); } - viewHolder.name.setText(EmojiWrapper.transform(item.getDisplayName())); + viewHolder.name.setText(item.getDisplayName()); AvatarWorkerTask.loadAvatar(item, viewHolder.avatar, R.dimen.avatar); return view; } diff --git a/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java b/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java index ccb40418a..a5ba05819 100644 --- a/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java +++ b/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java @@ -63,7 +63,6 @@ import eu.siacs.conversations.ui.util.QuoteHelper; import eu.siacs.conversations.ui.util.ViewUtil; import eu.siacs.conversations.ui.widget.ClickableMovementMethod; import eu.siacs.conversations.utils.CryptoHelper; -import eu.siacs.conversations.utils.EmojiWrapper; import eu.siacs.conversations.utils.Emoticons; import eu.siacs.conversations.utils.GeoHelper; import eu.siacs.conversations.utils.MessageUtils; @@ -335,7 +334,7 @@ public class MessageAdapter extends ArrayAdapter<Message> { Spannable span = new SpannableString(body); float size = Emoticons.isEmoji(body) ? 3.0f : 2.0f; span.setSpan(new RelativeSizeSpan(size), 0, body.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); - viewHolder.messageBody.setText(EmojiWrapper.transform(span)); + viewHolder.messageBody.setText(span); } private void applyQuoteSpan(SpannableStringBuilder body, int start, int end, boolean darkBackground) { @@ -494,7 +493,7 @@ public class MessageAdapter extends ArrayAdapter<Message> { } MyLinkify.addLinks(body, true); viewHolder.messageBody.setAutoLinkMask(0); - viewHolder.messageBody.setText(EmojiWrapper.transform(body)); + viewHolder.messageBody.setText(body); viewHolder.messageBody.setMovementMethod(ClickableMovementMethod.getInstance()); } else { viewHolder.messageBody.setText(""); diff --git a/src/main/java/eu/siacs/conversations/ui/widget/EditMessage.java b/src/main/java/eu/siacs/conversations/ui/widget/EditMessage.java index eba833c9b..e890e5984 100644 --- a/src/main/java/eu/siacs/conversations/ui/widget/EditMessage.java +++ b/src/main/java/eu/siacs/conversations/ui/widget/EditMessage.java @@ -15,6 +15,7 @@ import android.view.KeyEvent; import android.view.inputmethod.EditorInfo; import android.view.inputmethod.InputConnection; +import androidx.appcompat.widget.AppCompatEditText; import androidx.core.view.inputmethod.EditorInfoCompat; import androidx.core.view.inputmethod.InputConnectionCompat; import androidx.core.view.inputmethod.InputContentInfoCompat; @@ -26,7 +27,7 @@ import eu.siacs.conversations.Config; import eu.siacs.conversations.R; import eu.siacs.conversations.ui.util.QuoteHelper; -public class EditMessage extends EmojiWrapperEditText { +public class EditMessage extends AppCompatEditText { private static final InputFilter SPAN_FILTER = (source, start, end, dest, dstart, dend) -> source instanceof Spanned ? source.toString() : source; private final ExecutorService executor = Executors.newSingleThreadExecutor(); diff --git a/src/main/res/layout/activity_muc_details.xml b/src/main/res/layout/activity_muc_details.xml index d19bf93e9..f2b4b00d7 100644 --- a/src/main/res/layout/activity_muc_details.xml +++ b/src/main/res/layout/activity_muc_details.xml @@ -106,7 +106,7 @@ app:errorTextAppearance="@style/TextAppearance.Conversations.Design.Error" app:hintTextAppearance="@style/TextAppearance.Conversations.Design.Hint"> - <eu.siacs.conversations.ui.widget.EmojiWrapperEditText + <EditText android:id="@+id/muc_edit_title" android:layout_width="match_parent" android:layout_height="wrap_content" @@ -120,7 +120,7 @@ app:errorTextAppearance="@style/TextAppearance.Conversations.Design.Error" app:hintTextAppearance="@style/TextAppearance.Conversations.Design.Hint"> - <eu.siacs.conversations.ui.widget.EmojiWrapperEditText + <EditText android:id="@+id/muc_edit_subject" android:layout_width="match_parent" android:layout_height="wrap_content" diff --git a/src/main/res/layout/create_conference_dialog.xml b/src/main/res/layout/create_conference_dialog.xml index 2296699a5..3883a0f5e 100644 --- a/src/main/res/layout/create_conference_dialog.xml +++ b/src/main/res/layout/create_conference_dialog.xml @@ -28,7 +28,7 @@ app:errorTextAppearance="@style/TextAppearance.Conversations.Design.Error" app:hintTextAppearance="@style/TextAppearance.Conversations.Design.Hint"> - <eu.siacs.conversations.ui.widget.EmojiWrapperEditText + <EditText android:id="@+id/group_chat_name" style="@style/Widget.Conversations.EditText" android:layout_width="match_parent" diff --git a/src/main/res/layout/create_public_channel_dialog.xml b/src/main/res/layout/create_public_channel_dialog.xml index 048244d0c..2dcd8f3d8 100644 --- a/src/main/res/layout/create_public_channel_dialog.xml +++ b/src/main/res/layout/create_public_channel_dialog.xml @@ -26,7 +26,7 @@ app:errorTextAppearance="@style/TextAppearance.Conversations.Design.Error" app:hintTextAppearance="@style/TextAppearance.Conversations.Design.Hint"> - <eu.siacs.conversations.ui.widget.EmojiWrapperEditText + <EditText android:id="@+id/group_chat_name" style="@style/Widget.Conversations.EditText" android:layout_width="match_parent" diff --git a/src/main/res/layout/dialog_quickedit.xml b/src/main/res/layout/dialog_quickedit.xml index 0b3219fec..6255cf0e4 100644 --- a/src/main/res/layout/dialog_quickedit.xml +++ b/src/main/res/layout/dialog_quickedit.xml @@ -16,7 +16,7 @@ app:errorTextAppearance="@style/TextAppearance.Conversations.Design.Error" app:hintTextAppearance="@style/TextAppearance.Conversations.Design.Hint"> - <eu.siacs.conversations.ui.widget.EmojiWrapperEditText + <EditText android:id="@+id/input_edit_text" style="@style/Widget.Conversations.EditText" android:layout_width="match_parent" @@ -25,7 +25,7 @@ android:inputType="textPersonName"> <requestFocus/> - </eu.siacs.conversations.ui.widget.EmojiWrapperEditText> + </EditText> </com.google.android.material.textfield.TextInputLayout> </LinearLayout> diff --git a/src/playstore/java/eu/siacs/conversations/services/EmojiInitializationService.java b/src/playstore/java/eu/siacs/conversations/services/EmojiInitializationService.java new file mode 100644 index 000000000..b5a57d374 --- /dev/null +++ b/src/playstore/java/eu/siacs/conversations/services/EmojiInitializationService.java @@ -0,0 +1,10 @@ +package eu.siacs.conversations.services; + +import android.content.Context; + +public class EmojiInitializationService { + + public static void execute(final Context context) { + + } +} diff --git a/src/playstoreCompat/java/eu/siacs/conversations/ui/service/EmojiService.java b/src/playstoreCompat/java/eu/siacs/conversations/ui/service/EmojiService.java deleted file mode 100644 index 5ed8c100a..000000000 --- a/src/playstoreCompat/java/eu/siacs/conversations/ui/service/EmojiService.java +++ /dev/null @@ -1,55 +0,0 @@ -package eu.siacs.conversations.ui.service; - -import android.content.Context; -import android.os.Build; -import android.util.Log; - -import androidx.core.provider.FontRequest; -import androidx.emoji.text.EmojiCompat; -import androidx.emoji.text.FontRequestEmojiCompatConfig; - -import eu.siacs.conversations.Config; -import eu.siacs.conversations.R; - -public class EmojiService { - - - private final EmojiCompat.InitCallback initCallback = new EmojiCompat.InitCallback() { - @Override - public void onInitialized() { - super.onInitialized(); - Log.d(Config.LOGTAG, "EmojiService succeeded in loading fonts"); - - } - - @Override - public void onFailed(Throwable throwable) { - super.onFailed(throwable); - Log.d(Config.LOGTAG, "EmojiService failed to load fonts", throwable); - } - }; - - private final Context context; - - public EmojiService(Context context) { - this.context = context; - } - - public void init() { - final FontRequest fontRequest = new FontRequest( - "com.google.android.gms.fonts", - "com.google.android.gms", - "Noto Color Emoji Compat", - R.array.font_certs); - FontRequestEmojiCompatConfig fontRequestEmojiCompatConfig = new FontRequestEmojiCompatConfig(context, fontRequest); - fontRequestEmojiCompatConfig.registerInitCallback(initCallback); - //On recent Androids we assume to have the latest emojis - //there are some annoying bugs with emoji compat that make it a safer choice not to use it when possible - // a) when using the ondemand emoji font (play store) flags don’t work - // b) the text preview has annoying glitches when the cut of text contains emojis (the emoji will be half visible) - // c) can trigger a hardware rendering bug https://issuetracker.google.com/issues/67102093 - fontRequestEmojiCompatConfig.setReplaceAll(Build.VERSION.SDK_INT < Build.VERSION_CODES.O); - EmojiCompat.init(fontRequestEmojiCompatConfig); - } - -}
\ No newline at end of file diff --git a/src/playstoreCompat/res/values/font_certs.xml b/src/playstoreCompat/res/values/font_certs.xml deleted file mode 100644 index cc0ad3b3c..000000000 --- a/src/playstoreCompat/res/values/font_certs.xml +++ /dev/null @@ -1,6 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<resources> - <string-array name="font_certs"> - <item>MIIEQzCCAyugAwIBAgIJAMLgh0ZkSjCNMA0GCSqGSIb3DQEBBAUAMHQxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtHb29nbGUgSW5jLjEQMA4GA1UECxMHQW5kcm9pZDEQMA4GA1UEAxMHQW5kcm9pZDAeFw0wODA4MjEyMzEzMzRaFw0zNjAxMDcyMzEzMzRaMHQxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtHb29nbGUgSW5jLjEQMA4GA1UECxMHQW5kcm9pZDEQMA4GA1UEAxMHQW5kcm9pZDCCASAwDQYJKoZIhvcNAQEBBQADggENADCCAQgCggEBAKtWLgDYO6IIrgqWbxJOKdoR8qtW0I9Y4sypEwPpt1TTcvZApxsdyxMJZ2JORland2qSGT2y5b+3JKkedxiLDmpHpDsz2WCbdxgxRczfey5YZnTJ4VZbH0xqWVW/8lGmPav5xVwnIiJS6HXk+BVKZF+JcWjAsb/GEuq/eFdpuzSqeYTcfi6idkyugwfYwXFU1+5fZKUaRKYCwkkFQVfcAs1fXA5V+++FGfvjJ/CxURaSxaBvGdGDhfXE28LWuT9ozCl5xw4Yq5OGazvV24mZVSoOO0yZ31j7kYvtwYK6NeADwbSxDdJEqO4k//0zOHKrUiGYXtqw/A0LFFtqoZKFjnkCAQOjgdkwgdYwHQYDVR0OBBYEFMd9jMIhF1Ylmn/Tgt9r45jk14alMIGmBgNVHSMEgZ4wgZuAFMd9jMIhF1Ylmn/Tgt9r45jk14aloXikdjB0MQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLR29vZ2xlIEluYy4xEDAOBgNVBAsTB0FuZHJvaWQxEDAOBgNVBAMTB0FuZHJvaWSCCQDC4IdGZEowjTAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBAUAA4IBAQBt0lLO74UwLDYKqs6Tm8/yzKkEu116FmH4rkaymUIE0P9KaMftGlMexFlaYjzmB2OxZyl6euNXEsQH8gjwyxCUKRJNexBiGcCEyj6z+a1fuHHvkiaai+KL8W1EyNmgjmyy8AW7P+LLlkR+ho5zEHatRbM/YAnqGcFh5iZBqpknHf1SKMXFh4dd239FJ1jWYfbMDMy3NS5CTMQ2XFI1MvcyUTdZPErjQfTbQe3aDQsQcafEQPD+nqActifKZ0Np0IS9L9kR/wbNvyz6ENwPiTrjV2KRkEjH78ZMcUQXg0L3BYHJ3lc69Vs5Ddf9uUGGMYldX3WfMBEmh/9iFBDAaTCK</item> - </string-array> -</resources>
\ No newline at end of file diff --git a/src/system/java/eu/siacs/conversations/ui/service/EmojiService.java b/src/system/java/eu/siacs/conversations/ui/service/EmojiService.java deleted file mode 100644 index 6ca66fd62..000000000 --- a/src/system/java/eu/siacs/conversations/ui/service/EmojiService.java +++ /dev/null @@ -1,14 +0,0 @@ -package eu.siacs.conversations.ui.service; - -import android.content.Context; - -public class EmojiService { - - public EmojiService(Context context) { - //nop - } - - public void init() { - //nop - } -}
\ No newline at end of file diff --git a/src/system/java/eu/siacs/conversations/ui/widget/EmojiWrapperEditText.java b/src/system/java/eu/siacs/conversations/ui/widget/EmojiWrapperEditText.java deleted file mode 100644 index 58e1ab318..000000000 --- a/src/system/java/eu/siacs/conversations/ui/widget/EmojiWrapperEditText.java +++ /dev/null @@ -1,16 +0,0 @@ -package eu.siacs.conversations.ui.widget; - -import android.content.Context; -import androidx.appcompat.widget.AppCompatEditText; -import android.util.AttributeSet; - -public class EmojiWrapperEditText extends AppCompatEditText { - - public EmojiWrapperEditText(Context context) { - super(context); - } - - public EmojiWrapperEditText(Context context, AttributeSet attrs) { - super(context, attrs); - } -}
\ No newline at end of file diff --git a/src/system/java/eu/siacs/conversations/utils/EmojiWrapper.java b/src/system/java/eu/siacs/conversations/utils/EmojiWrapper.java deleted file mode 100644 index 3b6cf71e1..000000000 --- a/src/system/java/eu/siacs/conversations/utils/EmojiWrapper.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) 2017, Daniel Gultsch All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation and/or - * other materials provided with the distribution. - * - * 3. Neither the name of the copyright holder nor the names of its contributors - * may be used to endorse or promote products derived from this software without - * specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -package eu.siacs.conversations.utils; - -import androidx.emoji.text.EmojiCompat; - -public class EmojiWrapper { - - public static CharSequence transform(CharSequence input) { - try { - if (EmojiCompat.get().getLoadState() == EmojiCompat.LOAD_STATE_SUCCEEDED) { - return EmojiCompat.get().process(input); - } else { - return input; - } - } catch (IllegalStateException e) { - return input; - } - } -} |