Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1b75de4a authored by Mohammed Althaf T's avatar Mohammed Althaf T 😊
Browse files

refactor: move shared App Lounge constants to install-app-lib

parent 91958b93
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -37,5 +37,4 @@ object Constants {
        "${BuildConfig.PACKAGE_NAME_PARENTAL_CONTROL}.action.APP_LOUNGE_LOGIN"

    const val REQUEST_GPLAY_LOGIN = "request_gplay_login"
    const val ACTION_LOGIN = "foundation.e.apps.action.LOGIN"
}
+2 −2
Original line number Diff line number Diff line
@@ -56,6 +56,7 @@ import foundation.e.apps.data.system.ParentalControlAuthenticator
import foundation.e.apps.databinding.ActivityMainBinding
import foundation.e.apps.domain.install.OtherStoreUpdateConfirmation
import foundation.e.apps.domain.model.User
import foundation.e.apps.installapp.Constants.ACTION_LOGIN
import foundation.e.apps.ui.application.ApplicationFragmentArgs
import foundation.e.apps.ui.application.subFrags.ApplicationDialogFragment
import foundation.e.apps.ui.error.AppUnavailableDialogDirections
@@ -64,7 +65,6 @@ import foundation.e.apps.ui.settings.SettingsFragment
import foundation.e.apps.ui.setup.signin.SignInViewModel
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.flow.collectLatest
import kotlinx.coroutines.flow.distinctUntilChanged
import kotlinx.coroutines.flow.filter
import kotlinx.coroutines.flow.filterIsInstance
import kotlinx.coroutines.launch
@@ -200,7 +200,7 @@ class MainActivity : AppCompatActivity() {
    }

    private fun checkGPlayLoginRequest(intent: Intent?) {
        val isLoginAction = intent?.action == Constants.ACTION_LOGIN
        val isLoginAction = intent?.action == ACTION_LOGIN
        viewModel.gPlayLoginRequested =
            isLoginAction || (intent?.getBooleanExtra(Constants.REQUEST_GPLAY_LOGIN, false) ?: false)

+1 −2
Original line number Diff line number Diff line
@@ -85,8 +85,7 @@ class AppInstaller(private val context: Context) {
            }

            val intent = Intent().apply {
                component =
                    ComponentName.unflattenFromString("foundation.e.apps/.services.InstallAppService")
                component = ComponentName(Constants.APP_LOUNGE_PACKAGE, Constants.INSTALL_SERVICE)
            }
            context.bindService(intent, serviceConnection, Context.BIND_AUTO_CREATE)

+26 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2026 e Foundation
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 *
 */
package foundation.e.apps.installapp

object Constants {
    const val APP_LOUNGE_PACKAGE = "foundation.e.apps"
    const val LOGIN_ACTIVITY = "$APP_LOUNGE_PACKAGE.ui.MainActivity"
    const val ACTION_LOGIN = "$APP_LOUNGE_PACKAGE.action.LOGIN"
    const val INSTALL_SERVICE = "$APP_LOUNGE_PACKAGE.services.InstallAppService"
    const val BIND_PERMISSION = "$APP_LOUNGE_PACKAGE.permission.BIND_INSTALL_SERVICE"
}