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:
NoodleMage
2016-04-18 00:20:58 +02:00
parent ec9c19ce7d
commit 55e9d2880c
23 changed files with 532 additions and 249 deletions

View File

@@ -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
}