mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-04 10:32:34 +00:00
Ensure enterprise build only use the application names.
This commit is contained in:
@@ -73,12 +73,14 @@ object AppModule {
|
|||||||
@ApplicationContext context: Context,
|
@ApplicationContext context: Context,
|
||||||
buildType: BuildType,
|
buildType: BuildType,
|
||||||
enterpriseService: EnterpriseService,
|
enterpriseService: EnterpriseService,
|
||||||
) = BuildMeta(
|
): BuildMeta {
|
||||||
|
val applicationName = ApplicationConfig.APPLICATION_NAME.takeIf { it.isNotEmpty() } ?: context.getString(R.string.app_name)
|
||||||
|
return BuildMeta(
|
||||||
isDebuggable = BuildConfig.DEBUG,
|
isDebuggable = BuildConfig.DEBUG,
|
||||||
buildType = buildType,
|
buildType = buildType,
|
||||||
applicationName = ApplicationConfig.APPLICATION_NAME.takeIf { it.isNotEmpty() } ?: context.getString(R.string.app_name),
|
applicationName = applicationName,
|
||||||
productionApplicationName = ApplicationConfig.PRODUCTION_APPLICATION_NAME,
|
productionApplicationName = if (enterpriseService.isEnterpriseBuild) applicationName else ApplicationConfig.PRODUCTION_APPLICATION_NAME,
|
||||||
desktopApplicationName = ApplicationConfig.DESKTOP_APPLICATION_NAME,
|
desktopApplicationName = if (enterpriseService.isEnterpriseBuild) applicationName else ApplicationConfig.DESKTOP_APPLICATION_NAME,
|
||||||
applicationId = BuildConfig.APPLICATION_ID,
|
applicationId = BuildConfig.APPLICATION_ID,
|
||||||
isEnterpriseBuild = enterpriseService.isEnterpriseBuild,
|
isEnterpriseBuild = enterpriseService.isEnterpriseBuild,
|
||||||
// TODO EAx Config.LOW_PRIVACY_LOG_ENABLE,
|
// TODO EAx Config.LOW_PRIVACY_LOG_ENABLE,
|
||||||
@@ -90,6 +92,7 @@ object AppModule {
|
|||||||
flavorDescription = BuildConfig.FLAVOR_DESCRIPTION,
|
flavorDescription = BuildConfig.FLAVOR_DESCRIPTION,
|
||||||
flavorShortDescription = BuildConfig.SHORT_FLAVOR_DESCRIPTION,
|
flavorShortDescription = BuildConfig.SHORT_FLAVOR_DESCRIPTION,
|
||||||
)
|
)
|
||||||
|
}
|
||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
@SingleIn(AppScope::class)
|
@SingleIn(AppScope::class)
|
||||||
|
|||||||
Reference in New Issue
Block a user