|
|
@ -12,6 +12,7 @@ import kotlinx.coroutines.MainScope
|
|
|
|
import kotlinx.coroutines.launch
|
|
|
|
import kotlinx.coroutines.launch
|
|
|
|
import org.mozilla.fenix.HomeActivity
|
|
|
|
import org.mozilla.fenix.HomeActivity
|
|
|
|
import org.mozilla.fenix.ext.components
|
|
|
|
import org.mozilla.fenix.ext.components
|
|
|
|
|
|
|
|
import org.mozilla.fenix.ext.settings
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Processes incoming intents and sends them to the corresponding activity.
|
|
|
|
* Processes incoming intents and sends them to the corresponding activity.
|
|
|
@ -27,7 +28,13 @@ class AuthIntentReceiverActivity : Activity() {
|
|
|
|
// assumes it is not. If it's null, then we make a new one and open
|
|
|
|
// assumes it is not. If it's null, then we make a new one and open
|
|
|
|
// the HomeActivity.
|
|
|
|
// the HomeActivity.
|
|
|
|
val intent = intent?.let { Intent(intent) } ?: Intent()
|
|
|
|
val intent = intent?.let { Intent(intent) } ?: Intent()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (settings().lastKnownMode.isPrivate) {
|
|
|
|
|
|
|
|
components.intentProcessors.privateCustomTabIntentProcessor.process(intent)
|
|
|
|
|
|
|
|
} else {
|
|
|
|
components.intentProcessors.customTabIntentProcessor.process(intent)
|
|
|
|
components.intentProcessors.customTabIntentProcessor.process(intent)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
intent.setClassName(applicationContext, AuthCustomTabActivity::class.java.name)
|
|
|
|
intent.setClassName(applicationContext, AuthCustomTabActivity::class.java.name)
|
|
|
|
intent.putExtra(HomeActivity.OPEN_TO_BROWSER, true)
|
|
|
|
intent.putExtra(HomeActivity.OPEN_TO_BROWSER, true)
|
|
|
|
|
|
|
|
|
|
|
|