1 // This file is autogenerated 2 3 #pragma once 4 5 #include <stdint.h> 6 #include <vector> 7 #include <map> 8 #include <set> 9 10 namespace stats { 11 namespace apex { 12 13 /* 14 * API For logging statistics events. 15 */ 16 17 /** 18 * Constants for atom codes. 19 */ 20 enum { 21 22 /** 23 * ApexInstallationRequested apex_installation_requested 24 * Usage: stats_write(APEX_INSTALLATION_REQUESTED, char const* module_name, int64_t version_code, int64_t package_size_bytes, char const* file_hash, int32_t apex_preinstall_partition, int32_t installation_type, bool request_is_rollback, bool provides_shared_apex_libs, const std::vector<char const*>& provided_hals); 25 */ 26 APEX_INSTALLATION_REQUESTED = 732, 27 28 /** 29 * ApexInstallationStaged apex_installation_staged 30 * Usage: stats_write(APEX_INSTALLATION_STAGED, char const* file_hash); 31 */ 32 APEX_INSTALLATION_STAGED = 733, 33 34 /** 35 * ApexInstallationEnded apex_installation_ended 36 * Usage: stats_write(APEX_INSTALLATION_ENDED, char const* file_hash, int32_t installation_result); 37 */ 38 APEX_INSTALLATION_ENDED = 734 39 40 }; 41 42 // 43 // Constants for enum values 44 // 45 46 // Values for ApexInstallationRequested.apex_preinstall_partition 47 const int32_t APEX_INSTALLATION_REQUESTED__APEX_PREINSTALL_PARTITION__PARTITION_UNKNOWN = 0; 48 const int32_t APEX_INSTALLATION_REQUESTED__APEX_PREINSTALL_PARTITION__PARTITION_OTHER = 1; 49 const int32_t APEX_INSTALLATION_REQUESTED__APEX_PREINSTALL_PARTITION__PARTITION_PRODUCT = 2; 50 const int32_t APEX_INSTALLATION_REQUESTED__APEX_PREINSTALL_PARTITION__PARTITION_SYSTEM = 3; 51 const int32_t APEX_INSTALLATION_REQUESTED__APEX_PREINSTALL_PARTITION__PARTITION_SYSTEM_EXT = 4; 52 const int32_t APEX_INSTALLATION_REQUESTED__APEX_PREINSTALL_PARTITION__PARTITION_VENDOR = 5; 53 const int32_t APEX_INSTALLATION_REQUESTED__APEX_PREINSTALL_PARTITION__PARTITION_ODM = 6; 54 55 // Values for ApexInstallationRequested.installation_type 56 const int32_t APEX_INSTALLATION_REQUESTED__INSTALLATION_TYPE__UNKNOWN_INSTALL_TYPE = 0; 57 const int32_t APEX_INSTALLATION_REQUESTED__INSTALLATION_TYPE__STAGED = 1; 58 const int32_t APEX_INSTALLATION_REQUESTED__INSTALLATION_TYPE__REBOOTLESS = 2; 59 60 // Values for ApexInstallationEnded.installation_result 61 const int32_t APEX_INSTALLATION_ENDED__INSTALLATION_RESULT__UNKNOWN_INSTALL_RESULT = 0; 62 const int32_t APEX_INSTALLATION_ENDED__INSTALLATION_RESULT__INSTALL_SUCCESSFUL = 1; 63 const int32_t APEX_INSTALLATION_ENDED__INSTALLATION_RESULT__INSTALL_FAILURE_APEX_READING = 2; 64 const int32_t APEX_INSTALLATION_ENDED__INSTALLATION_RESULT__INSTALL_FAILURE_APEX_VALIDATION = 3; 65 const int32_t APEX_INSTALLATION_ENDED__INSTALLATION_RESULT__INSTALL_FAILURE_APEX_PREPARATION = 4; 66 const int32_t APEX_INSTALLATION_ENDED__INSTALLATION_RESULT__INSTALL_FAILURE_APEX_STAGING = 5; 67 const int32_t APEX_INSTALLATION_ENDED__INSTALLATION_RESULT__INSTALL_FAILURE_APEX_INSTALLATION = 6; 68 const int32_t APEX_INSTALLATION_ENDED__INSTALLATION_RESULT__INSTALL_FAILURE_APEX_ACTIVATION = 7; 69 70 struct BytesField { BytesFieldBytesField71 BytesField(char const* array, size_t len) : arg(array), arg_length(len) {} 72 char const* arg; 73 size_t arg_length; 74 }; 75 76 // 77 // Write methods 78 // 79 int stats_write(int32_t code, char const* arg1); 80 int stats_write(int32_t code, char const* arg1, int32_t arg2); 81 int stats_write(int32_t code, char const* arg1, int64_t arg2, int64_t arg3, char const* arg4, int32_t arg5, int32_t arg6, bool arg7, bool arg8, const std::vector<char const*>& arg9) 82 __INTRODUCED_IN(__ANDROID_API_T__); 83 84 } // namespace apex 85 } // namespace stats 86