diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2016-04-22 21:25:06 +0200 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2016-04-22 21:25:06 +0200 |
commit | 1901abd05fc051b776e2bbb10295f936408a0843 (patch) | |
tree | e010518afdcd1723a292df8b65981154284ddf77 /src/main/java/eu/siacs/conversations/ui/XmppActivity.java | |
parent | 195b745efc0747e930a639d2c89d4c3a79e0a3c2 (diff) |
expert setting to manually change presence
Diffstat (limited to '')
-rw-r--r-- | src/main/java/eu/siacs/conversations/ui/XmppActivity.java | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/main/java/eu/siacs/conversations/ui/XmppActivity.java b/src/main/java/eu/siacs/conversations/ui/XmppActivity.java index 7d70b20f..17086b7e 100644 --- a/src/main/java/eu/siacs/conversations/ui/XmppActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/XmppActivity.java @@ -536,6 +536,17 @@ public abstract class XmppActivity extends Activity { } } + @SuppressWarnings("deprecation") + @TargetApi(Build.VERSION_CODES.JELLY_BEAN) + protected void setListItemBackgroundOnView(View view) { + int sdk = android.os.Build.VERSION.SDK_INT; + if (sdk < android.os.Build.VERSION_CODES.JELLY_BEAN) { + view.setBackgroundDrawable(getResources().getDrawable(R.drawable.greybackground)); + } else { + view.setBackground(getResources().getDrawable(R.drawable.greybackground)); + } + } + protected void choosePgpSignId(Account account) { xmppConnectionService.getPgpEngine().chooseKey(account, new UiCallback<Account>() { @Override @@ -1006,6 +1017,10 @@ public abstract class XmppActivity extends Activity { return getPreferences().getString("picture_compression", "auto").equals("never"); } + protected boolean manuallyChangePresence() { + return getPreferences().getBoolean("manually_change_presence", false); + } + protected void unregisterNdefPushMessageCallback() { NfcAdapter nfcAdapter = NfcAdapter.getDefaultAdapter(this); if (nfcAdapter != null && nfcAdapter.isEnabled()) { |