fixed some lint warnings. thanks @betheg

This commit is contained in:
iNPUTmice 2014-09-27 11:46:56 +02:00
parent 8fb0fb0c0d
commit 2415781ebf
5 changed files with 10 additions and 1 deletions

View File

@ -17,6 +17,7 @@ import android.net.Uri;
import android.os.Bundle; import android.os.Bundle;
import android.os.SystemClock; import android.os.SystemClock;
import android.provider.MediaStore; import android.provider.MediaStore;
import android.annotation.SuppressLint;
import android.app.ActionBar; import android.app.ActionBar;
import android.app.AlertDialog; import android.app.AlertDialog;
import android.app.FragmentTransaction; import android.app.FragmentTransaction;
@ -376,6 +377,7 @@ public class ConversationActivity extends XmppActivity implements
} }
} }
@SuppressLint("InflateParams")
protected void clearHistoryDialog(final Conversation conversation) { protected void clearHistoryDialog(final Conversation conversation) {
AlertDialog.Builder builder = new AlertDialog.Builder(this); AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setTitle(getString(R.string.clear_conversation_history)); builder.setTitle(getString(R.string.clear_conversation_history));

View File

@ -6,6 +6,7 @@ import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
import android.annotation.SuppressLint;
import android.app.ActionBar; import android.app.ActionBar;
import android.app.ActionBar.Tab; import android.app.ActionBar.Tab;
import android.app.ActionBar.TabListener; import android.app.ActionBar.TabListener;
@ -314,6 +315,7 @@ public class StartConversationActivity extends XmppActivity {
} }
@SuppressLint("InflateParams")
protected void showCreateContactDialog(String prefilledJid) { protected void showCreateContactDialog(String prefilledJid) {
AlertDialog.Builder builder = new AlertDialog.Builder(this); AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setTitle(R.string.create_contact); builder.setTitle(R.string.create_contact);
@ -368,6 +370,7 @@ public class StartConversationActivity extends XmppActivity {
} }
@SuppressLint("InflateParams")
protected void showJoinConferenceDialog() { protected void showJoinConferenceDialog() {
AlertDialog.Builder builder = new AlertDialog.Builder(this); AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setTitle(R.string.join_conference); builder.setTitle(R.string.join_conference);

View File

@ -15,6 +15,7 @@ import eu.siacs.conversations.entities.Presences;
import eu.siacs.conversations.services.XmppConnectionService; import eu.siacs.conversations.services.XmppConnectionService;
import eu.siacs.conversations.services.XmppConnectionService.XmppConnectionBinder; import eu.siacs.conversations.services.XmppConnectionService.XmppConnectionBinder;
import eu.siacs.conversations.utils.ExceptionHelper; import eu.siacs.conversations.utils.ExceptionHelper;
import android.annotation.SuppressLint;
import android.app.Activity; import android.app.Activity;
import android.app.AlertDialog; import android.app.AlertDialog;
import android.app.PendingIntent; import android.app.PendingIntent;
@ -390,6 +391,7 @@ public abstract class XmppActivity extends Activity {
quickEdit(previousValue, callback, true); quickEdit(previousValue, callback, true);
} }
@SuppressLint("InflateParams")
private void quickEdit(final String previousValue, private void quickEdit(final String previousValue,
final OnValueEdited callback, boolean password) { final OnValueEdited callback, boolean password) {
AlertDialog.Builder builder = new AlertDialog.Builder(this); AlertDialog.Builder builder = new AlertDialog.Builder(this);

View File

@ -24,7 +24,7 @@ public class ListItemAdapter extends ArrayAdapter<ListItem> {
.getSystemService(Context.LAYOUT_INFLATER_SERVICE); .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
ListItem item = getItem(position); ListItem item = getItem(position);
if (view == null) { 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 name = (TextView) view.findViewById(R.id.contact_display_name);
TextView jid = (TextView) view.findViewById(R.id.contact_jid); TextView jid = (TextView) view.findViewById(R.id.contact_jid);

View File

@ -17,6 +17,7 @@ import eu.siacs.conversations.entities.Message;
import eu.siacs.conversations.entities.MucOptions.User; import eu.siacs.conversations.entities.MucOptions.User;
import eu.siacs.conversations.ui.ConversationActivity; import eu.siacs.conversations.ui.ConversationActivity;
import eu.siacs.conversations.ui.ManageAccountActivity; import eu.siacs.conversations.ui.ManageAccountActivity;
import android.annotation.SuppressLint;
import android.app.Activity; import android.app.Activity;
import android.app.AlertDialog; import android.app.AlertDialog;
import android.app.Notification; import android.app.Notification;
@ -511,6 +512,7 @@ public class UIHelper {
badge.setImageBitmap(contact.getImage(72, context)); badge.setImageBitmap(contact.getImage(72, context));
} }
@SuppressLint("InflateParams")
public static AlertDialog getVerifyFingerprintDialog( public static AlertDialog getVerifyFingerprintDialog(
final ConversationActivity activity, final ConversationActivity activity,
final Conversation conversation, final View msg) { final Conversation conversation, final View msg) {