Use ContextCompat.getSystemService() and the Context.getSystemService() extension function.
This commit is contained in:
parent
cdb6e718f7
commit
3da55d9f40
17 changed files with 61 additions and 43 deletions
|
|
@ -29,6 +29,7 @@ import androidx.annotation.NonNull;
|
|||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.StringRes;
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.core.content.FileProvider;
|
||||
import androidx.core.view.ViewCompat;
|
||||
import androidx.recyclerview.widget.DiffUtil;
|
||||
|
|
@ -120,7 +121,7 @@ public class MissionAdapter extends Adapter<ViewHolder> implements Handler.Callb
|
|||
mContext = context;
|
||||
mDownloadManager = downloadManager;
|
||||
|
||||
mInflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||
mInflater = ContextCompat.getSystemService(mContext, LayoutInflater.class);
|
||||
mLayout = R.layout.mission_item;
|
||||
|
||||
mHandler = new Handler(context.getMainLooper());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue