/* * Copyright (C) 2023 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ syntax = "proto2"; package android.os.statsd.devicelock; import "frameworks/proto_logging/stats/atom_field_options.proto"; import "frameworks/proto_logging/stats/atoms.proto"; option java_package = "com.android.os.devicelock"; option java_multiple_files = true; extend Atom { optional DeviceLockCheckInRequestReported device_lock_check_in_request_reported = 726 [(module) = "devicelock"]; optional DeviceLockProvisioningCompleteReported device_lock_provisioning_complete_reported = 727 [(module) = "devicelock"]; optional DeviceLockKioskAppRequestReported device_lock_kiosk_app_request_reported = 728 [(module) = "devicelock"]; optional CheckInRetryReported device_lock_check_in_retry_reported = 789 [(module) = "devicelock"]; optional ProvisionFailureReported device_lock_provision_failure_reported = 790 [(module) = "devicelock"]; optional LockUnlockDeviceFailureReported device_lock_lock_unlock_device_failure_reported = 791 [(module) = "devicelock"]; } message DeviceLockCheckInRequestReported { enum RequestType { // Default value for the request type UNKNOWN = 0; // The Check-in request is getDeviceCheckInStatus GET_DEVICE_CHECK_IN_STATUS = 1; // The Check-in request is pauseDeviceProvisioning PAUSE_DEVICE_PROVISIONING = 2; // The Check-in request is reportDeviceProvisioningComplete // DEPRECATED, because the gRPC call for this log type is removed REPORT_DEVICE_PROVISIONING_COMPLETE = 3 [deprecated = true]; // The Check-in request is reportDeviceProvisionState REPORT_DEVICE_PROVISION_STATE = 4; // The Check-in request is isDeviceInApprovedCountry IS_DEVICE_IN_APPROVED_COUNTRY = 5; } optional RequestType type = 1; } message DeviceLockProvisioningCompleteReported { optional int64 time_spent_on_provisioning_seconds = 1; } message DeviceLockKioskAppRequestReported { optional int32 kiosk_app_uid = 1 [(is_uid) = true]; } message CheckInRetryReported { enum RetryReason { // Check-in retry happens because server did not specify next step. RESPONSE_UNSPECIFIED = 0; // Check-in retry happens due to provisioning configuration unavailable COUNFIGURATION_UNAVAILABLE = 1; // Check-in retry happens due to network time being unavailable NETWORK_TIME_UNAVAILABLE = 2; // Check-in retry happens due to an failure in the previous RPC RPC_FAILURE = 3; } optional RetryReason reason= 1; } message ProvisionFailureReported { enum FailureReason { // Reason is unknown UNKNOWN = 0; // Failed due to play task unavailable PLAY_TASK_UNAVAILABLE = 1; // Failed due to installation from play unsuccessful PLAY_INSTALLATION_FAILED = 2; // Failed due to country eligibility unknown COUNTRY_INFO_UNAVAILABLE = 3; // Failed due to country not eligible NOT_IN_ELIGIBLE_COUNTRY = 4; // Failed due to unable to enforce policies POLICY_ENFORCEMENT_FAILED = 5; } optional FailureReason reason = 1; } message LockUnlockDeviceFailureReported { enum DeviceState { // Device state is undefined. UNDEFINED = 0; // Device state is unlocked. UNLOCKED = 1; // Device state is locked. LOCKED = 2; // Device state is cleared. CLEARED = 3; } // True if the command is lock; false if it is unlock. optional bool is_lock = 1; optional DeviceState state_post_command = 2; }