mirror of https://github.com/BOINC/boinc.git
client: fix Android build breaks
This commit is contained in:
parent
b5dc74011a
commit
da4432a8c0
|
@ -266,16 +266,16 @@ int CLIENT_STATE::check_suspend_processing() {
|
|||
}
|
||||
|
||||
#ifdef ANDROID
|
||||
if (now > host_info.device_status_time + ANDROID_KEEPALIVE_TIMEOUT) {
|
||||
if (now > device_status_time + ANDROID_KEEPALIVE_TIMEOUT) {
|
||||
return SUSPEND_REASON_NO_GUI_KEEPALIVE;
|
||||
}
|
||||
|
||||
// check for hot battery
|
||||
//
|
||||
if (host_info.device_status.battery_state == BATTERY_STATE_OVERHEATED) {
|
||||
if (device_status.battery_state == BATTERY_STATE_OVERHEATED) {
|
||||
return SUSPEND_REASON_BATTERY_OVERHEATED;
|
||||
}
|
||||
if (host_info.device_status.battery_temperature_celsius > 45) {
|
||||
if (device_status.battery_temperature_celsius > 45) {
|
||||
return SUSPEND_REASON_BATTERY_OVERHEATED;
|
||||
}
|
||||
|
||||
|
@ -283,7 +283,7 @@ int CLIENT_STATE::check_suspend_processing() {
|
|||
// while it's recharging.
|
||||
// So compute only if 95% charged or more.
|
||||
//
|
||||
int cp = host_info.device_status.battery_charge_pct;
|
||||
int cp = device_status.battery_charge_pct;
|
||||
if (cp >= 0) {
|
||||
if (cp < global_prefs.battery_charge_min_pct) {
|
||||
return SUSPEND_REASON_BATTERY_CHARGING;
|
||||
|
@ -406,14 +406,14 @@ void CLIENT_STATE::check_suspend_network() {
|
|||
}
|
||||
|
||||
#ifdef ANDROID
|
||||
if (now > host_info.device_status_time + ANDROID_KEEPALIVE_TIMEOUT) {
|
||||
if (now > device_status_time + ANDROID_KEEPALIVE_TIMEOUT) {
|
||||
file_xfers_suspended = true;
|
||||
if (!recent_rpc) network_suspended = true;
|
||||
network_suspend_reason = SUSPEND_REASON_NO_GUI_KEEPALIVE;
|
||||
}
|
||||
// use only WiFi
|
||||
//
|
||||
if (global_prefs.network_wifi_only && !host_info.device_status.wifi_online) {
|
||||
if (global_prefs.network_wifi_only && !device_status.wifi_online) {
|
||||
file_xfers_suspended = true;
|
||||
if (!recent_rpc) network_suspended = true;
|
||||
network_suspend_reason = SUSPEND_REASON_WIFI_STATE;
|
||||
|
|
Loading…
Reference in New Issue