Loading api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -45633,6 +45633,7 @@ package android.telephony { field public static final int APPTYPE_USIM = 2; // 0x2 field public static final int AUTHTYPE_EAP_AKA = 129; // 0x81 field public static final int AUTHTYPE_EAP_SIM = 128; // 0x80 field public static final long CALLBACK_ON_MORE_ERROR_CODE_CHANGE = 130595455L; // 0x7c8ba7fL field public static final int CALL_STATE_IDLE = 0; // 0x0 field public static final int CALL_STATE_OFFHOOK = 2; // 0x2 field public static final int CALL_STATE_RINGING = 1; // 0x1 cmds/statsd/Android.bp +2 −0 Original line number Diff line number Diff line Loading @@ -50,6 +50,7 @@ cc_defaults { srcs: [ ":statsd_aidl", ":ICarStatsService.aidl", "src/active_config_list.proto", "src/statsd_config.proto", "src/uid_data.proto", Loading @@ -69,6 +70,7 @@ cc_defaults { "src/config/ConfigKey.cpp", "src/config/ConfigListener.cpp", "src/config/ConfigManager.cpp", "src/external/CarStatsPuller.cpp", "src/external/GpuStatsPuller.cpp", "src/external/Perfetto.cpp", "src/external/StatsPuller.cpp", Loading cmds/statsd/src/StatsService.cpp +18 −5 Original line number Diff line number Diff line Loading @@ -266,7 +266,9 @@ status_t StatsService::onTransact(uint32_t code, const Parcel& data, Parcel* rep IResultReceiver::asInterface(data.readStrongBinder()); err = command(in, out, err, args, resultReceiver); if (resultReceiver != nullptr) { resultReceiver->send(err); } return NO_ERROR; } default: { return BnStatsManager::onTransact(code, data, reply, flags); } Loading Loading @@ -411,13 +413,20 @@ status_t StatsService::command(int in, int out, int err, Vector<String8>& args, return cmd_trigger_active_config_broadcast(out, args); } if (!args[0].compare(String8("data-subscribe"))) { { std::lock_guard<std::mutex> lock(mShellSubscriberMutex); if (mShellSubscriber == nullptr) { mShellSubscriber = new ShellSubscriber(mUidMap, mPullerManager); } } int timeoutSec = -1; if (argCount >= 2) { timeoutSec = atoi(args[1].c_str()); } if (resultReceiver == nullptr) { ALOGI("Null resultReceiver given, no subscription will be started"); return UNEXPECTED_NULL; } mShellSubscriber->startNewSubscription(in, out, resultReceiver, timeoutSec); return NO_ERROR; } Loading Loading @@ -1385,7 +1394,10 @@ Status StatsService::sendBinaryPushStateChangedAtom(const android::String16& tra Status StatsService::sendWatchdogRollbackOccurredAtom(const int32_t rollbackTypeIn, const android::String16& packageNameIn, const int64_t packageVersionCodeIn) { const int64_t packageVersionCodeIn, const int32_t rollbackReasonIn, const android::String16& failingPackageNameIn) { // Note: We skip the usage stats op check here since we do not have a package name. // This is ok since we are overloading the usage_stats permission. // This method only sends data, it does not receive it. Loading @@ -1407,7 +1419,8 @@ Status StatsService::sendWatchdogRollbackOccurredAtom(const int32_t rollbackType } android::util::stats_write(android::util::WATCHDOG_ROLLBACK_OCCURRED, rollbackTypeIn, String8(packageNameIn).string(), packageVersionCodeIn); rollbackTypeIn, String8(packageNameIn).string(), packageVersionCodeIn, rollbackReasonIn, String8(failingPackageNameIn).string()); // Fast return to save disk read. if (rollbackTypeIn != android::util::WATCHDOG_ROLLBACK_OCCURRED__ROLLBACK_TYPE__ROLLBACK_SUCCESS Loading cmds/statsd/src/StatsService.h +7 −1 Original line number Diff line number Diff line Loading @@ -200,7 +200,9 @@ public: virtual Status sendWatchdogRollbackOccurredAtom( const int32_t rollbackTypeIn, const android::String16& packageNameIn, const int64_t packageVersionCodeIn) override; const int64_t packageVersionCodeIn, const int32_t rollbackReasonIn, const android::String16& failingPackageNameIn) override; /** * Binder call to get registered experiment IDs. Loading Loading @@ -432,6 +434,10 @@ private: sp<ShellSubscriber> mShellSubscriber; /** * Mutex for setting the shell subscriber */ mutable mutex mShellSubscriberMutex; std::shared_ptr<LogEventQueue> mEventQueue; FRIEND_TEST(StatsLogProcessorTest, TestActivationsPersistAcrossSystemServerRestart); Loading cmds/statsd/src/atoms.proto +91 −2 Original line number Diff line number Diff line Loading @@ -326,10 +326,11 @@ message Atom { 228 [(allow_from_any_uid) = true]; PerfettoUploaded perfetto_uploaded = 229 [(log_from_module) = "perfetto"]; VmsClientConnectionStateChanged vms_client_connection_state_changed = 230; } // Pulled events will start at field 10000. // Next: 10062 // Next: 10067 oneof pulled { WifiBytesTransfer wifi_bytes_transfer = 10000; WifiBytesTransferByFgBg wifi_bytes_transfer_by_fg_bg = 10001; Loading Loading @@ -393,6 +394,8 @@ message Atom { CoolingDevice cooling_device = 10059; AppOps app_ops = 10060; ProcessSystemIonHeapSize process_system_ion_heap_size = 10061; VmsClientStats vms_client_stats = 10065; NotificationRemoteViews notification_remote_views = 10066; } // DO NOT USE field numbers above 100,000 in AOSP. Loading Loading @@ -1689,6 +1692,19 @@ message WatchdogRollbackOccurred { optional string package_name = 2; optional int32 package_version_code = 3; enum RollbackReasonType { REASON_UNKNOWN = 0; REASON_NATIVE_CRASH = 1; REASON_EXPLICIT_HEALTH_CHECK = 2; REASON_APP_CRASH = 3; REASON_APP_NOT_RESPONDING = 4; } optional RollbackReasonType rollback_reason = 4; // Set by RollbackPackageHealthObserver to be the package that is failing when a rollback // is initiated. Empty if the package is unknown. optional string failing_package_name = 5; } /** Loading Loading @@ -3713,6 +3729,33 @@ message RoleRequestResultReported { optional Result result = 9; } /** * Logs when a Vehicle Maps Service client's connection state has changed * * Logged from: * packages/services/Car/service/src/com/android/car/stats/VmsClientLog.java */ message VmsClientConnectionStateChanged { // The UID of the VMS client app optional int32 uid = 1 [(is_uid) = true]; enum State { UNKNOWN = 0; // Attempting to connect to the client CONNECTING = 1; // Client connection established CONNECTED = 2; // Client connection closed unexpectedly DISCONNECTED = 3; // Client connection closed by VMS TERMINATED = 4; // Error establishing the client connection CONNECTION_ERROR = 5; } optional State state = 2; } ////////////////////////////////////////////////////////////////////// // Pulled atoms below this line // ////////////////////////////////////////////////////////////////////// Loading Loading @@ -4727,6 +4770,24 @@ message ProcStatsPkgProc { optional ProcessStatsSectionProto proc_stats_section = 1; } // Next Tag: 2 message PackageRemoteViewInfoProto { optional string package_name = 1; // add per-package additional info here (like channels) } // Next Tag: 2 message NotificationRemoteViewsProto { repeated PackageRemoteViewInfoProto package_remote_view_info = 1; } /** * Pulled from NotificationManagerService.java */ message NotificationRemoteViews { optional NotificationRemoteViewsProto notification_remote_views = 1; } message PowerProfileProto { optional double cpu_suspend = 1; Loading Loading @@ -6858,7 +6919,6 @@ message AppCompatibilityChangeReported { // Where it was logged from. optional Source source = 4; } /** Loading Loading @@ -6894,3 +6954,32 @@ message PerfettoUploaded { optional int64 trace_uuid_lsb = 2; optional int64 trace_uuid_msb = 3; } /** * Pulls client metrics on data transferred via Vehicle Maps Service. * Metrics are keyed by uid + layer. * * Pulled from: * packages/services/Car/service/src/com/android/car/stats/CarStatsService.java */ message VmsClientStats { // UID of the VMS client app optional int32 uid = 1 [(is_uid) = true]; // VMS layer definition optional int32 layer_type = 2; optional int32 layer_channel = 3; optional int32 layer_version = 4; // Bytes and packets sent by the client for the layer optional int64 tx_bytes = 5; optional int64 tx_packets = 6; // Bytes and packets received by the client for the layer optional int64 rx_bytes = 7; optional int64 rx_packets = 8; // Bytes and packets dropped due to client error optional int64 dropped_bytes = 9; optional int64 dropped_packets = 10; } Loading
api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -45633,6 +45633,7 @@ package android.telephony { field public static final int APPTYPE_USIM = 2; // 0x2 field public static final int AUTHTYPE_EAP_AKA = 129; // 0x81 field public static final int AUTHTYPE_EAP_SIM = 128; // 0x80 field public static final long CALLBACK_ON_MORE_ERROR_CODE_CHANGE = 130595455L; // 0x7c8ba7fL field public static final int CALL_STATE_IDLE = 0; // 0x0 field public static final int CALL_STATE_OFFHOOK = 2; // 0x2 field public static final int CALL_STATE_RINGING = 1; // 0x1
cmds/statsd/Android.bp +2 −0 Original line number Diff line number Diff line Loading @@ -50,6 +50,7 @@ cc_defaults { srcs: [ ":statsd_aidl", ":ICarStatsService.aidl", "src/active_config_list.proto", "src/statsd_config.proto", "src/uid_data.proto", Loading @@ -69,6 +70,7 @@ cc_defaults { "src/config/ConfigKey.cpp", "src/config/ConfigListener.cpp", "src/config/ConfigManager.cpp", "src/external/CarStatsPuller.cpp", "src/external/GpuStatsPuller.cpp", "src/external/Perfetto.cpp", "src/external/StatsPuller.cpp", Loading
cmds/statsd/src/StatsService.cpp +18 −5 Original line number Diff line number Diff line Loading @@ -266,7 +266,9 @@ status_t StatsService::onTransact(uint32_t code, const Parcel& data, Parcel* rep IResultReceiver::asInterface(data.readStrongBinder()); err = command(in, out, err, args, resultReceiver); if (resultReceiver != nullptr) { resultReceiver->send(err); } return NO_ERROR; } default: { return BnStatsManager::onTransact(code, data, reply, flags); } Loading Loading @@ -411,13 +413,20 @@ status_t StatsService::command(int in, int out, int err, Vector<String8>& args, return cmd_trigger_active_config_broadcast(out, args); } if (!args[0].compare(String8("data-subscribe"))) { { std::lock_guard<std::mutex> lock(mShellSubscriberMutex); if (mShellSubscriber == nullptr) { mShellSubscriber = new ShellSubscriber(mUidMap, mPullerManager); } } int timeoutSec = -1; if (argCount >= 2) { timeoutSec = atoi(args[1].c_str()); } if (resultReceiver == nullptr) { ALOGI("Null resultReceiver given, no subscription will be started"); return UNEXPECTED_NULL; } mShellSubscriber->startNewSubscription(in, out, resultReceiver, timeoutSec); return NO_ERROR; } Loading Loading @@ -1385,7 +1394,10 @@ Status StatsService::sendBinaryPushStateChangedAtom(const android::String16& tra Status StatsService::sendWatchdogRollbackOccurredAtom(const int32_t rollbackTypeIn, const android::String16& packageNameIn, const int64_t packageVersionCodeIn) { const int64_t packageVersionCodeIn, const int32_t rollbackReasonIn, const android::String16& failingPackageNameIn) { // Note: We skip the usage stats op check here since we do not have a package name. // This is ok since we are overloading the usage_stats permission. // This method only sends data, it does not receive it. Loading @@ -1407,7 +1419,8 @@ Status StatsService::sendWatchdogRollbackOccurredAtom(const int32_t rollbackType } android::util::stats_write(android::util::WATCHDOG_ROLLBACK_OCCURRED, rollbackTypeIn, String8(packageNameIn).string(), packageVersionCodeIn); rollbackTypeIn, String8(packageNameIn).string(), packageVersionCodeIn, rollbackReasonIn, String8(failingPackageNameIn).string()); // Fast return to save disk read. if (rollbackTypeIn != android::util::WATCHDOG_ROLLBACK_OCCURRED__ROLLBACK_TYPE__ROLLBACK_SUCCESS Loading
cmds/statsd/src/StatsService.h +7 −1 Original line number Diff line number Diff line Loading @@ -200,7 +200,9 @@ public: virtual Status sendWatchdogRollbackOccurredAtom( const int32_t rollbackTypeIn, const android::String16& packageNameIn, const int64_t packageVersionCodeIn) override; const int64_t packageVersionCodeIn, const int32_t rollbackReasonIn, const android::String16& failingPackageNameIn) override; /** * Binder call to get registered experiment IDs. Loading Loading @@ -432,6 +434,10 @@ private: sp<ShellSubscriber> mShellSubscriber; /** * Mutex for setting the shell subscriber */ mutable mutex mShellSubscriberMutex; std::shared_ptr<LogEventQueue> mEventQueue; FRIEND_TEST(StatsLogProcessorTest, TestActivationsPersistAcrossSystemServerRestart); Loading
cmds/statsd/src/atoms.proto +91 −2 Original line number Diff line number Diff line Loading @@ -326,10 +326,11 @@ message Atom { 228 [(allow_from_any_uid) = true]; PerfettoUploaded perfetto_uploaded = 229 [(log_from_module) = "perfetto"]; VmsClientConnectionStateChanged vms_client_connection_state_changed = 230; } // Pulled events will start at field 10000. // Next: 10062 // Next: 10067 oneof pulled { WifiBytesTransfer wifi_bytes_transfer = 10000; WifiBytesTransferByFgBg wifi_bytes_transfer_by_fg_bg = 10001; Loading Loading @@ -393,6 +394,8 @@ message Atom { CoolingDevice cooling_device = 10059; AppOps app_ops = 10060; ProcessSystemIonHeapSize process_system_ion_heap_size = 10061; VmsClientStats vms_client_stats = 10065; NotificationRemoteViews notification_remote_views = 10066; } // DO NOT USE field numbers above 100,000 in AOSP. Loading Loading @@ -1689,6 +1692,19 @@ message WatchdogRollbackOccurred { optional string package_name = 2; optional int32 package_version_code = 3; enum RollbackReasonType { REASON_UNKNOWN = 0; REASON_NATIVE_CRASH = 1; REASON_EXPLICIT_HEALTH_CHECK = 2; REASON_APP_CRASH = 3; REASON_APP_NOT_RESPONDING = 4; } optional RollbackReasonType rollback_reason = 4; // Set by RollbackPackageHealthObserver to be the package that is failing when a rollback // is initiated. Empty if the package is unknown. optional string failing_package_name = 5; } /** Loading Loading @@ -3713,6 +3729,33 @@ message RoleRequestResultReported { optional Result result = 9; } /** * Logs when a Vehicle Maps Service client's connection state has changed * * Logged from: * packages/services/Car/service/src/com/android/car/stats/VmsClientLog.java */ message VmsClientConnectionStateChanged { // The UID of the VMS client app optional int32 uid = 1 [(is_uid) = true]; enum State { UNKNOWN = 0; // Attempting to connect to the client CONNECTING = 1; // Client connection established CONNECTED = 2; // Client connection closed unexpectedly DISCONNECTED = 3; // Client connection closed by VMS TERMINATED = 4; // Error establishing the client connection CONNECTION_ERROR = 5; } optional State state = 2; } ////////////////////////////////////////////////////////////////////// // Pulled atoms below this line // ////////////////////////////////////////////////////////////////////// Loading Loading @@ -4727,6 +4770,24 @@ message ProcStatsPkgProc { optional ProcessStatsSectionProto proc_stats_section = 1; } // Next Tag: 2 message PackageRemoteViewInfoProto { optional string package_name = 1; // add per-package additional info here (like channels) } // Next Tag: 2 message NotificationRemoteViewsProto { repeated PackageRemoteViewInfoProto package_remote_view_info = 1; } /** * Pulled from NotificationManagerService.java */ message NotificationRemoteViews { optional NotificationRemoteViewsProto notification_remote_views = 1; } message PowerProfileProto { optional double cpu_suspend = 1; Loading Loading @@ -6858,7 +6919,6 @@ message AppCompatibilityChangeReported { // Where it was logged from. optional Source source = 4; } /** Loading Loading @@ -6894,3 +6954,32 @@ message PerfettoUploaded { optional int64 trace_uuid_lsb = 2; optional int64 trace_uuid_msb = 3; } /** * Pulls client metrics on data transferred via Vehicle Maps Service. * Metrics are keyed by uid + layer. * * Pulled from: * packages/services/Car/service/src/com/android/car/stats/CarStatsService.java */ message VmsClientStats { // UID of the VMS client app optional int32 uid = 1 [(is_uid) = true]; // VMS layer definition optional int32 layer_type = 2; optional int32 layer_channel = 3; optional int32 layer_version = 4; // Bytes and packets sent by the client for the layer optional int64 tx_bytes = 5; optional int64 tx_packets = 6; // Bytes and packets received by the client for the layer optional int64 rx_bytes = 7; optional int64 rx_packets = 8; // Bytes and packets dropped due to client error optional int64 dropped_bytes = 9; optional int64 dropped_packets = 10; }