diff --git a/WordPress/src/main/java/org/wordpress/android/ui/jetpack/backup/BackupDownloadActivity.kt b/WordPress/src/main/java/org/wordpress/android/ui/jetpack/backup/BackupDownloadActivity.kt index 3de88b41181c..7a820790af41 100644 --- a/WordPress/src/main/java/org/wordpress/android/ui/jetpack/backup/BackupDownloadActivity.kt +++ b/WordPress/src/main/java/org/wordpress/android/ui/jetpack/backup/BackupDownloadActivity.kt @@ -3,7 +3,6 @@ package org.wordpress.android.ui.jetpack.backup import android.os.Bundle import androidx.fragment.app.Fragment import androidx.lifecycle.ViewModelProvider -import androidx.lifecycle.ViewModelProviders import kotlinx.android.synthetic.main.backup_download_activity.* import org.wordpress.android.R import org.wordpress.android.WordPress @@ -31,7 +30,7 @@ class BackupDownloadActivity : LocaleAwareActivity() { } private fun setupViewModel() { - viewModel = ViewModelProviders.of(this, viewModelFactory) + viewModel = ViewModelProvider(this, viewModelFactory) .get(BackupDownloadViewModel::class.java) viewModel.start() diff --git a/WordPress/src/main/java/org/wordpress/android/ui/jetpack/backup/details/BackupDownloadDetailsFragment.kt b/WordPress/src/main/java/org/wordpress/android/ui/jetpack/backup/details/BackupDownloadDetailsFragment.kt index 82aab974ee0b..dbdc4979681a 100644 --- a/WordPress/src/main/java/org/wordpress/android/ui/jetpack/backup/details/BackupDownloadDetailsFragment.kt +++ b/WordPress/src/main/java/org/wordpress/android/ui/jetpack/backup/details/BackupDownloadDetailsFragment.kt @@ -6,7 +6,6 @@ import android.view.View import android.view.ViewGroup import androidx.fragment.app.Fragment import androidx.lifecycle.ViewModelProvider -import androidx.lifecycle.ViewModelProviders import org.wordpress.android.R import org.wordpress.android.WordPress import org.wordpress.android.ui.jetpack.backup.BackupDownloadViewModel @@ -30,10 +29,10 @@ class BackupDownloadDetailsFragment : Fragment() { val nonNullActivity = requireActivity() (nonNullActivity.application as WordPress).component().inject(this) - parentViewModel = ViewModelProviders.of(requireActivity(), viewModelFactory) + parentViewModel = ViewModelProvider(requireActivity(), viewModelFactory) .get(BackupDownloadViewModel::class.java) - viewModel = ViewModelProviders.of(this, viewModelFactory) + viewModel = ViewModelProvider(this, viewModelFactory) .get(BackupDownloadDetailsViewModel::class.java) setupViews()