From afc673bb1506d2557201e856aabd12d4a78f193d Mon Sep 17 00:00:00 2001 From: Sam Whited Date: Sat, 29 Nov 2014 07:50:59 -0500 Subject: [PATCH 1/2] Misc. "fixes" to correct warnings. --- .../conversations/ui/ConferenceDetailsActivity.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/ui/ConferenceDetailsActivity.java b/src/main/java/eu/siacs/conversations/ui/ConferenceDetailsActivity.java index 6744acb16..c6a387122 100644 --- a/src/main/java/eu/siacs/conversations/ui/ConferenceDetailsActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/ConferenceDetailsActivity.java @@ -124,8 +124,10 @@ public class ConferenceDetailsActivity extends XmppActivity implements OnConvers mMoreDetails.setVisibility(View.GONE); mInviteButton = (Button) findViewById(R.id.invite); mInviteButton.setOnClickListener(inviteListener); - getActionBar().setHomeButtonEnabled(true); - getActionBar().setDisplayHomeAsUpEnabled(true); + if (getActionBar() != null) { + getActionBar().setHomeButtonEnabled(true); + getActionBar().setDisplayHomeAsUpEnabled(true); + } mEditNickButton.setOnClickListener(new OnClickListener() { @Override @@ -364,6 +366,7 @@ public class ConferenceDetailsActivity extends XmppActivity implements OnConvers } } + @SuppressWarnings("deprecation") @TargetApi(Build.VERSION_CODES.JELLY_BEAN) private void setListItemBackgroundOnView(View view) { int sdk = android.os.Build.VERSION.SDK_INT; @@ -383,7 +386,7 @@ public class ConferenceDetailsActivity extends XmppActivity implements OnConvers try { startIntentSenderForResult(intent.getIntentSender(), 0, null, 0, 0, 0); - } catch (SendIntentException e) { + } catch (SendIntentException ignored) { } } From e43ac27e8f3dfabb69bc5edcb3eb005598270e81 Mon Sep 17 00:00:00 2001 From: Sam Whited Date: Sat, 29 Nov 2014 07:58:18 -0500 Subject: [PATCH 2/2] Accessibility: Add missing image descriptions --- src/main/res/layout/account_row.xml | 3 ++- src/main/res/layout/activity_edit_account.xml | 6 ++++-- src/main/res/values/strings.xml | 2 ++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/main/res/layout/account_row.xml b/src/main/res/layout/account_row.xml index 2d1190a3a..60b69090f 100644 --- a/src/main/res/layout/account_row.xml +++ b/src/main/res/layout/account_row.xml @@ -10,7 +10,8 @@ android:layout_width="48dp" android:layout_height="48dp" android:layout_alignParentLeft="true" - android:src="@drawable/ic_profile" > + android:src="@drawable/ic_profile" + android:contentDescription="@string/account_image_description"> + android:layout_marginRight="16dp" + android:contentDescription="@string/account_image_description"/> + android:visibility="visible" + android:contentDescription="@string/copy_otr_clipboard_description"/> diff --git a/src/main/res/values/strings.xml b/src/main/res/values/strings.xml index 7e235f683..6b6394520 100644 --- a/src/main/res/values/strings.xml +++ b/src/main/res/values/strings.xml @@ -358,4 +358,6 @@ Conference created! Secret accepted! Reset + Account avatar + Copy OTR fingerprint to clipboard