mirror of
https://github.com/mihonapp/mihon.git
synced 2025-11-12 20:19:05 +01:00
Rewrote UpdateDownloader to Kotlin
Added auto update check (every 12 hour) Warning message optional fix #256 Lots of bug fixes!
This commit is contained in:
@@ -11,7 +11,7 @@ object DeviceUtil {
|
||||
val intent = context.registerReceiver(null, IntentFilter(Intent.ACTION_BATTERY_CHANGED))
|
||||
intent?.let {
|
||||
val plugged = it.getIntExtra(BatteryManager.EXTRA_PLUGGED, -1)
|
||||
return plugged == BatteryManager.BATTERY_PLUGGED_AC || plugged == BatteryManager.BATTERY_PLUGGED_USB
|
||||
return plugged == BatteryManager.BATTERY_PLUGGED_AC || plugged == BatteryManager.BATTERY_PLUGGED_USB || plugged == BatteryManager.BATTERY_PLUGGED_WIRELESS
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user