From 2415781ebf6fdf8846baf8294c4b0c49310b5c79 Mon Sep 17 00:00:00 2001 From: iNPUTmice Date: Sat, 27 Sep 2014 11:46:56 +0200 Subject: [PATCH] fixed some lint warnings. thanks @betheg --- src/eu/siacs/conversations/ui/ConversationActivity.java | 2 ++ src/eu/siacs/conversations/ui/StartConversationActivity.java | 3 +++ src/eu/siacs/conversations/ui/XmppActivity.java | 2 ++ src/eu/siacs/conversations/ui/adapter/ListItemAdapter.java | 2 +- src/eu/siacs/conversations/utils/UIHelper.java | 2 ++ 5 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/eu/siacs/conversations/ui/ConversationActivity.java b/src/eu/siacs/conversations/ui/ConversationActivity.java index 89d823a13..6fc5d36d6 100644 --- a/src/eu/siacs/conversations/ui/ConversationActivity.java +++ b/src/eu/siacs/conversations/ui/ConversationActivity.java @@ -17,6 +17,7 @@ import android.net.Uri; import android.os.Bundle; import android.os.SystemClock; import android.provider.MediaStore; +import android.annotation.SuppressLint; import android.app.ActionBar; import android.app.AlertDialog; import android.app.FragmentTransaction; @@ -376,6 +377,7 @@ public class ConversationActivity extends XmppActivity implements } } + @SuppressLint("InflateParams") protected void clearHistoryDialog(final Conversation conversation) { AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setTitle(getString(R.string.clear_conversation_history)); diff --git a/src/eu/siacs/conversations/ui/StartConversationActivity.java b/src/eu/siacs/conversations/ui/StartConversationActivity.java index 612dd5853..e4b49d082 100644 --- a/src/eu/siacs/conversations/ui/StartConversationActivity.java +++ b/src/eu/siacs/conversations/ui/StartConversationActivity.java @@ -6,6 +6,7 @@ import java.util.ArrayList; import java.util.Collections; import java.util.List; +import android.annotation.SuppressLint; import android.app.ActionBar; import android.app.ActionBar.Tab; import android.app.ActionBar.TabListener; @@ -314,6 +315,7 @@ public class StartConversationActivity extends XmppActivity { } + @SuppressLint("InflateParams") protected void showCreateContactDialog(String prefilledJid) { AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setTitle(R.string.create_contact); @@ -368,6 +370,7 @@ public class StartConversationActivity extends XmppActivity { } + @SuppressLint("InflateParams") protected void showJoinConferenceDialog() { AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setTitle(R.string.join_conference); diff --git a/src/eu/siacs/conversations/ui/XmppActivity.java b/src/eu/siacs/conversations/ui/XmppActivity.java index 63dbdd111..1a94c7666 100644 --- a/src/eu/siacs/conversations/ui/XmppActivity.java +++ b/src/eu/siacs/conversations/ui/XmppActivity.java @@ -15,6 +15,7 @@ import eu.siacs.conversations.entities.Presences; import eu.siacs.conversations.services.XmppConnectionService; import eu.siacs.conversations.services.XmppConnectionService.XmppConnectionBinder; import eu.siacs.conversations.utils.ExceptionHelper; +import android.annotation.SuppressLint; import android.app.Activity; import android.app.AlertDialog; import android.app.PendingIntent; @@ -390,6 +391,7 @@ public abstract class XmppActivity extends Activity { quickEdit(previousValue, callback, true); } + @SuppressLint("InflateParams") private void quickEdit(final String previousValue, final OnValueEdited callback, boolean password) { AlertDialog.Builder builder = new AlertDialog.Builder(this); diff --git a/src/eu/siacs/conversations/ui/adapter/ListItemAdapter.java b/src/eu/siacs/conversations/ui/adapter/ListItemAdapter.java index 9ef427fc5..789e4c340 100644 --- a/src/eu/siacs/conversations/ui/adapter/ListItemAdapter.java +++ b/src/eu/siacs/conversations/ui/adapter/ListItemAdapter.java @@ -24,7 +24,7 @@ public class ListItemAdapter extends ArrayAdapter { .getSystemService(Context.LAYOUT_INFLATER_SERVICE); ListItem item = getItem(position); if (view == null) { - view = (View) inflater.inflate(R.layout.contact, null); + view = (View) inflater.inflate(R.layout.contact, parent); } TextView name = (TextView) view.findViewById(R.id.contact_display_name); TextView jid = (TextView) view.findViewById(R.id.contact_jid); diff --git a/src/eu/siacs/conversations/utils/UIHelper.java b/src/eu/siacs/conversations/utils/UIHelper.java index f6e66cdb7..d18263155 100644 --- a/src/eu/siacs/conversations/utils/UIHelper.java +++ b/src/eu/siacs/conversations/utils/UIHelper.java @@ -17,6 +17,7 @@ import eu.siacs.conversations.entities.Message; import eu.siacs.conversations.entities.MucOptions.User; import eu.siacs.conversations.ui.ConversationActivity; import eu.siacs.conversations.ui.ManageAccountActivity; +import android.annotation.SuppressLint; import android.app.Activity; import android.app.AlertDialog; import android.app.Notification; @@ -511,6 +512,7 @@ public class UIHelper { badge.setImageBitmap(contact.getImage(72, context)); } + @SuppressLint("InflateParams") public static AlertDialog getVerifyFingerprintDialog( final ConversationActivity activity, final Conversation conversation, final View msg) {