TP-35754 | Dex class not found issue fix (#7845)
This commit is contained in:
@@ -283,12 +283,12 @@ class DynamicDeliveryActivity : BaseActivity() {
|
||||
try {
|
||||
when (moduleName) {
|
||||
Constants.PL_DYNAMIC_MODULE_NAME -> {
|
||||
val intent = Intent(
|
||||
this.applicationContext, SplashActivityCompose::class.java
|
||||
)
|
||||
val intent = Intent(this.applicationContext, SplashActivityCompose::class.java)
|
||||
intent.setAction(Intent.ACTION_VIEW)
|
||||
intent.data =
|
||||
Uri.parse(FirebaseRemoteConfigHelper.getString(PL_SHORTCUT_DYNAMIC_DEEPLINK))
|
||||
Uri.parse(
|
||||
FirebaseRemoteConfigHelper.getString(PL_SHORTCUT_DYNAMIC_DEEPLINK)
|
||||
)
|
||||
val shortLabel = FirebaseRemoteConfigHelper.getString(PL_SHORTCUT_TITLE)
|
||||
val longLabel = FirebaseRemoteConfigHelper.getString(PL_SHORTCUT_TITLE)
|
||||
AppShortcutUtils.addAppShortcut(
|
||||
@@ -300,7 +300,7 @@ class DynamicDeliveryActivity : BaseActivity() {
|
||||
intent = intent,
|
||||
isUpdate = false
|
||||
) {
|
||||
//no op, will be handled later
|
||||
// no op, will be handled later
|
||||
}
|
||||
}
|
||||
else -> {}
|
||||
@@ -447,30 +447,31 @@ class DynamicDeliveryActivity : BaseActivity() {
|
||||
}
|
||||
|
||||
private fun launchModule(moduleName: String, activityClassPath: String) {
|
||||
if (isDynamicModuleInstalled(dynamicModuleName = moduleName)) {
|
||||
val launchIntent =
|
||||
Intent().apply {
|
||||
setClassName(APPLICATION_ID, activityClassPath)
|
||||
intent.extras?.let { putExtras(it) }
|
||||
try {
|
||||
if (isDynamicModuleInstalled(dynamicModuleName = moduleName)) {
|
||||
val launchIntent =
|
||||
Intent().apply {
|
||||
setClassName(APPLICATION_ID, activityClassPath)
|
||||
intent.extras?.let { putExtras(it) }
|
||||
}
|
||||
val needsResult = intent.getBooleanExtra(NEEDS_RESULT, false)
|
||||
val clearTask = intent.getBooleanExtra(CLEAR_TASK, false)
|
||||
val requestCode = intent.getIntExtra(REQUEST_CODE, 0)
|
||||
if (clearTask.orFalse()) {
|
||||
launchIntent.addFlags(
|
||||
Intent.FLAG_ACTIVITY_NEW_TASK or
|
||||
Intent.FLAG_ACTIVITY_CLEAR_TASK or
|
||||
Intent.FLAG_ACTIVITY_CLEAR_TOP
|
||||
)
|
||||
}
|
||||
val needsResult = intent.getBooleanExtra(NEEDS_RESULT, false)
|
||||
val clearTask = intent.getBooleanExtra(CLEAR_TASK, false)
|
||||
val requestCode = intent.getIntExtra(REQUEST_CODE, 0)
|
||||
if (clearTask.orFalse()) {
|
||||
launchIntent.addFlags(
|
||||
Intent.FLAG_ACTIVITY_NEW_TASK or
|
||||
Intent.FLAG_ACTIVITY_CLEAR_TASK or
|
||||
Intent.FLAG_ACTIVITY_CLEAR_TOP
|
||||
)
|
||||
}
|
||||
try {
|
||||
if (needsResult.orFalse()) {
|
||||
startActivityForResult(launchIntent, requestCode.orZero())
|
||||
} else startActivity(launchIntent)
|
||||
} catch (e: Exception) {
|
||||
dynamicDeliveryEventTracker.unableToInstantiateActivity(errorMessage = e.message)
|
||||
e.log()
|
||||
finish()
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
dynamicDeliveryEventTracker.unableToInstantiateActivity(errorMessage = e.message)
|
||||
e.log()
|
||||
finish()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user