- initial work on UNTESTED ksu support
- prepare for play release
- don't try to get magisk path if no root
- remove debug logging entirely on release builds
- if we set an if condition to a constant falsey value, r8 is nice enough to remove it for us
- more that i really don't care to document
Signed-off-by: androidacy-user <opensource@androidacy.com>
// if lastEventId is null, hide the feedback button
Timber.d("CrashHandler.onCreate: lastEventId is null but crash reporting is enabled. This may indicate a bug in the crash reporting system.")
if(BuildConfig.DEBUG)Timber.d("CrashHandler.onCreate: lastEventId is null but crash reporting is enabled. This may indicate a bug in the crash reporting system.")
@ -51,7 +52,7 @@ class RepoUpdater(repoData2: RepoData) {
}*/
// if we shouldn't update, get the values from the ModuleListCache realm
if(!repoData.shouldUpdate()&&repoData.preferenceId=="androidacy_repo"){// for now, only enable cache reading for androidacy repo, until we handle storing module prop file values in cache
Timber.d("Fetching index from cache for %s",repoData.preferenceId)
if(BuildConfig.DEBUG)Timber.d("Fetching index from cache for %s",repoData.preferenceId)
// now the above but for room
valdb=Room.databaseBuilder(
MainApplication.INSTANCE!!,
@ -60,10 +61,15 @@ class RepoUpdater(repoData2: RepoData) {
).allowMainThreadQueries().build()
valmoduleListCacheDao=db.moduleListCacheDao()
// now we have the cache, we need to check if it's up to date
@ -147,18 +153,18 @@ class RepoUpdater(repoData2: RepoData) {
funfinish():Boolean{
// If repo is not enabled we don't need to do anything, just return true
if(!repoData.isEnabled){
Timber.d("Repo %s is disabled, skipping",repoData.preferenceId)
if(BuildConfig.DEBUG)Timber.d("Repo %s is disabled, skipping",repoData.preferenceId)
returntrue
}
valsuccess=AtomicBoolean(false)
Timber.d("Finishing update for %s",repoData.preferenceId)
if(BuildConfig.DEBUG)Timber.d("Finishing update for %s",repoData.preferenceId)
if(indexRaw!=null){
valtmpIndexRaw=indexRaw!!
Timber.d("Updating database for %s",repoData.preferenceId)
if(BuildConfig.DEBUG)Timber.d("Updating database for %s",repoData.preferenceId)
// new thread to update the database
valthread=Thread{
valstartTime=System.currentTimeMillis()
Timber.d("Updating database thread for %s",repoData.preferenceId)
if(BuildConfig.DEBUG)Timber.d("Updating database thread for %s",repoData.preferenceId)
try{
// iterate over modules, using this.supportedProperties as a template to attempt to get each property from the module. everything that is not null is added to the module
// use room to insert to
@ -179,21 +185,21 @@ class RepoUpdater(repoData2: RepoData) {
}catch(e:Exception){
Timber.e(e)
Timber.w("No modules were found in the index file for %s",repoData.preferenceId)
Timber.d("Finished updating database for %s in %dms",repoData.preferenceId,System.currentTimeMillis()-startTime)
if(BuildConfig.DEBUG)Timber.d("Finished updating database for %s in %dms",repoData.preferenceId,System.currentTimeMillis()-startTime)
success.set(false)
return@Thread
}
Timber.d("Got modules for %s",repoData.preferenceId)
if(BuildConfig.DEBUG)Timber.d("Got modules for %s",repoData.preferenceId)
<stringname="ksu_experimental"><![CDATA[KernelSU support is currently <b>experimental</b> and may have issues. Compatibility with modules is not guaraunteed.]]></string>