app: enable dynamic colors

This commit is contained in:
Harsh Shandilya 2021-11-01 02:32:15 +05:30
parent 2ee48cdab6
commit eb1ed0bbd1
No known key found for this signature in database
GPG key ID: 366D7BBAD1031E80

View file

@ -13,6 +13,7 @@ import androidx.appcompat.app.AppCompatDelegate.MODE_NIGHT_AUTO_BATTERY
import androidx.appcompat.app.AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM import androidx.appcompat.app.AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM
import androidx.appcompat.app.AppCompatDelegate.MODE_NIGHT_NO import androidx.appcompat.app.AppCompatDelegate.MODE_NIGHT_NO
import androidx.appcompat.app.AppCompatDelegate.MODE_NIGHT_YES import androidx.appcompat.app.AppCompatDelegate.MODE_NIGHT_YES
import com.google.android.material.color.DynamicColors
import dagger.hilt.android.HiltAndroidApp import dagger.hilt.android.HiltAndroidApp
import dev.msfjarvis.aps.injection.context.FilesDirPath import dev.msfjarvis.aps.injection.context.FilesDirPath
import dev.msfjarvis.aps.injection.prefs.SettingsPreferences import dev.msfjarvis.aps.injection.prefs.SettingsPreferences
@ -49,6 +50,7 @@ class Application : android.app.Application(), SharedPreferences.OnSharedPrefere
setUpBouncyCastleForSshj() setUpBouncyCastleForSshj()
runMigrations(filesDirPath, prefs, gitSettings) runMigrations(filesDirPath, prefs, gitSettings)
proxyUtils.setDefaultProxy() proxyUtils.setDefaultProxy()
DynamicColors.applyToActivitiesIfAvailable(this)
} }
override fun onTerminate() { override fun onTerminate() {