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

Commit 6d0f32df authored by Mohammed Althaf T's avatar Mohammed Althaf T 😊
Browse files

Allow to login from backup app

parent 89912133
Loading
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -89,6 +89,11 @@
            </intent-filter>
            <nav-graph android:value="@navigation/navigation_resource" />

            <intent-filter>
                <action android:name="foundation.e.apps.action.LOGIN" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>

            <!-- Google Play Store -->
            <intent-filter android:autoVerify="true">
                <action android:name="android.intent.action.VIEW" />
+1 −0
Original line number Diff line number Diff line
@@ -34,4 +34,5 @@ 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"
}
+3 −1
Original line number Diff line number Diff line
@@ -232,8 +232,9 @@ class MainActivity : AppCompatActivity() {
    }

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

        if (!viewModel.isGPlayLoginRequested) {
@@ -452,6 +453,7 @@ class MainActivity : AppCompatActivity() {
                viewModel.uiEffects.collectLatest { effect ->
                    when (effect) {
                        MainActivityUiEffect.FinishAfterLogin -> {
                            setResult(RESULT_OK)
                            finishAndRemoveTask()
                        }
                        MainActivityUiEffect.RefreshStartupSession -> {