From 5f1a874eaa3df3cfc5096dd59fae93b881199e1e Mon Sep 17 00:00:00 2001 From: parneet-guraya Date: Thu, 27 Feb 2025 00:12:04 +0530 Subject: [PATCH 1/2] rm unused file Signed-off-by: parneet-guraya --- .../dialog/ProgressDialogFragment.java | 69 ------------------- 1 file changed, 69 deletions(-) delete mode 100644 android/app/src/main/java/app/organicmaps/dialog/ProgressDialogFragment.java diff --git a/android/app/src/main/java/app/organicmaps/dialog/ProgressDialogFragment.java b/android/app/src/main/java/app/organicmaps/dialog/ProgressDialogFragment.java deleted file mode 100644 index 4b7a2ebb72..0000000000 --- a/android/app/src/main/java/app/organicmaps/dialog/ProgressDialogFragment.java +++ /dev/null @@ -1,69 +0,0 @@ -package app.organicmaps.dialog; - -import android.app.Activity; -import android.content.DialogInterface; -import android.os.Bundle; -import android.view.LayoutInflater; -import android.view.View; -import android.view.ViewGroup; -import android.widget.TextView; - -import androidx.annotation.Nullable; -import androidx.fragment.app.DialogFragment; -import androidx.fragment.app.Fragment; - -import app.organicmaps.R; - -public class ProgressDialogFragment extends DialogFragment -{ - private static final String ARG_MESSAGE = "title"; - private static final String ARG_CANCELABLE = "cancelable"; - private static final String ARG_RETAIN_INSTANCE = "retain_instance"; - - public ProgressDialogFragment() - { - // Do nothing by default. - } - - protected void setCancelResult() - { - Fragment targetFragment = getTargetFragment(); - if (targetFragment != null) - targetFragment.onActivityResult(getTargetRequestCode(), Activity.RESULT_CANCELED, null); - } - - @Override - public void onCreate(@Nullable Bundle savedInstanceState) - { - super.onCreate(savedInstanceState); - Bundle args = requireArguments(); - setRetainInstance(args.getBoolean(ARG_RETAIN_INSTANCE, true)); - setCancelable(args.getBoolean(ARG_CANCELABLE, false)); - } - - @Nullable - @Override - public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable - Bundle savedInstanceState) - { - View view = inflater.inflate(R.layout.indeterminated_progress_dialog, container, false); - Bundle args = requireArguments(); - TextView messageView = view.findViewById(R.id.message); - messageView.setText(args.getString(ARG_MESSAGE)); - return view; - } - - @Override - public void onCancel(DialogInterface dialog) - { - setCancelResult(); - } - - @Override - public void onDestroyView() - { - if (getDialog() != null && getRetainInstance()) - getDialog().setDismissMessage(null); - super.onDestroyView(); - } -} -- 2.45.3 From c20ba65612957c28178dc7e576eb93cf153156f2 Mon Sep 17 00:00:00 2001 From: parneet-guraya Date: Thu, 27 Feb 2025 03:02:56 +0530 Subject: [PATCH 2/2] delete corresponding layout file Signed-off-by: parneet-guraya --- .../layout/indeterminated_progress_dialog.xml | 21 ------------------- 1 file changed, 21 deletions(-) delete mode 100644 android/app/src/main/res/layout/indeterminated_progress_dialog.xml diff --git a/android/app/src/main/res/layout/indeterminated_progress_dialog.xml b/android/app/src/main/res/layout/indeterminated_progress_dialog.xml deleted file mode 100644 index 0eb143649a..0000000000 --- a/android/app/src/main/res/layout/indeterminated_progress_dialog.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - -- 2.45.3