aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristian Schneppe <christian.schneppe@pix-art.de>2019-10-19 22:01:44 +0200
committerChristian Schneppe <christian.schneppe@pix-art.de>2019-10-19 22:01:44 +0200
commitc488121d3822aa72ec22a070121a04bbcfd0c092 (patch)
tree709bbfe00fb3d73cf7e958ffc1b919034e70a1e6 /src
parent4ca1c1420f9d0c5735adf8a98e09766102afddcd (diff)
hide 'use integrated emoji' setting for Android O and higher
Diffstat (limited to '')
-rw-r--r--src/main/java/de/pixart/messenger/ui/SettingsActivity.java15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/SettingsActivity.java b/src/main/java/de/pixart/messenger/ui/SettingsActivity.java
index ba7508556..93b95c9c1 100644
--- a/src/main/java/de/pixart/messenger/ui/SettingsActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/SettingsActivity.java
@@ -298,9 +298,18 @@ public class SettingsActivity extends XmppActivity implements
final Preference useBundledEmojis = mSettingsFragment.findPreference("use_bundled_emoji");
if (useBundledEmojis != null) {
Log.d(Config.LOGTAG, "Bundled Emoji checkbox checked: " + isBundledEmojiChecked);
- if (Build.VERSION.SDK_INT > Build.VERSION_CODES.O && isBundledEmojiChecked) {
- ((CheckBoxPreference) BundledEmojiPreference).setChecked(false);
- useBundledEmojis.setEnabled(false);
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
+ if (isBundledEmojiChecked) {
+ ((CheckBoxPreference) BundledEmojiPreference).setChecked(false);
+ useBundledEmojis.setEnabled(false);
+ }
+ PreferenceCategory UICatergory = (PreferenceCategory) mSettingsFragment.findPreference("UI");
+ UICatergory.removePreference(useBundledEmojis);
+ if (UICatergory.getPreferenceCount() == 0) {
+ if (mainPreferenceScreen != null) {
+ mainPreferenceScreen.removePreference(UICatergory);
+ }
+ }
}
}