1// Signature format: 2.0 2package android.app { 3 4 public final class StatsManager { 5 method @RequiresPermission(allOf={android.Manifest.permission.DUMP, android.Manifest.permission.PACKAGE_USAGE_STATS}) public void addConfig(long, byte[]) throws android.app.StatsManager.StatsUnavailableException; 6 method @Deprecated @RequiresPermission(allOf={android.Manifest.permission.DUMP, android.Manifest.permission.PACKAGE_USAGE_STATS}) public boolean addConfiguration(long, byte[]); 7 method @RequiresPermission(android.Manifest.permission.REGISTER_STATS_PULL_ATOM) public void clearPullAtomCallback(int); 8 method @Deprecated @Nullable @RequiresPermission(allOf={android.Manifest.permission.DUMP, android.Manifest.permission.PACKAGE_USAGE_STATS}) public byte[] getData(long); 9 method @Deprecated @Nullable @RequiresPermission(allOf={android.Manifest.permission.DUMP, android.Manifest.permission.PACKAGE_USAGE_STATS}) public byte[] getMetadata(); 10 method @RequiresPermission(allOf={android.Manifest.permission.DUMP, android.Manifest.permission.PACKAGE_USAGE_STATS}) public long[] getRegisteredExperimentIds() throws android.app.StatsManager.StatsUnavailableException; 11 method @RequiresPermission(allOf={android.Manifest.permission.DUMP, android.Manifest.permission.PACKAGE_USAGE_STATS}) public byte[] getReports(long) throws android.app.StatsManager.StatsUnavailableException; 12 method @RequiresPermission(allOf={android.Manifest.permission.DUMP, android.Manifest.permission.PACKAGE_USAGE_STATS}) public byte[] getStatsMetadata() throws android.app.StatsManager.StatsUnavailableException; 13 method @RequiresPermission(allOf={android.Manifest.permission.DUMP, android.Manifest.permission.PACKAGE_USAGE_STATS}) public void removeConfig(long) throws android.app.StatsManager.StatsUnavailableException; 14 method @Deprecated @RequiresPermission(allOf={android.Manifest.permission.DUMP, android.Manifest.permission.PACKAGE_USAGE_STATS}) public boolean removeConfiguration(long); 15 method @NonNull @RequiresPermission(allOf={android.Manifest.permission.DUMP, android.Manifest.permission.PACKAGE_USAGE_STATS}) public long[] setActiveConfigsChangedOperation(@Nullable android.app.PendingIntent) throws android.app.StatsManager.StatsUnavailableException; 16 method @RequiresPermission(allOf={android.Manifest.permission.DUMP, android.Manifest.permission.PACKAGE_USAGE_STATS}) public void setBroadcastSubscriber(android.app.PendingIntent, long, long) throws android.app.StatsManager.StatsUnavailableException; 17 method @Deprecated @RequiresPermission(allOf={android.Manifest.permission.DUMP, android.Manifest.permission.PACKAGE_USAGE_STATS}) public boolean setBroadcastSubscriber(long, long, android.app.PendingIntent); 18 method @Deprecated @RequiresPermission(allOf={android.Manifest.permission.DUMP, android.Manifest.permission.PACKAGE_USAGE_STATS}) public boolean setDataFetchOperation(long, android.app.PendingIntent); 19 method @RequiresPermission(allOf={android.Manifest.permission.DUMP, android.Manifest.permission.PACKAGE_USAGE_STATS}) public void setFetchReportsOperation(android.app.PendingIntent, long) throws android.app.StatsManager.StatsUnavailableException; 20 method @RequiresPermission(android.Manifest.permission.REGISTER_STATS_PULL_ATOM) public void setPullAtomCallback(int, @Nullable android.app.StatsManager.PullAtomMetadata, @NonNull java.util.concurrent.Executor, @NonNull android.app.StatsManager.StatsPullAtomCallback); 21 field public static final String ACTION_STATSD_STARTED = "android.app.action.STATSD_STARTED"; 22 field public static final String EXTRA_STATS_ACTIVE_CONFIG_KEYS = "android.app.extra.STATS_ACTIVE_CONFIG_KEYS"; 23 field public static final String EXTRA_STATS_BROADCAST_SUBSCRIBER_COOKIES = "android.app.extra.STATS_BROADCAST_SUBSCRIBER_COOKIES"; 24 field public static final String EXTRA_STATS_CONFIG_KEY = "android.app.extra.STATS_CONFIG_KEY"; 25 field public static final String EXTRA_STATS_CONFIG_UID = "android.app.extra.STATS_CONFIG_UID"; 26 field public static final String EXTRA_STATS_DIMENSIONS_VALUE = "android.app.extra.STATS_DIMENSIONS_VALUE"; 27 field public static final String EXTRA_STATS_SUBSCRIPTION_ID = "android.app.extra.STATS_SUBSCRIPTION_ID"; 28 field public static final String EXTRA_STATS_SUBSCRIPTION_RULE_ID = "android.app.extra.STATS_SUBSCRIPTION_RULE_ID"; 29 field public static final int PULL_SKIP = 1; // 0x1 30 field public static final int PULL_SUCCESS = 0; // 0x0 31 } 32 33 public static class StatsManager.PullAtomMetadata { 34 method @Nullable public int[] getAdditiveFields(); 35 method public long getCoolDownMillis(); 36 method public long getTimeoutMillis(); 37 } 38 39 public static class StatsManager.PullAtomMetadata.Builder { 40 ctor public StatsManager.PullAtomMetadata.Builder(); 41 method @NonNull public android.app.StatsManager.PullAtomMetadata build(); 42 method @NonNull public android.app.StatsManager.PullAtomMetadata.Builder setAdditiveFields(@NonNull int[]); 43 method @NonNull public android.app.StatsManager.PullAtomMetadata.Builder setCoolDownMillis(long); 44 method @NonNull public android.app.StatsManager.PullAtomMetadata.Builder setTimeoutMillis(long); 45 } 46 47 public static interface StatsManager.StatsPullAtomCallback { 48 method public int onPullAtom(int, @NonNull java.util.List<android.util.StatsEvent>); 49 } 50 51 public static class StatsManager.StatsUnavailableException extends android.util.AndroidException { 52 ctor public StatsManager.StatsUnavailableException(String); 53 ctor public StatsManager.StatsUnavailableException(String, Throwable); 54 } 55 56} 57 58package android.os { 59 60 public final class StatsDimensionsValue implements android.os.Parcelable { 61 method public int describeContents(); 62 method public boolean getBooleanValue(); 63 method public int getField(); 64 method public float getFloatValue(); 65 method public int getIntValue(); 66 method public long getLongValue(); 67 method public String getStringValue(); 68 method public java.util.List<android.os.StatsDimensionsValue> getTupleValueList(); 69 method public int getValueType(); 70 method public boolean isValueType(int); 71 method public void writeToParcel(android.os.Parcel, int); 72 field public static final int BOOLEAN_VALUE_TYPE = 5; // 0x5 73 field @NonNull public static final android.os.Parcelable.Creator<android.os.StatsDimensionsValue> CREATOR; 74 field public static final int FLOAT_VALUE_TYPE = 6; // 0x6 75 field public static final int INT_VALUE_TYPE = 3; // 0x3 76 field public static final int LONG_VALUE_TYPE = 4; // 0x4 77 field public static final int STRING_VALUE_TYPE = 2; // 0x2 78 field public static final int TUPLE_VALUE_TYPE = 7; // 0x7 79 } 80 81} 82 83package android.util { 84 85 public final class StatsEvent { 86 method @NonNull public static android.util.StatsEvent.Builder newBuilder(); 87 } 88 89 public static final class StatsEvent.Builder { 90 method @NonNull public android.util.StatsEvent.Builder addBooleanAnnotation(byte, boolean); 91 method @NonNull public android.util.StatsEvent.Builder addIntAnnotation(byte, int); 92 method @NonNull public android.util.StatsEvent build(); 93 method @NonNull public android.util.StatsEvent.Builder setAtomId(int); 94 method @NonNull public android.util.StatsEvent.Builder usePooledBuffer(); 95 method @NonNull public android.util.StatsEvent.Builder writeAttributionChain(@NonNull int[], @NonNull String[]); 96 method @NonNull public android.util.StatsEvent.Builder writeBoolean(boolean); 97 method @NonNull public android.util.StatsEvent.Builder writeByteArray(@NonNull byte[]); 98 method @NonNull public android.util.StatsEvent.Builder writeFloat(float); 99 method @NonNull public android.util.StatsEvent.Builder writeInt(int); 100 method @NonNull public android.util.StatsEvent.Builder writeKeyValuePairs(@Nullable android.util.SparseIntArray, @Nullable android.util.SparseLongArray, @Nullable android.util.SparseArray<java.lang.String>, @Nullable android.util.SparseArray<java.lang.Float>); 101 method @NonNull public android.util.StatsEvent.Builder writeLong(long); 102 method @NonNull public android.util.StatsEvent.Builder writeString(@NonNull String); 103 } 104 105 public final class StatsLog { 106 method public static void write(@NonNull android.util.StatsEvent); 107 method @Deprecated public static void writeRaw(@NonNull byte[], int); 108 field public static final byte ANNOTATION_ID_DEFAULT_STATE = 6; // 0x6 109 field public static final byte ANNOTATION_ID_EXCLUSIVE_STATE = 4; // 0x4 110 field public static final byte ANNOTATION_ID_IS_UID = 1; // 0x1 111 field public static final byte ANNOTATION_ID_PRIMARY_FIELD = 3; // 0x3 112 field public static final byte ANNOTATION_ID_PRIMARY_FIELD_FIRST_UID = 5; // 0x5 113 field public static final byte ANNOTATION_ID_STATE_NESTED = 8; // 0x8 114 field public static final byte ANNOTATION_ID_TRIGGER_STATE_RESET = 7; // 0x7 115 field public static final byte ANNOTATION_ID_TRUNCATE_TIMESTAMP = 2; // 0x2 116 } 117 118} 119 120