Upgrade several AndroidX Libraries.

AppCompat 1.2.0 to 1.5.1
Lifecycle 2.3.1 to 2.5.1
Navigation 2.3.5 to 2.5.2
Fragment 1.3.5 to 1.5.2
Annotations 1.2.0 to 1.4.0
Window 1.0.0-alpha09 to 1.0.0
AAPT2 to 7.0.4
Fragment-Testing 1.3.5 to 1.5.2 (matching Fragment)
This commit is contained in:
Alex Hart
2022-09-13 11:16:01 -03:00
committed by Greyson Parrelli
parent 9331e9ce89
commit 26bebb9811
86 changed files with 1398 additions and 362 deletions

View File

@@ -16,7 +16,7 @@ import androidx.annotation.Nullable;
import androidx.annotation.StringRes;
import androidx.appcompat.widget.Toolbar;
import androidx.fragment.app.Fragment;
import androidx.lifecycle.ViewModelProviders;
import androidx.lifecycle.ViewModelProvider;
import androidx.navigation.Navigation;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.ListAdapter;
@@ -144,7 +144,7 @@ public class EditAboutFragment extends Fragment implements ManageProfileActivity
}
private void initializeViewModel() {
this.viewModel = ViewModelProviders.of(this).get(EditAboutViewModel.class);
this.viewModel = new ViewModelProvider(this).get(EditAboutViewModel.class);
viewModel.getSaveState().observe(getViewLifecycleOwner(), this::presentSaveState);
viewModel.getEvents().observe(getViewLifecycleOwner(), this::presentEvent);

View File

@@ -13,7 +13,7 @@ import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.widget.Toolbar;
import androidx.fragment.app.Fragment;
import androidx.lifecycle.ViewModelProviders;
import androidx.lifecycle.ViewModelProvider;
import androidx.navigation.Navigation;
import org.signal.core.util.EditTextUtil;
@@ -76,7 +76,7 @@ public class EditProfileNameFragment extends Fragment {
}
private void initializeViewModel() {
this.viewModel = ViewModelProviders.of(this).get(EditProfileNameViewModel.class);
this.viewModel = new ViewModelProvider(this).get(EditProfileNameViewModel.class);
viewModel.getSaveState().observe(getViewLifecycleOwner(), this::presentSaveState);
viewModel.getEvents().observe(getViewLifecycleOwner(), this::presentEvent);

View File

@@ -12,7 +12,7 @@ import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.PluralsRes;
import androidx.annotation.StringRes;
import androidx.lifecycle.ViewModelProviders;
import androidx.lifecycle.ViewModelProvider;
import androidx.recyclerview.widget.RecyclerView;
import org.thoughtcrime.securesms.R;
@@ -99,7 +99,7 @@ public class ReviewCardDialogFragment extends FullScreenDialogFragment {
ReviewCardRepository repository = getRepository();
ReviewCardViewModel.Factory factory = new ReviewCardViewModel.Factory(repository, getGroupId());
viewModel = ViewModelProviders.of(this, factory).get(ReviewCardViewModel.class);
viewModel = new ViewModelProvider(this, factory).get(ReviewCardViewModel.class);
}
private @StringRes int getDescriptionResId() {