Skip to content
Snippets Groups Projects
Commit 2de8bb59 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 9950291 from 39228cfc to udc-release

Change-Id: I98b3b0eedec8213b9f0316735836379a29a3ad16
parents db501ded 39228cfc
No related branches found
No related tags found
No related merge requests found
Showing
with 2043 additions and 0 deletions
// This is auto-generated. DO NOT EDIT.
// blueprint rules added by vendor/google/build/mainline_modules_sdks.py
// to support coexistence.
blueprint_package_includes {
match_all: ["com.android.mainline"]
}
package {
// A default list here prevents the license LSC from adding its own list which would
// be unnecessary as every module in the sdk already has its own licenses property.
default_applicable_licenses: ["Android-Apache-2.0"],
}
prebuilt_bootclasspath_fragment {
name: "com.android.os.statsd-bootclasspath-fragment",
// Do not prefer prebuilt if the Soong config variable "module_build_from_source" in namespace "ANDROID" is true.
use_source_config_var: {
config_namespace: "ANDROID",
var_name: "module_build_from_source",
},
visibility: ["//visibility:public"],
apex_available: ["com.android.os.statsd"],
licenses: ["statsd-module-sdk_Android-Apache-2.0"],
contents: ["framework-statsd"],
fragments: [
{
apex: "com.android.art",
module: "art-bootclasspath-fragment",
},
],
hidden_api: {
max_target_o_low_priority: ["hiddenapi/hiddenapi-max-target-o-low-priority.txt"],
annotation_flags: "hiddenapi/annotation-flags.csv",
metadata: "hiddenapi/metadata.csv",
index: "hiddenapi/index.csv",
signature_patterns: "hiddenapi/signature-patterns.csv",
filtered_stub_flags: "hiddenapi/filtered-stub-flags.csv",
filtered_flags: "hiddenapi/filtered-flags.csv",
},
}
java_sdk_library_import {
name: "framework-statsd",
// Do not prefer prebuilt if the Soong config variable "module_build_from_source" in namespace "ANDROID" is true.
use_source_config_var: {
config_namespace: "ANDROID",
var_name: "module_build_from_source",
},
visibility: ["//visibility:public"],
apex_available: [
"com.android.os.statsd",
"test_com.android.os.statsd",
],
licenses: ["statsd-module-sdk_Android-Apache-2.0"],
shared_library: false,
permitted_packages: [
"android.app",
"android.os",
"android.util",
"com.android.internal.statsd",
],
public: {
jars: ["sdk_library/public/framework-statsd-stubs.jar"],
stub_srcs: ["sdk_library/public/framework-statsd.srcjar"],
current_api: "sdk_library/public/framework-statsd.txt",
removed_api: "sdk_library/public/framework-statsd-removed.txt",
annotations: "sdk_library/public/framework-statsd_annotations.zip",
sdk_version: "module_current",
},
system: {
jars: ["sdk_library/system/framework-statsd-stubs.jar"],
stub_srcs: ["sdk_library/system/framework-statsd.srcjar"],
current_api: "sdk_library/system/framework-statsd.txt",
removed_api: "sdk_library/system/framework-statsd-removed.txt",
annotations: "sdk_library/system/framework-statsd_annotations.zip",
sdk_version: "module_current",
},
module_lib: {
jars: ["sdk_library/module-lib/framework-statsd-stubs.jar"],
stub_srcs: ["sdk_library/module-lib/framework-statsd.srcjar"],
current_api: "sdk_library/module-lib/framework-statsd.txt",
removed_api: "sdk_library/module-lib/framework-statsd-removed.txt",
annotations: "sdk_library/module-lib/framework-statsd_annotations.zip",
sdk_version: "module_current",
},
}
java_import {
name: "service-statsd",
// Do not prefer prebuilt if the Soong config variable "module_build_from_source" in namespace "ANDROID" is true.
use_source_config_var: {
config_namespace: "ANDROID",
var_name: "module_build_from_source",
},
visibility: ["//visibility:public"],
apex_available: [
"com.android.os.statsd",
"test_com.android.os.statsd",
],
licenses: ["statsd-module-sdk_Android-Apache-2.0"],
jars: ["java_systemserver_libs/snapshot/jars/are/invalid/service-statsd.jar"],
min_sdk_version: "30",
}
license {
name: "statsd-module-sdk_Android-Apache-2.0",
visibility: ["//visibility:private"],
license_kinds: ["SPDX-license-identifier-Apache-2.0"],
license_text: ["licenses/build/soong/licenses/LICENSE"],
}
cc_prebuilt_library_shared {
name: "libstatspull",
// Do not prefer prebuilt if the Soong config variable "module_build_from_source" in namespace "ANDROID" is true.
use_source_config_var: {
config_namespace: "ANDROID",
var_name: "module_build_from_source",
},
visibility: ["//visibility:public"],
apex_available: [
"com.android.os.statsd",
"test_com.android.os.statsd",
],
licenses: ["statsd-module-sdk_Android-Apache-2.0"],
stl: "libc++_static",
compile_multilib: "both",
export_include_dirs: ["include/packages/modules/StatsD/lib/libstatspull/include"],
stubs: {
versions: [
"30",
"current",
],
},
arch: {
arm64: {
srcs: ["arm64/lib/libstatspull.so"],
},
x86_64: {
srcs: ["x86_64/lib/libstatspull.so"],
},
arm: {
srcs: ["arm/lib/libstatspull.so"],
},
x86: {
srcs: ["x86/lib/libstatspull.so"],
},
},
}
cc_prebuilt_library_shared {
name: "libstatssocket",
// Do not prefer prebuilt if the Soong config variable "module_build_from_source" in namespace "ANDROID" is true.
use_source_config_var: {
config_namespace: "ANDROID",
var_name: "module_build_from_source",
},
visibility: ["//visibility:public"],
apex_available: [
"com.android.os.statsd",
"test_com.android.os.statsd",
],
licenses: ["statsd-module-sdk_Android-Apache-2.0"],
stl: "libc++_static",
compile_multilib: "both",
export_include_dirs: ["include/packages/modules/StatsD/lib/libstatssocket/include"],
stubs: {
versions: [
"30",
"current",
],
},
arch: {
arm64: {
srcs: ["arm64/lib/libstatssocket.so"],
},
x86_64: {
srcs: ["x86_64/lib/libstatssocket.so"],
},
arm: {
srcs: ["arm/lib/libstatssocket.so"],
},
x86: {
srcs: ["x86/lib/libstatssocket.so"],
},
},
}
prebuilt_systemserverclasspath_fragment {
name: "com.android.os.statsd-systemserverclasspath-fragment",
// Do not prefer prebuilt if the Soong config variable "module_build_from_source" in namespace "ANDROID" is true.
use_source_config_var: {
config_namespace: "ANDROID",
var_name: "module_build_from_source",
},
visibility: ["//visibility:public"],
apex_available: ["com.android.os.statsd"],
licenses: ["statsd-module-sdk_Android-Apache-2.0"],
standalone_contents: ["service-statsd"],
}
File added
File added
File added
File added
This diff is collapsed.
Landroid/app/StatsCursor;->getColumnNames()[Ljava/lang/String;,public-api,system-api,test-api
Landroid/app/StatsCursor;->getCount()I,public-api,system-api,test-api
Landroid/app/StatsCursor;->getDouble(I)D,public-api,system-api,test-api
Landroid/app/StatsCursor;->getFloat(I)F,public-api,system-api,test-api
Landroid/app/StatsCursor;->getInt(I)I,public-api,system-api,test-api
Landroid/app/StatsCursor;->getLong(I)J,public-api,system-api,test-api
Landroid/app/StatsCursor;->getShort(I)S,public-api,system-api,test-api
Landroid/app/StatsCursor;->getString(I)Ljava/lang/String;,public-api,system-api,test-api
Landroid/app/StatsCursor;->getType(I)I,public-api,system-api,test-api
Landroid/app/StatsCursor;->isNull(I)Z,public-api,system-api,test-api
Landroid/app/StatsCursor;->onMove(II)Z,public-api,system-api,test-api
Landroid/app/StatsManager$$ExternalSyntheticLambda0;->run()V,core-platform-api,public-api,system-api,test-api
Landroid/app/StatsManager$PullAtomCallbackInternal$$ExternalSyntheticLambda0;->run()V,core-platform-api,public-api,system-api,test-api
Landroid/app/StatsManager$PullAtomMetadata$Builder;-><init>()V,system-api,test-api
Landroid/app/StatsManager$PullAtomMetadata$Builder;->build()Landroid/app/StatsManager$PullAtomMetadata;,system-api,test-api
Landroid/app/StatsManager$PullAtomMetadata$Builder;->setAdditiveFields([I)Landroid/app/StatsManager$PullAtomMetadata$Builder;,system-api,test-api
Landroid/app/StatsManager$PullAtomMetadata$Builder;->setCoolDownMillis(J)Landroid/app/StatsManager$PullAtomMetadata$Builder;,system-api,test-api
Landroid/app/StatsManager$PullAtomMetadata$Builder;->setTimeoutMillis(J)Landroid/app/StatsManager$PullAtomMetadata$Builder;,system-api,test-api
Landroid/app/StatsManager$PullAtomMetadata;->getAdditiveFields()[I,system-api,test-api
Landroid/app/StatsManager$PullAtomMetadata;->getCoolDownMillis()J,system-api,test-api
Landroid/app/StatsManager$PullAtomMetadata;->getTimeoutMillis()J,system-api,test-api
Landroid/app/StatsManager$StatsPullAtomCallback;->onPullAtom(ILjava/util/List;)I,system-api,test-api
Landroid/app/StatsManager$StatsQueryCallbackInternal$$ExternalSyntheticLambda0;->run()V,core-platform-api,public-api,system-api,test-api
Landroid/app/StatsManager$StatsQueryCallbackInternal$$ExternalSyntheticLambda1;->run()V,core-platform-api,public-api,system-api,test-api
Landroid/app/StatsManager$StatsQueryException;-><init>(Ljava/lang/String;)V,system-api,test-api
Landroid/app/StatsManager$StatsQueryException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V,system-api,test-api
Landroid/app/StatsManager$StatsUnavailableException;-><init>(Ljava/lang/String;)V,system-api,test-api
Landroid/app/StatsManager$StatsUnavailableException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V,system-api,test-api
Landroid/app/StatsManager;->ACTION_STATSD_STARTED:Ljava/lang/String;,system-api,test-api
Landroid/app/StatsManager;->EXTRA_STATS_ACTIVE_CONFIG_KEYS:Ljava/lang/String;,system-api,test-api
Landroid/app/StatsManager;->EXTRA_STATS_BROADCAST_SUBSCRIBER_COOKIES:Ljava/lang/String;,system-api,test-api
Landroid/app/StatsManager;->EXTRA_STATS_CONFIG_KEY:Ljava/lang/String;,system-api,test-api
Landroid/app/StatsManager;->EXTRA_STATS_CONFIG_UID:Ljava/lang/String;,system-api,test-api
Landroid/app/StatsManager;->EXTRA_STATS_DIMENSIONS_VALUE:Ljava/lang/String;,system-api,test-api
Landroid/app/StatsManager;->EXTRA_STATS_RESTRICTED_METRIC_IDS:Ljava/lang/String;,system-api,test-api
Landroid/app/StatsManager;->EXTRA_STATS_SUBSCRIPTION_ID:Ljava/lang/String;,system-api,test-api
Landroid/app/StatsManager;->EXTRA_STATS_SUBSCRIPTION_RULE_ID:Ljava/lang/String;,system-api,test-api
Landroid/app/StatsManager;->PULL_SKIP:I,system-api,test-api
Landroid/app/StatsManager;->PULL_SUCCESS:I,system-api,test-api
Landroid/app/StatsManager;->addConfig(J[B)V,system-api,test-api
Landroid/app/StatsManager;->addConfiguration(J[B)Z,system-api,test-api
Landroid/app/StatsManager;->clearPullAtomCallback(I)V,system-api,test-api
Landroid/app/StatsManager;->getData(J)[B,system-api,test-api
Landroid/app/StatsManager;->getMetadata()[B,system-api,test-api
Landroid/app/StatsManager;->getRegisteredExperimentIds()[J,system-api,test-api
Landroid/app/StatsManager;->getReports(J)[B,system-api,test-api
Landroid/app/StatsManager;->getStatsMetadata()[B,system-api,test-api
Landroid/app/StatsManager;->query(JLjava/lang/String;Landroid/app/StatsQuery;Ljava/util/concurrent/Executor;Landroid/os/OutcomeReceiver;)V,system-api,test-api
Landroid/app/StatsManager;->removeConfig(J)V,system-api,test-api
Landroid/app/StatsManager;->removeConfiguration(J)Z,system-api,test-api
Landroid/app/StatsManager;->setActiveConfigsChangedOperation(Landroid/app/PendingIntent;)[J,system-api,test-api
Landroid/app/StatsManager;->setBroadcastSubscriber(JJLandroid/app/PendingIntent;)Z,system-api,test-api
Landroid/app/StatsManager;->setBroadcastSubscriber(Landroid/app/PendingIntent;JJ)V,system-api,test-api
Landroid/app/StatsManager;->setDataFetchOperation(JLandroid/app/PendingIntent;)Z,system-api,test-api
Landroid/app/StatsManager;->setFetchReportsOperation(Landroid/app/PendingIntent;J)V,system-api,test-api
Landroid/app/StatsManager;->setPullAtomCallback(ILandroid/app/StatsManager$PullAtomMetadata;Ljava/util/concurrent/Executor;Landroid/app/StatsManager$StatsPullAtomCallback;)V,system-api,test-api
Landroid/app/StatsManager;->setRestrictedMetricsChangedOperation(JLjava/lang/String;Landroid/app/PendingIntent;)[J,system-api,test-api
Landroid/app/StatsQuery$Builder;-><init>(Ljava/lang/String;)V,system-api,test-api
Landroid/app/StatsQuery$Builder;->build()Landroid/app/StatsQuery;,system-api,test-api
Landroid/app/StatsQuery$Builder;->setMinSqlClientVersion(I)Landroid/app/StatsQuery$Builder;,system-api,test-api
Landroid/app/StatsQuery$Builder;->setPolicyConfig([B)Landroid/app/StatsQuery$Builder;,system-api,test-api
Landroid/app/StatsQuery$Builder;->setSqlDialect(I)Landroid/app/StatsQuery$Builder;,system-api,test-api
Landroid/app/StatsQuery;->DIALECT_SQLITE:I,system-api,test-api
Landroid/app/StatsQuery;->DIALECT_UNKNOWN:I,system-api,test-api
Landroid/app/StatsQuery;->getMinSqlClientVersion()I,system-api,test-api
Landroid/app/StatsQuery;->getPolicyConfig()[B,system-api,test-api
Landroid/app/StatsQuery;->getRawSql()Ljava/lang/String;,system-api,test-api
Landroid/app/StatsQuery;->getSqlDialect()I,system-api,test-api
Landroid/os/IPendingIntentRef$Default;->asBinder()Landroid/os/IBinder;,public-api,system-api,test-api
Landroid/os/IPendingIntentRef$Stub$Proxy;->asBinder()Landroid/os/IBinder;,public-api,system-api,test-api
Landroid/os/IPendingIntentRef$Stub;->asBinder()Landroid/os/IBinder;,public-api,system-api,test-api
Landroid/os/IPendingIntentRef$Stub;->onTransact(ILandroid/os/Parcel;Landroid/os/Parcel;I)Z,public-api,system-api,test-api
Landroid/os/IPullAtomCallback$Default;->asBinder()Landroid/os/IBinder;,public-api,system-api,test-api
Landroid/os/IPullAtomCallback$Stub$Proxy;->asBinder()Landroid/os/IBinder;,public-api,system-api,test-api
Landroid/os/IPullAtomCallback$Stub;->asBinder()Landroid/os/IBinder;,public-api,system-api,test-api
Landroid/os/IPullAtomCallback$Stub;->onTransact(ILandroid/os/Parcel;Landroid/os/Parcel;I)Z,public-api,system-api,test-api
Landroid/os/IPullAtomResultReceiver$Default;->asBinder()Landroid/os/IBinder;,public-api,system-api,test-api
Landroid/os/IPullAtomResultReceiver$Stub$Proxy;->asBinder()Landroid/os/IBinder;,public-api,system-api,test-api
Landroid/os/IPullAtomResultReceiver$Stub;->asBinder()Landroid/os/IBinder;,public-api,system-api,test-api
Landroid/os/IPullAtomResultReceiver$Stub;->onTransact(ILandroid/os/Parcel;Landroid/os/Parcel;I)Z,public-api,system-api,test-api
Landroid/os/IStatsCompanionService$Default;->asBinder()Landroid/os/IBinder;,public-api,system-api,test-api
Landroid/os/IStatsCompanionService$Stub$Proxy;->asBinder()Landroid/os/IBinder;,public-api,system-api,test-api
Landroid/os/IStatsCompanionService$Stub;->asBinder()Landroid/os/IBinder;,public-api,system-api,test-api
Landroid/os/IStatsCompanionService$Stub;->onTransact(ILandroid/os/Parcel;Landroid/os/Parcel;I)Z,public-api,system-api,test-api
Landroid/os/IStatsManagerService$Default;->asBinder()Landroid/os/IBinder;,public-api,system-api,test-api
Landroid/os/IStatsManagerService$Stub$Proxy;->asBinder()Landroid/os/IBinder;,public-api,system-api,test-api
Landroid/os/IStatsManagerService$Stub;->asBinder()Landroid/os/IBinder;,public-api,system-api,test-api
Landroid/os/IStatsManagerService$Stub;->onTransact(ILandroid/os/Parcel;Landroid/os/Parcel;I)Z,public-api,system-api,test-api
Landroid/os/IStatsQueryCallback$Default;->asBinder()Landroid/os/IBinder;,public-api,system-api,test-api
Landroid/os/IStatsQueryCallback$Stub$Proxy;->asBinder()Landroid/os/IBinder;,public-api,system-api,test-api
Landroid/os/IStatsQueryCallback$Stub;->asBinder()Landroid/os/IBinder;,public-api,system-api,test-api
Landroid/os/IStatsQueryCallback$Stub;->onTransact(ILandroid/os/Parcel;Landroid/os/Parcel;I)Z,public-api,system-api,test-api
Landroid/os/IStatsSubscriptionCallback$Default;->asBinder()Landroid/os/IBinder;,public-api,system-api,test-api
Landroid/os/IStatsSubscriptionCallback$Stub$Proxy;->asBinder()Landroid/os/IBinder;,public-api,system-api,test-api
Landroid/os/IStatsSubscriptionCallback$Stub;->asBinder()Landroid/os/IBinder;,public-api,system-api,test-api
Landroid/os/IStatsSubscriptionCallback$Stub;->onTransact(ILandroid/os/Parcel;Landroid/os/Parcel;I)Z,public-api,system-api,test-api
Landroid/os/IStatsd$Default;->asBinder()Landroid/os/IBinder;,public-api,system-api,test-api
Landroid/os/IStatsd$Stub$Proxy;->asBinder()Landroid/os/IBinder;,public-api,system-api,test-api
Landroid/os/IStatsd$Stub;->asBinder()Landroid/os/IBinder;,public-api,system-api,test-api
Landroid/os/IStatsd$Stub;->onTransact(ILandroid/os/Parcel;Landroid/os/Parcel;I)Z,public-api,system-api,test-api
Landroid/os/StatsDimensionsValue$1;->createFromParcel(Landroid/os/Parcel;)Ljava/lang/Object;,public-api,system-api,test-api
Landroid/os/StatsDimensionsValue$1;->newArray(I)[Ljava/lang/Object;,public-api,system-api,test-api
Landroid/os/StatsDimensionsValue;->BOOLEAN_VALUE_TYPE:I,system-api,test-api
Landroid/os/StatsDimensionsValue;->CREATOR:Landroid/os/Parcelable$Creator;,system-api,test-api
Landroid/os/StatsDimensionsValue;->FLOAT_VALUE_TYPE:I,system-api,test-api
Landroid/os/StatsDimensionsValue;->INT_VALUE_TYPE:I,system-api,test-api
Landroid/os/StatsDimensionsValue;->LONG_VALUE_TYPE:I,system-api,test-api
Landroid/os/StatsDimensionsValue;->STRING_VALUE_TYPE:I,system-api,test-api
Landroid/os/StatsDimensionsValue;->TUPLE_VALUE_TYPE:I,system-api,test-api
Landroid/os/StatsDimensionsValue;->describeContents()I,public-api,system-api,test-api
Landroid/os/StatsDimensionsValue;->getBooleanValue()Z,system-api,test-api
Landroid/os/StatsDimensionsValue;->getField()I,system-api,test-api
Landroid/os/StatsDimensionsValue;->getFloatValue()F,system-api,test-api
Landroid/os/StatsDimensionsValue;->getIntValue()I,system-api,test-api
Landroid/os/StatsDimensionsValue;->getLongValue()J,system-api,test-api
Landroid/os/StatsDimensionsValue;->getStringValue()Ljava/lang/String;,system-api,test-api
Landroid/os/StatsDimensionsValue;->getTupleValueList()Ljava/util/List;,system-api,test-api
Landroid/os/StatsDimensionsValue;->getValueType()I,system-api,test-api
Landroid/os/StatsDimensionsValue;->isValueType(I)Z,system-api,test-api
Landroid/os/StatsDimensionsValue;->toString()Ljava/lang/String;,core-platform-api,public-api,system-api,test-api
Landroid/os/StatsDimensionsValue;->writeToParcel(Landroid/os/Parcel;I)V,public-api,system-api,test-api
Landroid/os/StatsDimensionsValueParcel$1;->createFromParcel(Landroid/os/Parcel;)Ljava/lang/Object;,public-api,system-api,test-api
Landroid/os/StatsDimensionsValueParcel$1;->newArray(I)[Ljava/lang/Object;,public-api,system-api,test-api
Landroid/os/StatsDimensionsValueParcel;->describeContents()I,public-api,system-api,test-api
Landroid/os/StatsDimensionsValueParcel;->writeToParcel(Landroid/os/Parcel;I)V,public-api,system-api,test-api
Landroid/os/StatsFrameworkInitializer$$ExternalSyntheticLambda0;->createService(Landroid/content/Context;)Ljava/lang/Object;,system-api,test-api
Landroid/util/PropertyParcel$1;->createFromParcel(Landroid/os/Parcel;)Ljava/lang/Object;,public-api,system-api,test-api
Landroid/util/PropertyParcel$1;->newArray(I)[Ljava/lang/Object;,public-api,system-api,test-api
Landroid/util/PropertyParcel;->describeContents()I,public-api,system-api,test-api
Landroid/util/PropertyParcel;->writeToParcel(Landroid/os/Parcel;I)V,public-api,system-api,test-api
Landroid/util/StatsEvent$Builder;->addBooleanAnnotation(BZ)Landroid/util/StatsEvent$Builder;,system-api,test-api
Landroid/util/StatsEvent$Builder;->addIntAnnotation(BI)Landroid/util/StatsEvent$Builder;,system-api,test-api
Landroid/util/StatsEvent$Builder;->build()Landroid/util/StatsEvent;,system-api,test-api
Landroid/util/StatsEvent$Builder;->setAtomId(I)Landroid/util/StatsEvent$Builder;,system-api,test-api
Landroid/util/StatsEvent$Builder;->usePooledBuffer()Landroid/util/StatsEvent$Builder;,system-api,test-api
Landroid/util/StatsEvent$Builder;->writeAttributionChain([I[Ljava/lang/String;)Landroid/util/StatsEvent$Builder;,system-api,test-api
Landroid/util/StatsEvent$Builder;->writeBoolean(Z)Landroid/util/StatsEvent$Builder;,system-api,test-api
Landroid/util/StatsEvent$Builder;->writeBooleanArray([Z)Landroid/util/StatsEvent$Builder;,system-api,test-api
Landroid/util/StatsEvent$Builder;->writeByteArray([B)Landroid/util/StatsEvent$Builder;,system-api,test-api
Landroid/util/StatsEvent$Builder;->writeFloat(F)Landroid/util/StatsEvent$Builder;,system-api,test-api
Landroid/util/StatsEvent$Builder;->writeFloatArray([F)Landroid/util/StatsEvent$Builder;,system-api,test-api
Landroid/util/StatsEvent$Builder;->writeInt(I)Landroid/util/StatsEvent$Builder;,system-api,test-api
Landroid/util/StatsEvent$Builder;->writeIntArray([I)Landroid/util/StatsEvent$Builder;,system-api,test-api
Landroid/util/StatsEvent$Builder;->writeKeyValuePairs(Landroid/util/SparseIntArray;Landroid/util/SparseLongArray;Landroid/util/SparseArray;Landroid/util/SparseArray;)Landroid/util/StatsEvent$Builder;,system-api,test-api
Landroid/util/StatsEvent$Builder;->writeLong(J)Landroid/util/StatsEvent$Builder;,system-api,test-api
Landroid/util/StatsEvent$Builder;->writeLongArray([J)Landroid/util/StatsEvent$Builder;,system-api,test-api
Landroid/util/StatsEvent$Builder;->writeString(Ljava/lang/String;)Landroid/util/StatsEvent$Builder;,system-api,test-api
Landroid/util/StatsEvent$Builder;->writeStringArray([Ljava/lang/String;)Landroid/util/StatsEvent$Builder;,system-api,test-api
Landroid/util/StatsEvent;->newBuilder()Landroid/util/StatsEvent$Builder;,system-api,test-api
Landroid/util/StatsEventParcel$1;->createFromParcel(Landroid/os/Parcel;)Ljava/lang/Object;,public-api,system-api,test-api
Landroid/util/StatsEventParcel$1;->newArray(I)[Ljava/lang/Object;,public-api,system-api,test-api
Landroid/util/StatsEventParcel;->describeContents()I,public-api,system-api,test-api
Landroid/util/StatsEventParcel;->writeToParcel(Landroid/os/Parcel;I)V,public-api,system-api,test-api
Landroid/util/StatsLog;->ANNOTATION_ID_DEFAULT_STATE:B,system-api,test-api
Landroid/util/StatsLog;->ANNOTATION_ID_EXCLUSIVE_STATE:B,system-api,test-api
Landroid/util/StatsLog;->ANNOTATION_ID_FIELD_RESTRICTION_ACCESSIBILITY:B,system-api,test-api
Landroid/util/StatsLog;->ANNOTATION_ID_FIELD_RESTRICTION_AMBIENT_SENSING:B,system-api,test-api
Landroid/util/StatsLog;->ANNOTATION_ID_FIELD_RESTRICTION_APP_ACTIVITY:B,system-api,test-api
Landroid/util/StatsLog;->ANNOTATION_ID_FIELD_RESTRICTION_APP_USAGE:B,system-api,test-api
Landroid/util/StatsLog;->ANNOTATION_ID_FIELD_RESTRICTION_DEMOGRAPHIC_CLASSIFICATION:B,system-api,test-api
Landroid/util/StatsLog;->ANNOTATION_ID_FIELD_RESTRICTION_HEALTH_CONNECT:B,system-api,test-api
Landroid/util/StatsLog;->ANNOTATION_ID_FIELD_RESTRICTION_PERIPHERAL_DEVICE_INFO:B,system-api,test-api
Landroid/util/StatsLog;->ANNOTATION_ID_FIELD_RESTRICTION_SYSTEM_SEARCH:B,system-api,test-api
Landroid/util/StatsLog;->ANNOTATION_ID_FIELD_RESTRICTION_USER_ENGAGEMENT:B,system-api,test-api
Landroid/util/StatsLog;->ANNOTATION_ID_IS_UID:B,system-api,test-api
Landroid/util/StatsLog;->ANNOTATION_ID_PRIMARY_FIELD:B,system-api,test-api
Landroid/util/StatsLog;->ANNOTATION_ID_PRIMARY_FIELD_FIRST_UID:B,system-api,test-api
Landroid/util/StatsLog;->ANNOTATION_ID_RESTRICTION_CATEGORY:B,system-api,test-api
Landroid/util/StatsLog;->ANNOTATION_ID_STATE_NESTED:B,system-api,test-api
Landroid/util/StatsLog;->ANNOTATION_ID_TRIGGER_STATE_RESET:B,system-api,test-api
Landroid/util/StatsLog;->ANNOTATION_ID_TRUNCATE_TIMESTAMP:B,system-api,test-api
Landroid/util/StatsLog;->RESTRICTION_CATEGORY_AUTHENTICATION:I,system-api,test-api
Landroid/util/StatsLog;->RESTRICTION_CATEGORY_DIAGNOSTIC:I,system-api,test-api
Landroid/util/StatsLog;->RESTRICTION_CATEGORY_FRAUD_AND_ABUSE:I,system-api,test-api
Landroid/util/StatsLog;->RESTRICTION_CATEGORY_SYSTEM_INTELLIGENCE:I,system-api,test-api
Landroid/util/StatsLog;->logBinaryPushStateChanged(Ljava/lang/String;JII[J)Z,public-api,system-api,test-api
Landroid/util/StatsLog;->logEvent(I)Z,public-api,system-api,test-api
Landroid/util/StatsLog;->logStart(I)Z,public-api,system-api,test-api
Landroid/util/StatsLog;->logStop(I)Z,public-api,system-api,test-api
Landroid/util/StatsLog;->write(Landroid/util/StatsEvent;)V,system-api,test-api
Landroid/util/StatsLog;->writeRaw([BI)V,system-api,test-api
This diff is collapsed.
android/app/StatsCursor
android/app/StatsManager
android/app/StatsQuery
android/os/IPendingIntentRef
android/os/IPullAtomCallback
android/os/IPullAtomResultReceiver
android/os/IStatsCompanionService
android/os/IStatsManagerService
android/os/IStatsQueryCallback
android/os/IStatsSubscriptionCallback
android/os/IStatsd
android/os/StatsDimensionsValue
android/os/StatsDimensionsValueParcel
android/os/StatsFrameworkInitializer
android/os/StatsSubscriptionCallbackReason
android/util/PropertyParcel
android/util/StatsEvent
android/util/StatsEventParcel
android/util/StatsLog
com/android/internal/statsd/**
/*
* Copyright (C) 2019, 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.
*/
#pragma once
#include <stats_event.h>
#include <stdbool.h>
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
/**
* Opaque struct representing the metadata for registering an AStatsManager_PullAtomCallback.
*/
struct AStatsManager_PullAtomMetadata;
typedef struct AStatsManager_PullAtomMetadata AStatsManager_PullAtomMetadata;
/**
* Allocate and initialize new PullAtomMetadata.
*
* Must call AStatsManager_PullAtomMetadata_release to free the memory.
*/
AStatsManager_PullAtomMetadata* AStatsManager_PullAtomMetadata_obtain();
/**
* Frees the memory held by this PullAtomMetadata
*
* After calling this, the PullAtomMetadata must not be used or modified in any way.
*/
void AStatsManager_PullAtomMetadata_release(AStatsManager_PullAtomMetadata* metadata);
/**
* Set the cool down time of the pull in milliseconds. If two successive pulls are issued
* within the cool down, a cached version of the first will be used for the second. The minimum
* allowed cool down is one second.
*/
void AStatsManager_PullAtomMetadata_setCoolDownMillis(AStatsManager_PullAtomMetadata* metadata,
int64_t cool_down_millis);
/**
* Get the cool down time of the pull in milliseconds.
*/
int64_t AStatsManager_PullAtomMetadata_getCoolDownMillis(AStatsManager_PullAtomMetadata* metadata);
/**
* Set the maximum time the pull can take in milliseconds.
* The maximum allowed timeout is 10 seconds.
*/
void AStatsManager_PullAtomMetadata_setTimeoutMillis(AStatsManager_PullAtomMetadata* metadata,
int64_t timeout_millis);
/**
* Get the maximum time the pull can take in milliseconds.
*/
int64_t AStatsManager_PullAtomMetadata_getTimeoutMillis(AStatsManager_PullAtomMetadata* metadata);
/**
* Set the additive fields of this pulled atom.
*
* This is only applicable for atoms which have a uid field. When tasks are run in
* isolated processes, the data will be attributed to the host uid. Additive fields
* will be combined when the non-additive fields are the same.
*/
void AStatsManager_PullAtomMetadata_setAdditiveFields(AStatsManager_PullAtomMetadata* metadata,
int32_t* additive_fields, int32_t num_fields);
/**
* Get the number of additive fields for this pulled atom. This is intended to be called before
* AStatsManager_PullAtomMetadata_getAdditiveFields to determine the size of the array.
*/
int32_t AStatsManager_PullAtomMetadata_getNumAdditiveFields(
AStatsManager_PullAtomMetadata* metadata);
/**
* Get the additive fields of this pulled atom.
*
* \param fields an output parameter containing the additive fields for this PullAtomMetadata.
* Fields is an array and it is assumed that it is at least as large as the number of
* additive fields, which can be obtained by calling
* AStatsManager_PullAtomMetadata_getNumAdditiveFields.
*/
void AStatsManager_PullAtomMetadata_getAdditiveFields(AStatsManager_PullAtomMetadata* metadata,
int32_t* fields);
/**
* Return codes for the result of a pull.
*/
typedef int32_t AStatsManager_PullAtomCallbackReturn;
enum {
// Value indicating that this pull was successful and that the result should be used.
AStatsManager_PULL_SUCCESS = 0,
// Value indicating that this pull was unsuccessful and that the result should not be used.
AStatsManager_PULL_SKIP = 1,
};
/**
* Opaque struct representing a list of AStatsEvent objects.
*/
struct AStatsEventList;
typedef struct AStatsEventList AStatsEventList;
/**
* Appends and returns an AStatsEvent to the end of the AStatsEventList.
*
* If an AStatsEvent is obtained in this manner, the memory is internally managed and
* AStatsEvent_release does not need to be called. The lifetime of the AStatsEvent is that of the
* AStatsEventList.
*
* The AStatsEvent does still need to be built by calling AStatsEvent_build.
*/
AStatsEvent* AStatsEventList_addStatsEvent(AStatsEventList* pull_data);
/**
* Callback interface for pulling atoms requested by the stats service.
*
* \param atom_tag the tag of the atom to pull.
* \param data an output parameter in which the caller should fill the results of the pull. This
* param cannot be NULL and it's lifetime is as long as the execution of the callback.
* It must not be accessed or modified after returning from the callback.
* \param cookie the opaque pointer passed in AStatsManager_registerPullAtomCallback.
* \return AStatsManager_PULL_SUCCESS if the pull was successful, or AStatsManager_PULL_SKIP if not.
*/
typedef AStatsManager_PullAtomCallbackReturn (*AStatsManager_PullAtomCallback)(
int32_t atom_tag, AStatsEventList* data, void* cookie);
/**
* Sets a callback for an atom when that atom is to be pulled. The stats service will
* invoke the callback when the stats service determines that this atom needs to be
* pulled.
*
* Requires the REGISTER_STATS_PULL_ATOM permission.
*
* \param atom_tag The tag of the atom for this pull atom callback.
* \param metadata Optional metadata specifying the timeout, cool down time, and
* additive fields for mapping isolated to host uids.
* This param is nullable, in which case defaults will be used.
* \param callback The callback to be invoked when the stats service pulls the atom.
* \param cookie A pointer that will be passed back to the callback.
* It has no meaning to statsd.
*/
void AStatsManager_setPullAtomCallback(int32_t atom_tag, AStatsManager_PullAtomMetadata* metadata,
AStatsManager_PullAtomCallback callback, void* cookie);
/**
* Clears a callback for an atom when that atom is to be pulled. Note that any ongoing
* pulls will still occur.
*
* Requires the REGISTER_STATS_PULL_ATOM permission.
*
* \param atomTag The tag of the atom of which to unregister
*/
void AStatsManager_clearPullAtomCallback(int32_t atom_tag);
#ifdef __cplusplus
}
#endif
/*
* 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.
*/
#pragma once
#include <stdint.h>
#include <sys/cdefs.h>
#ifndef __STATSD_SUBS_MIN_API__
// TODO(b/274054228): Change this to __ANDROID_API_U__ once U is finalized.
#define __STATSD_SUBS_MIN_API__ __ANDROID_API_FUTURE__
#endif
__BEGIN_DECLS
/**
* Reason codes for why subscription callback was triggered.
*/
typedef enum AStatsManager_SubscriptionCallbackReason : uint32_t {
/**
* SubscriptionCallbackReason constant for subscription data transfer initiated by stats
* service.
*
* Introduced in API 34.
*/
ASTATSMANAGER_SUBSCRIPTION_CALLBACK_REASON_STATSD_INITIATED = 1,
/**
* SubscriptionCallbackReason constant for subscriber requesting flush of pending data.
*
* Introduced in API 34.
*/
ASTATSMANAGER_SUBSCRIPTION_CALLBACK_REASON_FLUSH_REQUESTED = 2,
/**
* SubscriptionCallbackReason constant for final stream of data for a subscription.
*
* Introduced in API 34.
*/
ASTATSMANAGER_SUBSCRIPTION_CALLBACK_REASON_SUBSCRIPTION_ENDED = 3,
} AStatsManager_SubscriptionCallbackReason;
/**
* Callback interface for receiving subscription data by the stats service.
*
* This will be called on an arbitrary binder thread. There is a pool of such threads and there is a
* no guarantee a single thread will be used even for the same subscription. Clients must ensure it
* is safe to call callback from arbitrary threads.
*
* \param subscription_id the subscription id for which the callback is triggered.
* \param reason code for why the callback is triggered.
* \param payload encoded SubscriptionResults proto containing subscription data.
* Cannot be null.
* \param num_bytes size in bytes of the payload.
* \param cookie the opaque pointer passed in AStatsManager_addSubscription. Can be null.
*
* Introduced in API 34.
*/
typedef void (*AStatsManager_SubscriptionCallback)(int32_t subscription_id,
AStatsManager_SubscriptionCallbackReason reason,
uint8_t* _Nonnull payload, size_t num_bytes,
void* _Nullable cookie);
/**
* Adds a new subscription.
*
* Requires the READ_LOGS permission and is only available to AID_NOBODY.
*
* \param subscription_config encoded ShellSubscription proto containing parameters for a new
* subscription. Cannot be null.
* \param num_bytes size in bytes of the subscription_config.
* \param callback function called to deliver subscription data back to the subscriber. Each
* callback can be used for more than one subscription. Cannot be null.
* \param cookie opaque pointer to associate with the subscription. The provided callback will be
* invoked with this cookie as an argument when delivering data for this subscription. Can be
* null.
* \return subscription ID for the new subscription. Subscription ID is a positive integer. A
* negative value indicates an error.
*
* Introduced in API 34.
*/
int32_t AStatsManager_addSubscription(const uint8_t* _Nonnull subscription_config, size_t num_bytes,
const AStatsManager_SubscriptionCallback _Nonnull callback,
void* _Nullable cookie)
__INTRODUCED_IN(__STATSD_SUBS_MIN_API__);
/**
* Removes an existing subscription.
* This will trigger a flush of the remaining subscription data through
* AStatsManager_SubscriptionCallback with the reason as
* ASTATSMANAGER_SUBSCRIPTION_CALLBACK_REASON_SUBSCRIPTION_ENDED.
*
* Requires the READ_LOGS permission and is only available to AID_NOBODY.
*
* \param subscription_id subscription id of the subscription to terminate.
*
* Introduced in API 34.
*/
void AStatsManager_removeSubscription(int32_t subscription_id)
__INTRODUCED_IN(__STATSD_SUBS_MIN_API__);
/**
* Request stats service to flush a subscription.
* This will trigger AStatsManager_SubscriptionCallback with the reason as
* ASTATSMANAGER_SUBSCRIPTION_CALLBACK_REASON_FLUSH_REQUESTED.
*
* Requires the READ_LOGS permission and is only available to AID_NOBODY.
*
* \param subscription_id ID of the subscription to be flushed.
*
* Introduced in API 34.
*/
void AStatsManager_flushSubscription(int32_t subscription_id)
__INTRODUCED_IN(__STATSD_SUBS_MIN_API__);
__END_DECLS
/*
* Copyright (C) 2020 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.
*/
#pragma once
#include <stddef.h>
#include <stdint.h>
#include <sys/cdefs.h>
__BEGIN_DECLS
enum AnnotationIds : uint8_t {
/**
* Annotation ID constant for logging UID field.
*
* Introduced in API 31.
*/
ASTATSLOG_ANNOTATION_ID_IS_UID = 1,
/**
* Annotation ID constant to indicate logged atom event's timestamp should be truncated.
*
* Introduced in API 31.
*/
ASTATSLOG_ANNOTATION_ID_TRUNCATE_TIMESTAMP = 2,
/**
* Annotation ID constant for a state atom's primary field.
*
* Introduced in API 31.
*/
ASTATSLOG_ANNOTATION_ID_PRIMARY_FIELD = 3,
/**
* Annotation ID constant for state atom's state field.
*
* Introduced in API 31.
*/
ASTATSLOG_ANNOTATION_ID_EXCLUSIVE_STATE = 4,
/**
* Annotation ID constant to indicate the first UID in the attribution chain
* is a primary field.
*
* Introduced in API 31.
*/
ASTATSLOG_ANNOTATION_ID_PRIMARY_FIELD_FIRST_UID = 5,
/**
* Annotation ID constant to indicate which state is default for the state atom.
*
* Introduced in API 31.
*/
ASTATSLOG_ANNOTATION_ID_DEFAULT_STATE = 6,
/**
* Annotation ID constant to signal that all states should be reset to the default state.
*
* Introduced in API 31.
*/
ASTATSLOG_ANNOTATION_ID_TRIGGER_STATE_RESET = 7,
/**
* Annotation ID constant to indicate state changes need to account for nesting.
* This should only be used with binary state atoms.
*
* Introduced in API 31.
*/
ASTATSLOG_ANNOTATION_ID_STATE_NESTED = 8,
/**
* Annotation ID constant to indicate the restriction category of an atom.
* This annotation must only be attached to the atom id. This is an int annotation.
*
* Introduced in API 34.
*/
ASTATSLOG_ANNOTATION_ID_RESTRICTION_CATEGORY = 9,
/**
* Annotation ID to indicate that a field of an atom contains peripheral device info.
* This is a bool annotation.
*
* Introduced in API 34.
*/
ASTATSLOG_ANNOTATION_ID_FIELD_RESTRICTION_PERIPHERAL_DEVICE_INFO = 10,
/**
* Annotation ID to indicate that a field of an atom contains app usage information.
* This is a bool annotation.
*
* Introduced in API 34.
*/
ASTATSLOG_ANNOTATION_ID_FIELD_RESTRICTION_APP_USAGE = 11,
/**
* Annotation ID to indicate that a field of an atom contains app activity information.
* This is a bool annotation.
*
* Introduced in API 34.
*/
ASTATSLOG_ANNOTATION_ID_FIELD_RESTRICTION_APP_ACTIVITY = 12,
/**
* Annotation ID to indicate that a field of an atom contains health connect information.
* This is a bool annotation.
*
* Introduced in API 34.
*/
ASTATSLOG_ANNOTATION_ID_FIELD_RESTRICTION_HEALTH_CONNECT = 13,
/**
* Annotation ID to indicate that a field of an atom contains accessibility information.
* This is a bool annotation.
*
* Introduced in API 34.
*/
ASTATSLOG_ANNOTATION_ID_FIELD_RESTRICTION_ACCESSIBILITY = 14,
/**
* Annotation ID to indicate that a field of an atom contains system search information.
* This is a bool annotation.
*
* Introduced in API 34.
*/
ASTATSLOG_ANNOTATION_ID_FIELD_RESTRICTION_SYSTEM_SEARCH = 15,
/**
* Annotation ID to indicate that a field of an atom contains user engagement information.
* This is a bool annotation.
*
* Introduced in API 34.
*/
ASTATSLOG_ANNOTATION_ID_FIELD_RESTRICTION_USER_ENGAGEMENT = 16,
/**
* Annotation ID to indicate that a field of an atom contains ambient sensing information.
* This is a bool annotation.
*
* Introduced in API 34.
*/
ASTATSLOG_ANNOTATION_ID_FIELD_RESTRICTION_AMBIENT_SENSING = 17,
/**
* Annotation ID to indicate that a field of an atom contains demographic classification
* information. This is a bool annotation.
*
* Introduced in API 34.
*/
ASTATSLOG_ANNOTATION_ID_FIELD_RESTRICTION_DEMOGRAPHIC_CLASSIFICATION = 18,
};
enum AStatsLogRestrictionCategory : uint32_t {
/**
* Restriction category for atoms about diagnostics.
*
* Introduced in API 34.
*/
ASTATSLOG_RESTRICTION_CATEGORY_DIAGNOSTIC = 1,
/**
* Restriction category for atoms about system intelligence.
*
* Introduced in API 34.
*/
ASTATSLOG_RESTRICTION_CATEGORY_SYSTEM_INTELLIGENCE = 2,
/**
* Restriction category for atoms about authentication.
*
* Introduced in API 34.
*/
ASTATSLOG_RESTRICTION_CATEGORY_AUTHENTICATION = 3,
/**
* Restriction category for atoms about fraud and abuse.
*
* Introduced in API 34.
*/
ASTATSLOG_RESTRICTION_CATEGORY_FRAUD_AND_ABUSE = 4,
};
__END_DECLS
/*
* Copyright (C) 2019 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.
*/
#pragma once
#include <stddef.h>
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif // __CPLUSPLUS
void stats_log_close();
int stats_log_is_closed();
int write_buffer_to_statsd(void* buffer, size_t size, uint32_t atomId);
#ifdef __cplusplus
}
#endif // __CPLUSPLUS
/*
* Copyright (C) 2019 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.
*/
#ifndef ANDROID_STATS_LOG_STATS_EVENT_H
#define ANDROID_STATS_LOG_STATS_EVENT_H
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
/*
* Functionality to build and store the buffer sent over the statsd socket.
* This code defines and encapsulates the socket protocol.
*
* Usage:
* AStatsEvent* event = AStatsEvent_obtain();
*
* AStatsEvent_setAtomId(event, atomId);
* AStatsEvent_addBoolAnnotation(event, 5, false); // atom-level annotation
* AStatsEvent_writeInt32(event, 24);
* AStatsEvent_addBoolAnnotation(event, 1, true); // annotation for preceding atom field
* AStatsEvent_addInt32Annotation(event, 2, 128);
* AStatsEvent_writeFloat(event, 2.0);
*
* AStatsEvent_write(event);
* AStatsEvent_release(event);
*
* Note that calls to add atom fields and annotations should be made in the
* order that they are defined in the atom.
*/
#ifdef __cplusplus
extern "C" {
#endif // __CPLUSPLUS
/**
* Opaque struct use to represent a StatsEvent. It builds and stores the data that is sent to
* statsd.
*/
struct AStatsEvent;
typedef struct AStatsEvent AStatsEvent;
/**
* Returns a new AStatsEvent. If you call this function, you must call AStatsEvent_release to free
* the allocated memory.
*/
AStatsEvent* AStatsEvent_obtain();
/**
* Builds and finalizes the AStatsEvent for a pulled event.
* This should only be called for pulled AStatsEvents.
*
* After this function, the StatsEvent must not be modified in any way other than calling release or
* write.
*
* Build can be called multiple times without error.
* If the event has been built before, this function is a no-op.
*/
void AStatsEvent_build(AStatsEvent* event);
/**
* Writes the StatsEvent to the stats log.
*
* After calling this, AStatsEvent_release must be called,
* and is the only function that can be safely called.
*/
int AStatsEvent_write(AStatsEvent* event);
/**
* Frees the memory held by this StatsEvent.
*
* After calling this, the StatsEvent must not be used or modified in any way.
*/
void AStatsEvent_release(AStatsEvent* event);
/**
* Sets the atom id for this StatsEvent.
*
* This function should be called immediately after AStatsEvent_obtain. It may
* be called additional times as well, but subsequent calls will have no effect.
**/
void AStatsEvent_setAtomId(AStatsEvent* event, uint32_t atomId);
/**
* Writes an int32_t field to this StatsEvent.
**/
void AStatsEvent_writeInt32(AStatsEvent* event, int32_t value);
/**
* Writes an int64_t field to this StatsEvent.
**/
void AStatsEvent_writeInt64(AStatsEvent* event, int64_t value);
/**
* Writes a float field to this StatsEvent.
**/
void AStatsEvent_writeFloat(AStatsEvent* event, float value);
/**
* Write a bool field to this StatsEvent.
**/
void AStatsEvent_writeBool(AStatsEvent* event, bool value);
/**
* Write a byte array field to this StatsEvent.
**/
void AStatsEvent_writeByteArray(AStatsEvent* event, const uint8_t* buf, size_t numBytes);
/**
* Write a string field to this StatsEvent.
*
* The string must be null-terminated.
**/
void AStatsEvent_writeString(AStatsEvent* event, const char* value);
/**
* Write an attribution chain field to this StatsEvent.
*
* The sizes of uids and tags must be equal. The AttributionNode at position i is
* made up of uids[i] and tags[i].
*
* \param uids array of uids in the attribution chain.
* \param tags array of tags in the attribution chain. Each tag must be null-terminated.
* \param numNodes the number of AttributionNodes in the attribution chain. This is the length of
* the uids and the tags.
**/
void AStatsEvent_writeAttributionChain(AStatsEvent* event, const uint32_t* uids,
const char* const* tags, uint8_t numNodes);
/**
* Write a int32 array field to this StatsEvent.
*
* Max size of array is 127. If exceeded, array is not written and ERROR_LIST_TOO_LONG is appended
* to StatsEvent.
**/
void AStatsEvent_writeInt32Array(AStatsEvent* event, const int32_t* elements, size_t numElements);
/**
* Write a int64 array field to this StatsEvent.
*
* Max size of array is 127. If exceeded, array is not written and ERROR_LIST_TOO_LONG is appended
* to StatsEvent.
**/
void AStatsEvent_writeInt64Array(AStatsEvent* event, const int64_t* elements, size_t numElements);
/**
* Write a float array field to this StatsEvent.
*
* Max size of array is 127. If exceeded, array is not written and ERROR_LIST_TOO_LONG is appended
* to StatsEvent.
**/
void AStatsEvent_writeFloatArray(AStatsEvent* event, const float* elements, size_t numElements);
/**
* Write a bool array field to this StatsEvent.
*
* Max size of array is 127. If exceeded, array is not written and ERROR_LIST_TOO_LONG is appended
* to StatsEvent.
**/
void AStatsEvent_writeBoolArray(AStatsEvent* event, const bool* elements, size_t numElements);
/**
* Write a string array field to this StatsEvent.
*
* String array encoding is UTF8.
*
* Strings must be null terminated. Max size of array is 127. If exceeded, array is not written and
* ERROR_LIST_TOO_LONG is appended to StatsEvent.
**/
void AStatsEvent_writeStringArray(AStatsEvent* event, const char* const* elements,
size_t numElements);
/**
* Write a bool annotation for the previous field written.
**/
void AStatsEvent_addBoolAnnotation(AStatsEvent* event, uint8_t annotationId, bool value);
/**
* Write an integer annotation for the previous field written.
**/
void AStatsEvent_addInt32Annotation(AStatsEvent* event, uint8_t annotationId, int32_t value);
// Internal/test APIs. Should not be exposed outside of the APEX.
void AStatsEvent_overwriteTimestamp(AStatsEvent* event, uint64_t timestampNs);
uint32_t AStatsEvent_getAtomId(AStatsEvent* event);
// Size is an output parameter.
uint8_t* AStatsEvent_getBuffer(AStatsEvent* event, size_t* size);
uint32_t AStatsEvent_getErrors(AStatsEvent* event);
#ifdef __cplusplus
}
#endif // __CPLUSPLUS
#endif // ANDROID_STATS_LOG_STATS_EVENT_H
/*
* Copyright (C) 2020 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.
*/
#pragma once
/**
* Helpers to manage the statsd socket.
**/
#ifdef __cplusplus
extern "C" {
#endif // __CPLUSPLUS
/**
* Closes the statsd socket file descriptor.
**/
void AStatsSocket_close();
#ifdef __cplusplus
}
#endif // __CPLUSPLUS
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
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.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment