Skip to content

Commit

Permalink
fix: Project Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Aditya-gupta99 authored and therajanmaurya committed Dec 28, 2023
1 parent 3f1df7f commit d9dfdc1
Show file tree
Hide file tree
Showing 335 changed files with 460 additions and 705 deletions.
4 changes: 2 additions & 2 deletions config/quality/findbugs/android-exclude-filter.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@

<!--Ignore the static App.java instance initialization-->
<Match>
<Class name="com.mifos.App"/>
<Class name="com.mifos.application.App"/>
<Bug pattern="ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD" />
</Match>

<!--Ignore MS_MUTABLE_COLLECTION in App.java-->
<Match>
<Class name="com.mifos.App"/>
<Class name="com.mifos.application.App"/>
<Bug pattern="MS_MUTABLE_COLLECTION" />
</Match>

Expand Down
32 changes: 16 additions & 16 deletions mifosng-android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
android:required="true" />

<application
android:name="com.mifos.App"
android:name="com.mifos.application.App"
android:allowBackup="false"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
Expand All @@ -34,7 +34,7 @@
android:value="@string/google_maps_key" />

<activity
android:name=".SplashScreenActivity"
android:name=".activity.splashscreen.SplashScreenActivity"
android:label="@string/app_name"
android:screenOrientation="portrait"
android:exported="true"
Expand All @@ -46,11 +46,11 @@
</intent-filter>
</activity>
<activity
android:name="com.mifos.ui.activities.LoginActivity"
android:name=".activity.login.LoginActivity"
android:label="@string/mifos_account"
android:screenOrientation="portrait" />
<activity
android:name=".HomeActivity"
android:name=".activity.home.HomeActivity"
android:label="home_activity"
android:windowSoftInputMode="adjustPan"
android:screenOrientation="portrait" />
Expand All @@ -60,7 +60,7 @@
android:screenOrientation="portrait" />

<activity
android:name=".online.SurveyQuestionActivity"
android:name=".online.surveyquestion.SurveyQuestionActivity"
android:label="Survey"
android:parentActivityName="com.mifos.mifosxdroid.online.ClientActivity"
android:screenOrientation="portrait">
Expand All @@ -81,27 +81,27 @@
android:name=".online.CentersActivity"
android:label="@string/title_activity_centers"
android:screenOrientation="portrait"
android:parentActivityName=".HomeActivity">
android:parentActivityName=".activity.home.HomeActivity">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".HomeActivity" />
android:value=".activity.home.HomeActivity" />
</activity>
<activity
android:name=".online.GenerateCollectionSheetActivity"
android:configChanges="orientation|screenSize"
android:label="@string/title_activity_generate_collection_sheet"
android:parentActivityName=".HomeActivity">
android:parentActivityName=".activity.home.HomeActivity">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".HomeActivity" />
android:value=".activity.home.HomeActivity" />
</activity>
<activity
android:name=".online.RunReportsActivity"
android:name=".online.runreports.RunReportsActivity"
android:label="@string/run_report"
android:parentActivityName=".HomeActivity">
android:parentActivityName=".activity.home.HomeActivity">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".HomeActivity" />
android:value=".activity.home.HomeActivity" />
</activity>
<activity
android:name=".activity.pinpointclient.PinpointClientActivity"
Expand Down Expand Up @@ -135,13 +135,13 @@
android:label="@string/sync_loanrepayments"
android:screenOrientation="portrait" />
<activity
android:name=".SettingsActivity"
android:name=".activity.setting.SettingsActivity"
android:label="@string/settings"
android:screenOrientation="portrait"
android:parentActivityName=".HomeActivity">
android:parentActivityName=".activity.home.HomeActivity">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".HomeActivity" />
android:value=".activity.home.HomeActivity" />
</activity>
<activity
android:name=".offline.syncsavingsaccounttransaction.SyncSavingsAccountTransactionActivity"
Expand All @@ -152,7 +152,7 @@
android:label="@string/pass_code"
android:screenOrientation="portrait" />

<activity android:name=".AboutActivity"
<activity android:name=".activity.about.AboutActivity"
android:label="@string/about"
android:screenOrientation="portrait" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@
* This project is licensed under the open source MPL V2.
* See https://github.com/openMF/android-client/blob/master/LICENSE.md
*/
package com.mifos
package com.mifos.application

import android.content.Context
import android.graphics.Typeface
import android.os.Build
import android.os.StrictMode
import android.os.StrictMode.VmPolicy
import android.preference.PreferenceManager
Expand All @@ -16,7 +15,6 @@ import com.evernote.android.job.JobManager
import com.facebook.stetho.Stetho
import com.joanzapata.iconify.Iconify
import com.joanzapata.iconify.fonts.MaterialModule
import com.mifos.mifosxdroid.injection.module.ApplicationModule
import com.mifos.mifosxdroid.offlinejobs.OfflineJobCreator
import com.mifos.mobile.passcode.utils.ForegroundChecker
import com.mifos.utils.LanguageHelper.onAttach
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package com.mifos.mifosxdroid
package com.mifos.mifosxdroid.activity.about

import android.content.Intent
import android.net.Uri
import android.os.Bundle
import com.mifos.mifosxdroid.BuildConfig
import com.mifos.mifosxdroid.core.MifosBaseActivity
import com.mifos.mifosxdroid.databinding.ActivityAboutBinding
import dagger.hilt.android.AndroidEntryPoint
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package com.mifos.mifosxdroid
package com.mifos.mifosxdroid.activity.home

import android.content.Intent
import android.os.Bundle
import android.os.Handler
import android.view.Menu
import android.view.MenuItem
import android.view.View
Expand All @@ -17,6 +15,7 @@ import androidx.navigation.ui.AppBarConfiguration
import androidx.navigation.ui.setupWithNavController
import androidx.test.espresso.IdlingResource
import com.google.android.material.navigation.NavigationView
import com.mifos.mifosxdroid.R
import com.mifos.mifosxdroid.core.MifosBaseActivity
import com.mifos.mifosxdroid.databinding.ActivityHomeBinding
import com.mifos.mifosxdroid.databinding.ViewNavDrawerHeaderBinding
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* This project is licensed under the open source MPL V2.
* See https://github.com/openMF/android-client/blob/master/LICENSE.md
*/
package com.mifos.ui.activities
package com.mifos.mifosxdroid.activity.login

import android.content.Intent
import android.os.Bundle
Expand All @@ -18,20 +18,18 @@ import android.widget.Toast
import androidx.core.content.ContextCompat
import androidx.lifecycle.ViewModelProvider
import com.mifos.api.BaseApiManager
import com.mifos.mifosxdroid.HomeActivity
import com.mifos.mifosxdroid.activity.home.HomeActivity
import com.mifos.mifosxdroid.R
import com.mifos.mifosxdroid.core.MifosBaseActivity
import com.mifos.mifosxdroid.core.util.Toaster
import com.mifos.mifosxdroid.databinding.ActivityLoginBinding
import com.mifos.mifosxdroid.passcode.PassCodeActivity
import com.mifos.states.LoginUiState
import com.mifos.utils.Constants
import com.mifos.utils.Network
import com.mifos.utils.PrefManager
import com.mifos.utils.PrefManager.savePostAuthenticationResponse
import com.mifos.utils.PrefManager.saveToken
import com.mifos.utils.ValidationUtil
import com.mifos.viewmodels.LoginViewModel
import dagger.hilt.android.AndroidEntryPoint
import org.apache.fineract.client.models.PostAuthenticationResponse
import javax.inject.Inject
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.mifos.repositories
package com.mifos.mifosxdroid.activity.login

import org.apache.fineract.client.models.PostAuthenticationResponse
import rx.Observable
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.mifos.repositories
package com.mifos.mifosxdroid.activity.login

import com.mifos.api.datamanager.DataManagerAuth
import org.apache.fineract.client.models.PostAuthenticationResponse
Expand All @@ -9,7 +9,8 @@ import javax.inject.Inject
* Created by Aditya Gupta on 06/08/23.
*/

class LoginRepositoryImp @Inject constructor(private val dataManagerAuth: DataManagerAuth) : LoginRepository {
class LoginRepositoryImp @Inject constructor(private val dataManagerAuth: DataManagerAuth) :
LoginRepository {

override fun login(username: String, password: String): Observable<PostAuthenticationResponse> {
return dataManagerAuth.login(username, password)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.mifos.states
package com.mifos.mifosxdroid.activity.login

import org.apache.fineract.client.models.PostAuthenticationResponse

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
package com.mifos.viewmodels
package com.mifos.mifosxdroid.activity.login

import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
import com.mifos.repositories.LoginRepository
import com.mifos.states.LoginUiState
import com.mifos.utils.PrefManager
import dagger.hilt.android.lifecycle.HiltViewModel
import org.apache.fineract.client.models.PostAuthenticationResponse
import rx.Subscriber
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,9 @@ import com.mifos.mifosxdroid.adapters.PathTrackingAdapter
import com.mifos.mifosxdroid.core.MifosBaseActivity
import com.mifos.mifosxdroid.databinding.ActivityPathTrackerBinding
import com.mifos.objects.user.UserLocation
import com.mifos.states.PathTrackingUiState
import com.mifos.utils.CheckSelfPermissionAndRequest
import com.mifos.utils.Constants
import com.mifos.utils.PrefManager
import com.mifos.viewmodels.PathTrackingViewModel
import dagger.hilt.android.AndroidEntryPoint

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.mifos.repositories
package com.mifos.mifosxdroid.activity.pathtracking

import com.mifos.objects.user.UserLocation
import rx.Observable
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.mifos.repositories
package com.mifos.mifosxdroid.activity.pathtracking

import com.mifos.api.datamanager.DataManagerDataTable
import com.mifos.objects.user.UserLocation
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.mifos.states
package com.mifos.mifosxdroid.activity.pathtracking

import com.mifos.objects.user.UserLocation

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
package com.mifos.viewmodels
package com.mifos.mifosxdroid.activity.pathtracking

import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
import com.mifos.objects.user.UserLocation
import com.mifos.repositories.PathTrackingRepository
import com.mifos.states.PathTrackingUiState
import dagger.hilt.android.lifecycle.HiltViewModel
import rx.Subscriber
import rx.android.schedulers.AndroidSchedulers
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.mifos.repositories
package com.mifos.mifosxdroid.activity.pinpointclient

import com.mifos.api.GenericResponse
import com.mifos.objects.client.ClientAddressRequest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.mifos.repositories
package com.mifos.mifosxdroid.activity.pinpointclient

import com.mifos.api.GenericResponse
import com.mifos.api.datamanager.DataManagerClient
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.mifos.states
package com.mifos.mifosxdroid.activity.pinpointclient

import com.mifos.objects.client.ClientAddressResponse

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.mifos.viewmodels
package com.mifos.mifosxdroid.activity.pinpointclient

import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
Expand All @@ -7,8 +7,6 @@ import com.mifos.api.GenericResponse
import com.mifos.mifosxdroid.R
import com.mifos.objects.client.ClientAddressRequest
import com.mifos.objects.client.ClientAddressResponse
import com.mifos.repositories.PinPointClientRepository
import com.mifos.states.PinPointClientUiState
import dagger.hilt.android.lifecycle.HiltViewModel
import rx.Subscriber
import rx.android.schedulers.AndroidSchedulers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,9 @@ import com.mifos.mifosxdroid.core.util.Toaster.show
import com.mifos.mifosxdroid.databinding.ActivityPinpointLocationBinding
import com.mifos.objects.client.ClientAddressRequest
import com.mifos.objects.client.ClientAddressResponse
import com.mifos.states.PinPointClientUiState
import com.mifos.utils.CheckSelfPermissionAndRequest.checkSelfPermission
import com.mifos.utils.CheckSelfPermissionAndRequest.requestPermission
import com.mifos.utils.Constants
import com.mifos.viewmodels.PinPointClientViewModel
import dagger.hilt.android.AndroidEntryPoint
import javax.inject.Inject

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package com.mifos.mifosxdroid
package com.mifos.mifosxdroid.activity.setting

import android.content.Intent
import android.os.Bundle
import androidx.core.app.ActivityCompat
import androidx.navigation.findNavController
import androidx.navigation.fragment.NavHostFragment
import com.mifos.mifosxdroid.activity.home.HomeActivity
import com.mifos.mifosxdroid.R
import com.mifos.mifosxdroid.core.MifosBaseActivity
import com.mifos.utils.Constants

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
@file:Suppress("DEPRECATION")

package com.mifos.mifosxdroid
package com.mifos.mifosxdroid.activity.setting

import android.content.Intent
import android.content.SharedPreferences
import android.os.Bundle
import androidx.preference.*
import androidx.preference.Preference.OnPreferenceChangeListener
import android.widget.Toast
import com.mifos.mifosxdroid.R
import com.mifos.mifosxdroid.dialogfragments.syncsurveysdialog.SyncSurveysDialogFragment
import com.mifos.mifosxdroid.online.DashboardActivity
import com.mifos.mifosxdroid.passcode.PassCodeActivity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
* This project is licensed under the open source MPL V2.
* See https://github.com/openMF/android-client/blob/master/LICENSE.md
*/
package com.mifos.mifosxdroid
package com.mifos.mifosxdroid.activity.splashscreen

import android.content.Intent
import android.os.Bundle
import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen
import com.mifos.api.BaseUrl
import com.mifos.mifosxdroid.core.MifosBaseActivity
import com.mifos.ui.activities.LoginActivity
import com.mifos.mifosxdroid.activity.login.LoginActivity
import com.mifos.mifosxdroid.passcode.PassCodeActivity
import com.mifos.mobile.passcode.utils.PassCodeConstants
import com.mifos.utils.PrefManager
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView
import com.mifos.App.Companion.context
import com.mifos.application.App.Companion.context
import com.mifos.mifosxdroid.R
import com.mifos.mifosxdroid.databinding.RowIdentifierListBinding
import com.mifos.objects.noncore.Identifier
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import androidx.appcompat.widget.Toolbar
import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentManager
import com.mifos.mifosxdroid.R
import com.mifos.mifosxdroid.SplashScreenActivity
import com.mifos.mifosxdroid.activity.splashscreen.SplashScreenActivity
import com.mifos.mifosxdroid.passcode.PassCodeActivity
import com.mifos.mobile.passcode.BasePassCodeActivity
import com.mifos.utils.Constants
Expand Down
Loading

0 comments on commit d9dfdc1

Please sign in to comment.