Commit 19b0d6ae authored by Lucio Maciel's avatar Lucio Maciel

Fix FOSS build

parent 85ae5e2a
package chat.rocket.android.analytics package chat.rocket.android.analytics
import chat.rocket.android.analytics.event.AuthenticationEvent class AnswersAnalytics : Analytics
import chat.rocket.android.analytics.event.ScreenViewEvent \ No newline at end of file
import chat.rocket.android.analytics.event.SubscriptionTypeEvent
class AnswersAnalytics : Analytics {
override fun logLogin(event: AuthenticationEvent, loginSucceeded: Boolean) {
// Do absolutely nothing
}
override fun logSignUp(event: AuthenticationEvent, signUpSucceeded: Boolean) {
// Do absolutely nothing
}
override fun logScreenView(event: ScreenViewEvent) {
// Do absolutely nothing
}
override fun logMessageSent(event: SubscriptionTypeEvent, serverUrl: String) {
// Do absolutely nothing
}
override fun logMediaUploaded(event: SubscriptionTypeEvent, mimeType: String) {
// Do absolutely nothing
}
override fun logReaction(event: SubscriptionTypeEvent) {
// Do absolutely nothing
}
override fun logServerSwitch(serverUrl: String, serverCount: Int) {
// Do absolutely nothing
}
}
package chat.rocket.android.analytics package chat.rocket.android.analytics
import android.content.Context import android.content.Context
import chat.rocket.android.analytics.event.AuthenticationEvent
import chat.rocket.android.analytics.event.ScreenViewEvent
import chat.rocket.android.analytics.event.SubscriptionTypeEvent
import javax.inject.Inject import javax.inject.Inject
class GoogleAnalyticsForFirebase @Inject constructor(val context: Context) : class GoogleAnalyticsForFirebase @Inject constructor(val context: Context) : Analytics
Analytics { \ No newline at end of file
override fun logLogin(event: AuthenticationEvent, loginSucceeded: Boolean) {
// Do absolutely nothing
}
override fun logSignUp(event: AuthenticationEvent, signUpSucceeded: Boolean) {
// Do absolutely nothing
}
override fun logScreenView(event: ScreenViewEvent) {
// Do absolutely nothing
}
override fun logMessageSent(event: SubscriptionTypeEvent, serverUrl: String) {
// Do absolutely nothing
}
override fun logMediaUploaded(event: SubscriptionTypeEvent, mimeType: String) {
// Do absolutely nothing
}
override fun logReaction(event: SubscriptionTypeEvent) {
// Do absolutely nothing
}
override fun logServerSwitch(serverUrl: String, serverCount: Int) {
// Do absolutely nothing
}
}
...@@ -12,7 +12,7 @@ interface Analytics { ...@@ -12,7 +12,7 @@ interface Analytics {
* @param event The [AuthenticationEvent] used to log in. * @param event The [AuthenticationEvent] used to log in.
* @param loginSucceeded True if successful logged in, false otherwise. * @param loginSucceeded True if successful logged in, false otherwise.
*/ */
fun logLogin(event: AuthenticationEvent, loginSucceeded: Boolean) fun logLogin(event: AuthenticationEvent, loginSucceeded: Boolean) {}
/** /**
* Logs the sign up event. * Logs the sign up event.
...@@ -20,14 +20,14 @@ interface Analytics { ...@@ -20,14 +20,14 @@ interface Analytics {
* @param event The [AuthenticationEvent] used to sign up. * @param event The [AuthenticationEvent] used to sign up.
* @param signUpSucceeded True if successful signed up, false otherwise. * @param signUpSucceeded True if successful signed up, false otherwise.
*/ */
fun logSignUp(event: AuthenticationEvent, signUpSucceeded: Boolean) fun logSignUp(event: AuthenticationEvent, signUpSucceeded: Boolean) {}
/** /**
* Logs the screen view event. * Logs the screen view event.
* *
* @param event The [ScreenViewEvent] to log. * @param event The [ScreenViewEvent] to log.
*/ */
fun logScreenView(event: ScreenViewEvent) fun logScreenView(event: ScreenViewEvent) {}
/** /**
* Logs the message sent event. * Logs the message sent event.
...@@ -35,7 +35,7 @@ interface Analytics { ...@@ -35,7 +35,7 @@ interface Analytics {
* @param event The [SubscriptionTypeEvent] to log. * @param event The [SubscriptionTypeEvent] to log.
* @param serverUrl The server URL to log. * @param serverUrl The server URL to log.
*/ */
fun logMessageSent(event: SubscriptionTypeEvent, serverUrl: String) fun logMessageSent(event: SubscriptionTypeEvent, serverUrl: String) {}
/** /**
* Logs the media upload event. * Logs the media upload event.
...@@ -43,14 +43,14 @@ interface Analytics { ...@@ -43,14 +43,14 @@ interface Analytics {
* @param event The [SubscriptionTypeEvent] to log. * @param event The [SubscriptionTypeEvent] to log.
* @param mimeType The mime type of the media uploaded to log. * @param mimeType The mime type of the media uploaded to log.
*/ */
fun logMediaUploaded(event: SubscriptionTypeEvent, mimeType: String) fun logMediaUploaded(event: SubscriptionTypeEvent, mimeType: String) {}
/** /**
* Logs the reaction event. * Logs the reaction event.
* *
* @param event The [SubscriptionTypeEvent] to log. * @param event The [SubscriptionTypeEvent] to log.
*/ */
fun logReaction(event: SubscriptionTypeEvent) fun logReaction(event: SubscriptionTypeEvent) {}
/** /**
* Logs the server switch event. * Logs the server switch event.
...@@ -58,10 +58,10 @@ interface Analytics { ...@@ -58,10 +58,10 @@ interface Analytics {
* @param serverUrl The server URL to log. * @param serverUrl The server URL to log.
* @param serverCount The number of server(s) the use own. * @param serverCount The number of server(s) the use own.
*/ */
fun logServerSwitch(serverUrl: String, serverCount: Int) fun logServerSwitch(serverUrl: String, serverCount: Int) {}
/** /**
* Logs the admin opening. * Logs the admin opening.
*/ */
fun logOpenAdmin() fun logOpenAdmin() {}
} }
...@@ -19,5 +19,3 @@ org.gradle.jvmargs=-Xmx1536m ...@@ -19,5 +19,3 @@ org.gradle.jvmargs=-Xmx1536m
# org.gradle.parallel=true # org.gradle.parallel=true
android.injected.testOnly=false android.injected.testOnly=false
android.enableD8=false
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment