diff options
author | Christian Schneppe <christian@pix-art.de> | 2017-11-29 21:50:33 +0100 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2017-11-29 21:50:33 +0100 |
commit | b6052c82cb8463ee465226949953a7187f4096e4 (patch) | |
tree | 6347fb72ddb1928bfcaafbe914b9de795b76d633 /src/main/java/de/pixart/messenger/ui/ShowLocationActivity.java | |
parent | d03129f1301942ddc9808229c158b92f492e79f1 (diff) |
add ability to use system emojis instead of integrated ones via expert settings
Diffstat (limited to '')
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/ShowLocationActivity.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/ShowLocationActivity.java b/src/main/java/de/pixart/messenger/ui/ShowLocationActivity.java index f57b53446..27e48c0d3 100644 --- a/src/main/java/de/pixart/messenger/ui/ShowLocationActivity.java +++ b/src/main/java/de/pixart/messenger/ui/ShowLocationActivity.java @@ -5,6 +5,7 @@ import android.app.Activity; import android.content.ActivityNotFoundException; import android.content.Context; import android.content.Intent; +import android.content.SharedPreferences; import android.content.pm.PackageManager; import android.location.Address; import android.location.Geocoder; @@ -12,6 +13,7 @@ import android.net.Uri; import android.os.AsyncTask; import android.os.Build; import android.os.Bundle; +import android.preference.PreferenceManager; import android.view.Menu; import android.view.MenuInflater; import android.view.MenuItem; @@ -34,6 +36,8 @@ import de.pixart.messenger.Config; import de.pixart.messenger.R; import de.pixart.messenger.services.EmojiService; +import static de.pixart.messenger.ui.SettingsActivity.USE_BUNDLED_EMOJIS; + public class ShowLocationActivity extends Activity implements OnMapReadyCallback { private GoogleMap mGoogleMap; @@ -70,7 +74,8 @@ public class ShowLocationActivity extends Activity implements OnMapReadyCallback @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); - new EmojiService(this).init(); + boolean useBundledEmoji = getPreferences().getBoolean(USE_BUNDLED_EMOJIS, getResources().getBoolean(R.bool.use_bundled_emoji)); + new EmojiService(this).init(useBundledEmoji); if (getActionBar() != null) { getActionBar().setHomeButtonEnabled(true); getActionBar().setDisplayHomeAsUpEnabled(true); @@ -81,6 +86,10 @@ public class ShowLocationActivity extends Activity implements OnMapReadyCallback fragment.getMapAsync(this); } + protected SharedPreferences getPreferences() { + return PreferenceManager.getDefaultSharedPreferences(getApplicationContext()); + } + @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { |