diff --git a/src/main/java/com/owncloud/android/ui/activity/DrawerActivity.java b/src/main/java/com/owncloud/android/ui/activity/DrawerActivity.java index 801c8c1960..140cd292fc 100644 --- a/src/main/java/com/owncloud/android/ui/activity/DrawerActivity.java +++ b/src/main/java/com/owncloud/android/ui/activity/DrawerActivity.java @@ -456,7 +456,7 @@ public abstract class DrawerActivity extends ToolbarActivity implements DisplayU case R.id.nav_logout: mCheckedMenuItem = -1; menuItem.setChecked(false); - UserInfoActivity.openAccountRemovalConfirmationDialog(getAccount(), getFragmentManager(), true); + UserInfoActivity.openAccountRemovalConfirmationDialog(getAccount(), getSupportFragmentManager(), true); break; case R.id.drawer_menu_account_add: boolean isProviderOrOwnInstallationVisible = getResources() diff --git a/src/main/java/com/owncloud/android/ui/activity/StorageMigration.java b/src/main/java/com/owncloud/android/ui/activity/StorageMigration.java index 4024f33015..ce7747b849 100644 --- a/src/main/java/com/owncloud/android/ui/activity/StorageMigration.java +++ b/src/main/java/com/owncloud/android/ui/activity/StorageMigration.java @@ -22,7 +22,6 @@ package com.owncloud.android.ui.activity; import android.accounts.Account; import android.accounts.AccountManager; -import android.app.AlertDialog; import android.app.ProgressDialog; import android.content.ContentResolver; import android.content.Context; @@ -39,6 +38,8 @@ import com.owncloud.android.utils.FileStorageUtils; import java.io.File; +import androidx.appcompat.app.AlertDialog; + /** * @author Bartosz Przybylski */ diff --git a/src/main/java/com/owncloud/android/ui/activity/UserInfoActivity.java b/src/main/java/com/owncloud/android/ui/activity/UserInfoActivity.java index dba3c5192f..4dabda9a06 100644 --- a/src/main/java/com/owncloud/android/ui/activity/UserInfoActivity.java +++ b/src/main/java/com/owncloud/android/ui/activity/UserInfoActivity.java @@ -27,8 +27,6 @@ import android.accounts.Account; import android.accounts.AccountManager; import android.app.AlertDialog; import android.app.Dialog; -import android.app.DialogFragment; -import android.app.FragmentManager; import android.content.ContentResolver; import android.content.Intent; import android.graphics.PorterDuff; @@ -81,6 +79,8 @@ import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.annotation.StringRes; import androidx.core.graphics.drawable.DrawableCompat; +import androidx.fragment.app.DialogFragment; +import androidx.fragment.app.FragmentManager; import androidx.recyclerview.widget.RecyclerView; import butterknife.BindString; import butterknife.BindView; @@ -174,7 +174,7 @@ public class UserInfoActivity extends FileActivity { onBackPressed(); break; case R.id.delete_account: - openAccountRemovalConfirmationDialog(account, getFragmentManager(), false); + openAccountRemovalConfirmationDialog(account, getSupportFragmentManager(), false); break; default: retval = super.onOptionsItemSelected(item); diff --git a/src/main/java/com/owncloud/android/ui/dialog/RemoveFilesDialogFragment.java b/src/main/java/com/owncloud/android/ui/dialog/RemoveFilesDialogFragment.java index ad4e946d34..62a413a1b8 100644 --- a/src/main/java/com/owncloud/android/ui/dialog/RemoveFilesDialogFragment.java +++ b/src/main/java/com/owncloud/android/ui/dialog/RemoveFilesDialogFragment.java @@ -19,7 +19,6 @@ package com.owncloud.android.ui.dialog; -import android.app.AlertDialog; import android.app.Dialog; import android.os.Bundle; import android.view.ActionMode; @@ -34,6 +33,7 @@ import java.util.ArrayList; import java.util.Collection; import androidx.annotation.NonNull; +import androidx.appcompat.app.AlertDialog; /** * Dialog requiring confirmation before removing a collection of given OCFiles. @@ -133,7 +133,7 @@ public class RemoveFilesDialogFragment extends ConfirmationDialogFragment implem int color = ThemeUtils.primaryAccentColor(getActivity()); - androidx.appcompat.app.AlertDialog alertDialog = (androidx.appcompat.app.AlertDialog) getDialog(); + AlertDialog alertDialog = (AlertDialog) getDialog(); alertDialog.getButton(AlertDialog.BUTTON_POSITIVE).setTextColor(color); alertDialog.getButton(AlertDialog.BUTTON_NEGATIVE).setTextColor(color);