Add Huawei flavor

This commit is contained in:
andrew
2023-07-25 11:38:06 +09:30
parent 58cda9ba4a
commit 01e9d15872
5 changed files with 48 additions and 0 deletions

View File

@@ -136,6 +136,13 @@ android {
buildConfigField "String", "NOPLAY_UPDATE_URL", "$ext.websiteUpdateUrl"
}
huawei {
dimension "distribution"
ext.websiteUpdateUrl = "null"
buildConfigField "boolean", "PLAY_STORE_DISABLED", "true"
buildConfigField "String", "NOPLAY_UPDATE_URL", "$ext.websiteUpdateUrl"
}
website {
dimension "distribution"
ext.websiteUpdateUrl = "https://github.com/oxen-io/session-android/releases"
@@ -203,6 +210,7 @@ dependencies {
exclude group: 'com.google.firebase', module: 'firebase-analytics'
exclude group: 'com.google.firebase', module: 'firebase-measurement-connector'
}
huaweiImplementation 'com.huawei.hms:push:6.7.0.300'
implementation 'com.google.android.exoplayer:exoplayer-core:2.9.1'
implementation 'com.google.android.exoplayer:exoplayer-ui:2.9.1'
implementation 'org.conscrypt:conscrypt-android:2.0.0'

View File

@@ -0,0 +1,9 @@
package org.thoughtcrime.securesms.notifications
import android.content.Context
class HuaweiPushManager(val context: Context): PushManager {
override fun refresh(force: Boolean) {
}
}

View File

@@ -0,0 +1,27 @@
package org.thoughtcrime.securesms.notifications
import android.content.Context
import dagger.Binds
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.android.qualifiers.ApplicationContext
import dagger.hilt.components.SingletonComponent
import javax.inject.Singleton
@Module
@InstallIn(SingletonComponent::class)
object HuaweiPushModule {
@Provides
@Singleton
fun provideFirebasePushManager(
@ApplicationContext context: Context,
) = HuaweiPushManager(context)
}
@Module
@InstallIn(SingletonComponent::class)
abstract class FirebaseBindingModule {
@Binds
abstract fun bindPushManager(firebasePushManager: HuaweiPushManager): PushManager
}