Messaging: Convert further parts to androidx
CursorLoader, LoaderManager, Preferences, Fragments, ... Change-Id: I8787b2db365249839547c6d5c21ab7cd5ff42082
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (C) 2015 The Android Open Source Project
|
||||
* Copyright (C) 2024 The LineageOS Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -16,13 +17,15 @@
|
||||
|
||||
package com.android.messaging.datamodel.data;
|
||||
|
||||
import android.app.LoaderManager;
|
||||
import android.content.Context;
|
||||
import android.content.Loader;
|
||||
import android.database.Cursor;
|
||||
import android.os.Bundle;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.loader.app.LoaderManager;
|
||||
import androidx.loader.content.Loader;
|
||||
|
||||
import com.android.messaging.R;
|
||||
import com.android.messaging.datamodel.BoundCursorLoader;
|
||||
import com.android.messaging.datamodel.DatabaseHelper.ParticipantColumns;
|
||||
@@ -126,6 +129,7 @@ public class SettingsData extends BindableData implements
|
||||
|
||||
private static final int SELF_PARTICIPANT_LOADER = 1;
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Loader<Cursor> onCreateLoader(final int id, final Bundle args) {
|
||||
Assert.equals(SELF_PARTICIPANT_LOADER, id);
|
||||
@@ -147,7 +151,7 @@ public class SettingsData extends BindableData implements
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadFinished(final Loader<Cursor> generic, final Cursor data) {
|
||||
public void onLoadFinished(@NonNull final Loader<Cursor> generic, final Cursor data) {
|
||||
final BoundCursorLoader loader = (BoundCursorLoader) generic;
|
||||
|
||||
// Check if data still bound to the requesting ui element
|
||||
|
||||
Reference in New Issue
Block a user