universal7885: parts: Load jni lib on apply on boot

This commit is contained in:
roynatech2544 2022-04-12 19:24:48 +09:00
commit cd97190144
No known key found for this signature in database
GPG key ID: 50ABF73F0D19445D

View file

@ -18,6 +18,7 @@ class BootReceiver : BroadcastReceiver() {
val mSharedPreferences = p0?.let { PreferenceManager.getDefaultSharedPreferences(it) } val mSharedPreferences = p0?.let { PreferenceManager.getDefaultSharedPreferences(it) }
if (p1 != null && mSharedPreferences != null) { if (p1 != null && mSharedPreferences != null) {
if (p1.action == Intent.ACTION_BOOT_COMPLETED){ if (p1.action == Intent.ACTION_BOOT_COMPLETED){
System.loadLibrary("samsungparts_jni")
// Battery // Battery
Battery.chargeSysfs = if (mSharedPreferences Battery.chargeSysfs = if (mSharedPreferences
.getBoolean(BatteryFragment.PREF_CHARGE, true)) 0 else 1 .getBoolean(BatteryFragment.PREF_CHARGE, true)) 0 else 1