-
-
Notifications
You must be signed in to change notification settings - Fork 134
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
21f5d50
commit c0f3fed
Showing
37 changed files
with
218 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
9 changes: 9 additions & 0 deletions
9
app/src/fdroid/java/ani/dantotsu/connections/crashlytics/CrashlyticsFactory.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package ani.dantotsu.connections.crashlytics | ||
|
||
class CrashlyticsFactory { | ||
companion object { | ||
fun createCrashlytics(): CrashlyticsInterface { | ||
return CrashlyticsStub() | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package ani.dantotsu.others | ||
|
||
import androidx.fragment.app.FragmentActivity | ||
|
||
object AppUpdater { | ||
suspend fun check(activity: FragmentActivity, post: Boolean = false) { | ||
//no-op | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
app/src/google/java/ani/dantotsu/connections/crashlytics/CrashlyticsFactory.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package ani.dantotsu.connections.crashlytics | ||
|
||
class CrashlyticsFactory { | ||
companion object { | ||
fun createCrashlytics(): CrashlyticsInterface { | ||
return FirebaseCrashlytics() | ||
} | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
app/src/google/java/ani/dantotsu/connections/crashlytics/FirebaseCrashlytics.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package ani.dantotsu.connections.crashlytics | ||
|
||
import com.google.firebase.crashlytics.FirebaseCrashlytics | ||
import com.google.firebase.crashlytics.ktx.crashlytics | ||
import com.google.firebase.ktx.Firebase | ||
|
||
class FirebaseCrashlytics : CrashlyticsInterface { | ||
override fun logException(e: Throwable) { | ||
FirebaseCrashlytics.getInstance().recordException(e) | ||
} | ||
|
||
override fun log(message: String) { | ||
FirebaseCrashlytics.getInstance().log(message) | ||
} | ||
|
||
override fun setUserId(id: String) { | ||
Firebase.crashlytics.setUserId(id) | ||
} | ||
|
||
override fun setCustomKey(key: String, value: String) { | ||
FirebaseCrashlytics.getInstance().setCustomKey(key, value) | ||
} | ||
|
||
override fun setCrashlyticsCollectionEnabled(enabled: Boolean) { | ||
FirebaseCrashlytics.getInstance().setCrashlyticsCollectionEnabled(enabled) | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
app/src/main/java/ani/dantotsu/connections/crashlytics/CrashlyticsInterface.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package ani.dantotsu.connections.crashlytics | ||
|
||
interface CrashlyticsInterface { | ||
fun logException(e: Throwable) | ||
fun log(message: String) | ||
fun setUserId(id: String) | ||
fun setCustomKey(key: String, value: String) | ||
fun setCrashlyticsCollectionEnabled(enabled: Boolean) | ||
} |
24 changes: 24 additions & 0 deletions
24
app/src/main/java/ani/dantotsu/connections/crashlytics/CrashlyticsStub.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package ani.dantotsu.connections.crashlytics | ||
|
||
class CrashlyticsStub : CrashlyticsInterface { | ||
override fun logException(e: Throwable) { | ||
//no-op | ||
} | ||
|
||
override fun log(message: String) { | ||
//no-op | ||
} | ||
|
||
override fun setUserId(id: String) { | ||
//no-op | ||
} | ||
|
||
override fun setCustomKey(key: String, value: String) { | ||
//no-op | ||
} | ||
|
||
override fun setCrashlyticsCollectionEnabled(enabled: Boolean) { | ||
//no-op | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.