From 6e07396ea371972beb6719671c516967fc3ea8e8 Mon Sep 17 00:00:00 2001 From: Salvatore LaMendola Date: Wed, 24 May 2017 23:45:58 -0400 Subject: [PATCH] Rename fragment.getLayoutInflater for Android O+ - This method name is a duplicate of a final method in class Landroid/app/Fragment. Renaming it resolves the conflict and fixes the crash on my Android O device. --- .../src/main/java/com/fsck/k9/fragment/MessageListAdapter.java | 2 +- .../src/main/java/com/fsck/k9/fragment/MessageListFragment.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/k9mail/src/main/java/com/fsck/k9/fragment/MessageListAdapter.java b/k9mail/src/main/java/com/fsck/k9/fragment/MessageListAdapter.java index e18c7beee..d90d179e1 100644 --- a/k9mail/src/main/java/com/fsck/k9/fragment/MessageListAdapter.java +++ b/k9mail/src/main/java/com/fsck/k9/fragment/MessageListAdapter.java @@ -74,7 +74,7 @@ public class MessageListAdapter extends CursorAdapter { @Override public View newView(Context context, Cursor cursor, ViewGroup parent) { - View view = fragment.getLayoutInflater().inflate(R.layout.message_list_item, parent, false); + View view = fragment.getK9LayoutInflater().inflate(R.layout.message_list_item, parent, false); MessageViewHolder holder = new MessageViewHolder(fragment); holder.date = (TextView) view.findViewById(R.id.date); diff --git a/k9mail/src/main/java/com/fsck/k9/fragment/MessageListFragment.java b/k9mail/src/main/java/com/fsck/k9/fragment/MessageListFragment.java index 9a2b18746..175066d06 100644 --- a/k9mail/src/main/java/com/fsck/k9/fragment/MessageListFragment.java +++ b/k9mail/src/main/java/com/fsck/k9/fragment/MessageListFragment.java @@ -2913,7 +2913,7 @@ public class MessageListFragment extends Fragment implements OnItemClickListener return (isRemoteSearchAllowed() || isCheckMailAllowed()); } - LayoutInflater getLayoutInflater() { + LayoutInflater getK9LayoutInflater() { return layoutInflater; } }