| Index: chrome/browser/chromeos/policy/device_status_collector.cc
|
| diff --git a/chrome/browser/chromeos/policy/device_status_collector.cc b/chrome/browser/chromeos/policy/device_status_collector.cc
|
| index 521edf74c16c0b7264f2a219fc564c84db2b45a9..3c7445ea4ef6dacb789da7ef349881d971e6c99d 100644
|
| --- a/chrome/browser/chromeos/policy/device_status_collector.cc
|
| +++ b/chrome/browser/chromeos/policy/device_status_collector.cc
|
| @@ -48,6 +48,7 @@
|
| #include "chromeos/dbus/dbus_thread_manager.h"
|
| #include "chromeos/dbus/update_engine_client.h"
|
| #include "chromeos/disks/disk_mount_manager.h"
|
| +#include "chromeos/login/login_state.h"
|
| #include "chromeos/network/device_state.h"
|
| #include "chromeos/network/network_handler.h"
|
| #include "chromeos/network/network_state.h"
|
| @@ -301,6 +302,12 @@ int ConvertWifiSignalStrength(int signal_strength) {
|
| return signal_strength - 120;
|
| }
|
|
|
| +bool IsKioskApp() {
|
| + auto user_type = chromeos::LoginState::Get()->GetLoggedInUserType();
|
| + return user_type == chromeos::LoginState::LOGGED_IN_USER_KIOSK_APP ||
|
| + user_type == chromeos::LoginState::LOGGED_IN_USER_ARC_KIOSK_APP;
|
| +}
|
| +
|
| } // namespace
|
|
|
| namespace policy {
|
| @@ -668,7 +675,8 @@ void DeviceStatusCollector::IdleStateCallback(ui::IdleState state) {
|
|
|
| Time now = GetCurrentTime();
|
|
|
| - if (state == ui::IDLE_STATE_ACTIVE) {
|
| + // For kiosk apps we report total uptime instead of active time.
|
| + if (state == ui::IDLE_STATE_ACTIVE || IsKioskApp()) {
|
| // If it's been too long since the last report, or if the activity is
|
| // negative (which can happen when the clock changes), assume a single
|
| // interval of activity.
|
|
|