Source added
This commit is contained in:
parent
b2864b500e
commit
ba28ca859e
8352 changed files with 1487182 additions and 1 deletions
1
glide-config/.gitignore
vendored
Normal file
1
glide-config/.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
/build
|
||||
13
glide-config/build.gradle.kts
Normal file
13
glide-config/build.gradle.kts
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
plugins {
|
||||
id("signal-library")
|
||||
id("com.google.devtools.ksp")
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "org.signal.glide"
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation(libs.glide.glide)
|
||||
ksp(libs.glide.ksp)
|
||||
}
|
||||
2
glide-config/src/main/AndroidManifest.xml
Normal file
2
glide-config/src/main/AndroidManifest.xml
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest />
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
package org.thoughtcrime.securesms.mms
|
||||
|
||||
import android.content.Context
|
||||
import android.util.Log
|
||||
import com.bumptech.glide.Glide
|
||||
import com.bumptech.glide.GlideBuilder
|
||||
import com.bumptech.glide.Registry
|
||||
import com.bumptech.glide.annotation.GlideModule
|
||||
import com.bumptech.glide.module.AppGlideModule
|
||||
|
||||
/**
|
||||
* A [GlideModule] to configure Glide for the app. This class is discovered by Glide's annotation
|
||||
* processor, and delegates its logic to a [RegisterGlideComponents]. It exists outside of the main
|
||||
* Gradle module to reduce the scope of classes that KAPT needs to look at.
|
||||
*/
|
||||
@GlideModule
|
||||
class SignalGlideModule : AppGlideModule() {
|
||||
|
||||
override fun isManifestParsingEnabled(): Boolean {
|
||||
return false
|
||||
}
|
||||
|
||||
override fun registerComponents(context: Context, glide: Glide, registry: Registry) {
|
||||
registerGlideComponents.registerComponents(context, glide, registry)
|
||||
}
|
||||
|
||||
override fun applyOptions(context: Context, builder: GlideBuilder) {
|
||||
builder.setLogLevel(Log.ERROR)
|
||||
}
|
||||
|
||||
companion object {
|
||||
@JvmStatic
|
||||
lateinit var registerGlideComponents: RegisterGlideComponents
|
||||
}
|
||||
}
|
||||
|
||||
interface RegisterGlideComponents {
|
||||
|
||||
fun registerComponents(context: Context, glide: Glide, registry: Registry)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue