diff options
author | Christian Schneppe <christian@pix-art.de> | 2017-04-05 20:22:47 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2017-04-05 22:21:41 +0200 |
commit | 1e246bbce11d9e57e70092d809143b5d048c7392 (patch) | |
tree | c31bf09a0b0173d1db89455e01ba0326206a5421 /src/main/java/de/pixart/messenger/ui/ContactDetailsActivity.java | |
parent | d6eef4842c29a27b0f0424519b135217fb1dd207 (diff) |
Changes the deprecated getColor() method
Diffstat (limited to 'src/main/java/de/pixart/messenger/ui/ContactDetailsActivity.java')
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/ContactDetailsActivity.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/ContactDetailsActivity.java b/src/main/java/de/pixart/messenger/ui/ContactDetailsActivity.java index b0fd4cd79..8a2e72145 100644 --- a/src/main/java/de/pixart/messenger/ui/ContactDetailsActivity.java +++ b/src/main/java/de/pixart/messenger/ui/ContactDetailsActivity.java @@ -14,6 +14,7 @@ import android.preference.PreferenceManager; import android.provider.ContactsContract.CommonDataKinds; import android.provider.ContactsContract.Contacts; import android.provider.ContactsContract.Intents; +import android.support.v4.content.ContextCompat; import android.view.LayoutInflater; import android.view.Menu; import android.view.MenuItem; @@ -558,7 +559,7 @@ public class ContactDetailsActivity extends OmemoActivity implements OnAccountUp key.setText(CryptoHelper.prettifyFingerprint(otrFingerprint)); if (otrFingerprint != null && otrFingerprint.equals(messageFingerprint)) { keyType.setText(R.string.otr_fingerprint_selected_message); - keyType.setTextColor(getResources().getColor(R.color.accent)); + keyType.setTextColor(ContextCompat.getColor(this, R.color.accent)); } else { keyType.setText(R.string.otr_fingerprint); } @@ -607,7 +608,7 @@ public class ContactDetailsActivity extends OmemoActivity implements OnAccountUp TextView keyType = (TextView) view.findViewById(R.id.key_type); keyType.setText(R.string.openpgp_key_id); if ("pgp".equals(messageFingerprint)) { - keyType.setTextColor(getResources().getColor(R.color.accent)); + keyType.setTextColor(ContextCompat.getColor(this, R.color.accent)); } key.setText(OpenPgpUtils.convertKeyIdToHex(contact.getPgpKeyId())); view.setOnClickListener(new OnClickListener() { |