From 7416f30aafe363e23502e782db8d0c6bee96c216 Mon Sep 17 00:00:00 2001 From: Sayantan Roychowdhury Date: Wed, 11 Sep 2024 00:12:16 +0530 Subject: [PATCH] refactor: move MainActivity (#1417) --- app/src/main/AndroidManifest.xml | 2 +- .../e/apps/install/splitinstall/SplitInstallBinder.kt | 2 +- .../foundation/e/apps/install/updates/UpdatesNotifier.kt | 2 +- app/src/main/java/foundation/e/apps/{ => ui}/MainActivity.kt | 5 +++-- .../foundation/e/apps/ui/application/ApplicationFragment.kt | 2 +- app/src/main/res/layout/activity_main.xml | 2 +- 6 files changed, 8 insertions(+), 7 deletions(-) rename app/src/main/java/foundation/e/apps/{ => ui}/MainActivity.kt (96%) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index b0b621218..4b789577b 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -75,7 +75,7 @@ tools:targetApi="tiramisu"> diff --git a/app/src/main/java/foundation/e/apps/install/splitinstall/SplitInstallBinder.kt b/app/src/main/java/foundation/e/apps/install/splitinstall/SplitInstallBinder.kt index d24315573..0e303bf4a 100644 --- a/app/src/main/java/foundation/e/apps/install/splitinstall/SplitInstallBinder.kt +++ b/app/src/main/java/foundation/e/apps/install/splitinstall/SplitInstallBinder.kt @@ -32,7 +32,7 @@ import androidx.core.app.NotificationCompat import androidx.core.app.NotificationManagerCompat import androidx.core.content.pm.PackageInfoCompat import foundation.e.apps.ISplitInstallService -import foundation.e.apps.MainActivity +import foundation.e.apps.ui.MainActivity import foundation.e.apps.R import foundation.e.apps.data.DownloadManager import foundation.e.apps.data.application.ApplicationRepository diff --git a/app/src/main/java/foundation/e/apps/install/updates/UpdatesNotifier.kt b/app/src/main/java/foundation/e/apps/install/updates/UpdatesNotifier.kt index 63eafed67..de50df95a 100644 --- a/app/src/main/java/foundation/e/apps/install/updates/UpdatesNotifier.kt +++ b/app/src/main/java/foundation/e/apps/install/updates/UpdatesNotifier.kt @@ -29,7 +29,7 @@ import android.os.Build import androidx.core.app.ActivityCompat import androidx.core.app.NotificationCompat import androidx.core.app.NotificationManagerCompat -import foundation.e.apps.MainActivity +import foundation.e.apps.ui.MainActivity import foundation.e.apps.R object UpdatesNotifier { diff --git a/app/src/main/java/foundation/e/apps/MainActivity.kt b/app/src/main/java/foundation/e/apps/ui/MainActivity.kt similarity index 96% rename from app/src/main/java/foundation/e/apps/MainActivity.kt rename to app/src/main/java/foundation/e/apps/ui/MainActivity.kt index 618ce7584..65843485c 100644 --- a/app/src/main/java/foundation/e/apps/MainActivity.kt +++ b/app/src/main/java/foundation/e/apps/ui/MainActivity.kt @@ -16,7 +16,7 @@ * */ -package foundation.e.apps +package foundation.e.apps.ui import android.content.Intent import android.os.Build.VERSION @@ -42,6 +42,8 @@ import com.aurora.gplayapi.exceptions.ApiException import com.google.android.material.bottomnavigation.BottomNavigationView import com.google.android.material.snackbar.Snackbar import dagger.hilt.android.AndroidEntryPoint +import foundation.e.apps.BuildConfig +import foundation.e.apps.R import foundation.e.apps.contract.ParentalControlContract.COLUMN_LOGIN_TYPE import foundation.e.apps.data.Constants import foundation.e.apps.data.enums.User @@ -52,7 +54,6 @@ import foundation.e.apps.data.login.PlayStoreAuthenticator import foundation.e.apps.data.login.exceptions.GPlayValidationException import foundation.e.apps.databinding.ActivityMainBinding import foundation.e.apps.install.updates.UpdatesNotifier -import foundation.e.apps.ui.MainActivityViewModel import foundation.e.apps.ui.application.subFrags.ApplicationDialogFragment import foundation.e.apps.ui.purchase.AppPurchaseFragmentDirections import foundation.e.apps.ui.settings.SettingsFragment diff --git a/app/src/main/java/foundation/e/apps/ui/application/ApplicationFragment.kt b/app/src/main/java/foundation/e/apps/ui/application/ApplicationFragment.kt index 210a4aa11..9d325f250 100644 --- a/app/src/main/java/foundation/e/apps/ui/application/ApplicationFragment.kt +++ b/app/src/main/java/foundation/e/apps/ui/application/ApplicationFragment.kt @@ -51,7 +51,7 @@ import com.google.android.material.button.MaterialButton import com.google.android.material.snackbar.Snackbar import com.google.android.material.textview.MaterialTextView import dagger.hilt.android.AndroidEntryPoint -import foundation.e.apps.MainActivity +import foundation.e.apps.ui.MainActivity import foundation.e.apps.R import foundation.e.apps.data.application.data.Application import foundation.e.apps.data.application.data.shareUri diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index b2056ce54..5d8706c33 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -21,7 +21,7 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" - tools:context=".MainActivity"> + tools:context=".ui.MainActivity">