1*344a7f5eSAndroid Build Coastguard Worker// Signature format: 2.0 2*344a7f5eSAndroid Build Coastguard Workerpackage android.app { 3*344a7f5eSAndroid Build Coastguard Worker 4*344a7f5eSAndroid Build Coastguard Worker public class StatsCursor extends android.database.AbstractCursor { 5*344a7f5eSAndroid Build Coastguard Worker method @NonNull public String[] getColumnNames(); 6*344a7f5eSAndroid Build Coastguard Worker method public int getCount(); 7*344a7f5eSAndroid Build Coastguard Worker method public double getDouble(int); 8*344a7f5eSAndroid Build Coastguard Worker method public float getFloat(int); 9*344a7f5eSAndroid Build Coastguard Worker method public int getInt(int); 10*344a7f5eSAndroid Build Coastguard Worker method public long getLong(int); 11*344a7f5eSAndroid Build Coastguard Worker method public short getShort(int); 12*344a7f5eSAndroid Build Coastguard Worker method @NonNull public String getString(int); 13*344a7f5eSAndroid Build Coastguard Worker method public boolean isNull(int); 14*344a7f5eSAndroid Build Coastguard Worker } 15*344a7f5eSAndroid Build Coastguard Worker 16*344a7f5eSAndroid Build Coastguard Worker public final class StatsManager { 17*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.DUMP, android.Manifest.permission.PACKAGE_USAGE_STATS}) public void addConfig(long, byte[]) throws android.app.StatsManager.StatsUnavailableException; 18*344a7f5eSAndroid Build Coastguard Worker method @Deprecated @RequiresPermission(allOf={android.Manifest.permission.DUMP, android.Manifest.permission.PACKAGE_USAGE_STATS}) public boolean addConfiguration(long, byte[]); 19*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(android.Manifest.permission.REGISTER_STATS_PULL_ATOM) public void clearPullAtomCallback(int); 20*344a7f5eSAndroid Build Coastguard Worker method @Deprecated @Nullable @RequiresPermission(allOf={android.Manifest.permission.DUMP, android.Manifest.permission.PACKAGE_USAGE_STATS}) public byte[] getData(long); 21*344a7f5eSAndroid Build Coastguard Worker method @Deprecated @Nullable @RequiresPermission(allOf={android.Manifest.permission.DUMP, android.Manifest.permission.PACKAGE_USAGE_STATS}) public byte[] getMetadata(); 22*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.DUMP, android.Manifest.permission.PACKAGE_USAGE_STATS}) public long[] getRegisteredExperimentIds() throws android.app.StatsManager.StatsUnavailableException; 23*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.DUMP, android.Manifest.permission.PACKAGE_USAGE_STATS}) public byte[] getReports(long) throws android.app.StatsManager.StatsUnavailableException; 24*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.DUMP, android.Manifest.permission.PACKAGE_USAGE_STATS}) public byte[] getStatsMetadata() throws android.app.StatsManager.StatsUnavailableException; 25*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(android.Manifest.permission.READ_RESTRICTED_STATS) public void query(long, @NonNull String, @NonNull android.app.StatsQuery, @NonNull java.util.concurrent.Executor, @NonNull android.os.OutcomeReceiver<android.app.StatsCursor,android.app.StatsManager.StatsQueryException>) throws android.app.StatsManager.StatsUnavailableException; 26*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.DUMP, android.Manifest.permission.PACKAGE_USAGE_STATS}) public void removeConfig(long) throws android.app.StatsManager.StatsUnavailableException; 27*344a7f5eSAndroid Build Coastguard Worker method @Deprecated @RequiresPermission(allOf={android.Manifest.permission.DUMP, android.Manifest.permission.PACKAGE_USAGE_STATS}) public boolean removeConfiguration(long); 28*344a7f5eSAndroid Build Coastguard Worker 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; 29*344a7f5eSAndroid Build Coastguard Worker 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; 30*344a7f5eSAndroid Build Coastguard Worker method @Deprecated @RequiresPermission(allOf={android.Manifest.permission.DUMP, android.Manifest.permission.PACKAGE_USAGE_STATS}) public boolean setBroadcastSubscriber(long, long, android.app.PendingIntent); 31*344a7f5eSAndroid Build Coastguard Worker method @Deprecated @RequiresPermission(allOf={android.Manifest.permission.DUMP, android.Manifest.permission.PACKAGE_USAGE_STATS}) public boolean setDataFetchOperation(long, android.app.PendingIntent); 32*344a7f5eSAndroid Build Coastguard Worker 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; 33*344a7f5eSAndroid Build Coastguard Worker 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); 34*344a7f5eSAndroid Build Coastguard Worker method @NonNull @RequiresPermission(android.Manifest.permission.READ_RESTRICTED_STATS) public long[] setRestrictedMetricsChangedOperation(long, @NonNull String, @Nullable android.app.PendingIntent) throws android.app.StatsManager.StatsUnavailableException; 35*344a7f5eSAndroid Build Coastguard Worker field public static final String ACTION_STATSD_STARTED = "android.app.action.STATSD_STARTED"; 36*344a7f5eSAndroid Build Coastguard Worker field public static final String EXTRA_STATS_ACTIVE_CONFIG_KEYS = "android.app.extra.STATS_ACTIVE_CONFIG_KEYS"; 37*344a7f5eSAndroid Build Coastguard Worker field public static final String EXTRA_STATS_BROADCAST_SUBSCRIBER_COOKIES = "android.app.extra.STATS_BROADCAST_SUBSCRIBER_COOKIES"; 38*344a7f5eSAndroid Build Coastguard Worker field public static final String EXTRA_STATS_CONFIG_KEY = "android.app.extra.STATS_CONFIG_KEY"; 39*344a7f5eSAndroid Build Coastguard Worker field public static final String EXTRA_STATS_CONFIG_UID = "android.app.extra.STATS_CONFIG_UID"; 40*344a7f5eSAndroid Build Coastguard Worker field public static final String EXTRA_STATS_DIMENSIONS_VALUE = "android.app.extra.STATS_DIMENSIONS_VALUE"; 41*344a7f5eSAndroid Build Coastguard Worker field public static final String EXTRA_STATS_RESTRICTED_METRIC_IDS = "android.app.extra.STATS_RESTRICTED_METRIC_IDS"; 42*344a7f5eSAndroid Build Coastguard Worker field public static final String EXTRA_STATS_SUBSCRIPTION_ID = "android.app.extra.STATS_SUBSCRIPTION_ID"; 43*344a7f5eSAndroid Build Coastguard Worker field public static final String EXTRA_STATS_SUBSCRIPTION_RULE_ID = "android.app.extra.STATS_SUBSCRIPTION_RULE_ID"; 44*344a7f5eSAndroid Build Coastguard Worker field public static final int PULL_SKIP = 1; // 0x1 45*344a7f5eSAndroid Build Coastguard Worker field public static final int PULL_SUCCESS = 0; // 0x0 46*344a7f5eSAndroid Build Coastguard Worker } 47*344a7f5eSAndroid Build Coastguard Worker 48*344a7f5eSAndroid Build Coastguard Worker public static class StatsManager.PullAtomMetadata { 49*344a7f5eSAndroid Build Coastguard Worker method @Nullable public int[] getAdditiveFields(); 50*344a7f5eSAndroid Build Coastguard Worker method public long getCoolDownMillis(); 51*344a7f5eSAndroid Build Coastguard Worker method public long getTimeoutMillis(); 52*344a7f5eSAndroid Build Coastguard Worker } 53*344a7f5eSAndroid Build Coastguard Worker 54*344a7f5eSAndroid Build Coastguard Worker public static class StatsManager.PullAtomMetadata.Builder { 55*344a7f5eSAndroid Build Coastguard Worker ctor public StatsManager.PullAtomMetadata.Builder(); 56*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.app.StatsManager.PullAtomMetadata build(); 57*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.app.StatsManager.PullAtomMetadata.Builder setAdditiveFields(@NonNull int[]); 58*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.app.StatsManager.PullAtomMetadata.Builder setCoolDownMillis(long); 59*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.app.StatsManager.PullAtomMetadata.Builder setTimeoutMillis(long); 60*344a7f5eSAndroid Build Coastguard Worker } 61*344a7f5eSAndroid Build Coastguard Worker 62*344a7f5eSAndroid Build Coastguard Worker public static interface StatsManager.StatsPullAtomCallback { 63*344a7f5eSAndroid Build Coastguard Worker method public int onPullAtom(int, @NonNull java.util.List<android.util.StatsEvent>); 64*344a7f5eSAndroid Build Coastguard Worker } 65*344a7f5eSAndroid Build Coastguard Worker 66*344a7f5eSAndroid Build Coastguard Worker public static class StatsManager.StatsQueryException extends android.util.AndroidException { 67*344a7f5eSAndroid Build Coastguard Worker ctor public StatsManager.StatsQueryException(@NonNull String); 68*344a7f5eSAndroid Build Coastguard Worker ctor public StatsManager.StatsQueryException(@NonNull String, @NonNull Throwable); 69*344a7f5eSAndroid Build Coastguard Worker } 70*344a7f5eSAndroid Build Coastguard Worker 71*344a7f5eSAndroid Build Coastguard Worker public static class StatsManager.StatsUnavailableException extends android.util.AndroidException { 72*344a7f5eSAndroid Build Coastguard Worker ctor public StatsManager.StatsUnavailableException(String); 73*344a7f5eSAndroid Build Coastguard Worker ctor public StatsManager.StatsUnavailableException(String, Throwable); 74*344a7f5eSAndroid Build Coastguard Worker } 75*344a7f5eSAndroid Build Coastguard Worker 76*344a7f5eSAndroid Build Coastguard Worker public final class StatsQuery { 77*344a7f5eSAndroid Build Coastguard Worker method @IntRange(from=0) public int getMinSqlClientVersion(); 78*344a7f5eSAndroid Build Coastguard Worker method @Nullable public byte[] getPolicyConfig(); 79*344a7f5eSAndroid Build Coastguard Worker method @NonNull public String getRawSql(); 80*344a7f5eSAndroid Build Coastguard Worker method public int getSqlDialect(); 81*344a7f5eSAndroid Build Coastguard Worker field public static final int DIALECT_SQLITE = 1; // 0x1 82*344a7f5eSAndroid Build Coastguard Worker field public static final int DIALECT_UNKNOWN = 0; // 0x0 83*344a7f5eSAndroid Build Coastguard Worker } 84*344a7f5eSAndroid Build Coastguard Worker 85*344a7f5eSAndroid Build Coastguard Worker public static final class StatsQuery.Builder { 86*344a7f5eSAndroid Build Coastguard Worker ctor public StatsQuery.Builder(@NonNull String); 87*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.app.StatsQuery build(); 88*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.app.StatsQuery.Builder setMinSqlClientVersion(@IntRange(from=0) int); 89*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.app.StatsQuery.Builder setPolicyConfig(@NonNull byte[]); 90*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.app.StatsQuery.Builder setSqlDialect(int); 91*344a7f5eSAndroid Build Coastguard Worker } 92*344a7f5eSAndroid Build Coastguard Worker 93*344a7f5eSAndroid Build Coastguard Worker} 94*344a7f5eSAndroid Build Coastguard Worker 95*344a7f5eSAndroid Build Coastguard Workerpackage android.os { 96*344a7f5eSAndroid Build Coastguard Worker 97*344a7f5eSAndroid Build Coastguard Worker public final class StatsDimensionsValue implements android.os.Parcelable { 98*344a7f5eSAndroid Build Coastguard Worker method public int describeContents(); 99*344a7f5eSAndroid Build Coastguard Worker method public boolean getBooleanValue(); 100*344a7f5eSAndroid Build Coastguard Worker method public int getField(); 101*344a7f5eSAndroid Build Coastguard Worker method public float getFloatValue(); 102*344a7f5eSAndroid Build Coastguard Worker method public int getIntValue(); 103*344a7f5eSAndroid Build Coastguard Worker method public long getLongValue(); 104*344a7f5eSAndroid Build Coastguard Worker method public String getStringValue(); 105*344a7f5eSAndroid Build Coastguard Worker method public java.util.List<android.os.StatsDimensionsValue> getTupleValueList(); 106*344a7f5eSAndroid Build Coastguard Worker method public int getValueType(); 107*344a7f5eSAndroid Build Coastguard Worker method public boolean isValueType(int); 108*344a7f5eSAndroid Build Coastguard Worker method public void writeToParcel(android.os.Parcel, int); 109*344a7f5eSAndroid Build Coastguard Worker field public static final int BOOLEAN_VALUE_TYPE = 5; // 0x5 110*344a7f5eSAndroid Build Coastguard Worker field @NonNull public static final android.os.Parcelable.Creator<android.os.StatsDimensionsValue> CREATOR; 111*344a7f5eSAndroid Build Coastguard Worker field public static final int FLOAT_VALUE_TYPE = 6; // 0x6 112*344a7f5eSAndroid Build Coastguard Worker field public static final int INT_VALUE_TYPE = 3; // 0x3 113*344a7f5eSAndroid Build Coastguard Worker field public static final int LONG_VALUE_TYPE = 4; // 0x4 114*344a7f5eSAndroid Build Coastguard Worker field public static final int STRING_VALUE_TYPE = 2; // 0x2 115*344a7f5eSAndroid Build Coastguard Worker field public static final int TUPLE_VALUE_TYPE = 7; // 0x7 116*344a7f5eSAndroid Build Coastguard Worker } 117*344a7f5eSAndroid Build Coastguard Worker 118*344a7f5eSAndroid Build Coastguard Worker} 119*344a7f5eSAndroid Build Coastguard Worker 120*344a7f5eSAndroid Build Coastguard Workerpackage android.util { 121*344a7f5eSAndroid Build Coastguard Worker 122*344a7f5eSAndroid Build Coastguard Worker public final class StatsEvent { 123*344a7f5eSAndroid Build Coastguard Worker method @NonNull public static android.util.StatsEvent.Builder newBuilder(); 124*344a7f5eSAndroid Build Coastguard Worker } 125*344a7f5eSAndroid Build Coastguard Worker 126*344a7f5eSAndroid Build Coastguard Worker public static final class StatsEvent.Builder { 127*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.util.StatsEvent.Builder addBooleanAnnotation(byte, boolean); 128*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.util.StatsEvent.Builder addIntAnnotation(byte, int); 129*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.util.StatsEvent build(); 130*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.util.StatsEvent.Builder setAtomId(int); 131*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.util.StatsEvent.Builder usePooledBuffer(); 132*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.util.StatsEvent.Builder writeAttributionChain(@NonNull int[], @NonNull String[]); 133*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.util.StatsEvent.Builder writeBoolean(boolean); 134*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.util.StatsEvent.Builder writeBooleanArray(@NonNull boolean[]); 135*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.util.StatsEvent.Builder writeByteArray(@NonNull byte[]); 136*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.util.StatsEvent.Builder writeFloat(float); 137*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.util.StatsEvent.Builder writeFloatArray(@NonNull float[]); 138*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.util.StatsEvent.Builder writeInt(int); 139*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.util.StatsEvent.Builder writeIntArray(@NonNull int[]); 140*344a7f5eSAndroid Build Coastguard Worker 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>); 141*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.util.StatsEvent.Builder writeLong(long); 142*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.util.StatsEvent.Builder writeLongArray(@NonNull long[]); 143*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.util.StatsEvent.Builder writeString(@NonNull String); 144*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.util.StatsEvent.Builder writeStringArray(@NonNull String[]); 145*344a7f5eSAndroid Build Coastguard Worker } 146*344a7f5eSAndroid Build Coastguard Worker 147*344a7f5eSAndroid Build Coastguard Worker public final class StatsLog { 148*344a7f5eSAndroid Build Coastguard Worker method public static void write(@NonNull android.util.StatsEvent); 149*344a7f5eSAndroid Build Coastguard Worker method @Deprecated public static void writeRaw(@NonNull byte[], int); 150*344a7f5eSAndroid Build Coastguard Worker field public static final byte ANNOTATION_ID_DEFAULT_STATE = 6; // 0x6 151*344a7f5eSAndroid Build Coastguard Worker field public static final byte ANNOTATION_ID_EXCLUSIVE_STATE = 4; // 0x4 152*344a7f5eSAndroid Build Coastguard Worker field public static final byte ANNOTATION_ID_FIELD_RESTRICTION_ACCESSIBILITY = 14; // 0xe 153*344a7f5eSAndroid Build Coastguard Worker field public static final byte ANNOTATION_ID_FIELD_RESTRICTION_AMBIENT_SENSING = 17; // 0x11 154*344a7f5eSAndroid Build Coastguard Worker field public static final byte ANNOTATION_ID_FIELD_RESTRICTION_APP_ACTIVITY = 12; // 0xc 155*344a7f5eSAndroid Build Coastguard Worker field public static final byte ANNOTATION_ID_FIELD_RESTRICTION_APP_USAGE = 11; // 0xb 156*344a7f5eSAndroid Build Coastguard Worker field public static final byte ANNOTATION_ID_FIELD_RESTRICTION_DEMOGRAPHIC_CLASSIFICATION = 18; // 0x12 157*344a7f5eSAndroid Build Coastguard Worker field public static final byte ANNOTATION_ID_FIELD_RESTRICTION_HEALTH_CONNECT = 13; // 0xd 158*344a7f5eSAndroid Build Coastguard Worker field public static final byte ANNOTATION_ID_FIELD_RESTRICTION_PERIPHERAL_DEVICE_INFO = 10; // 0xa 159*344a7f5eSAndroid Build Coastguard Worker field public static final byte ANNOTATION_ID_FIELD_RESTRICTION_SYSTEM_SEARCH = 15; // 0xf 160*344a7f5eSAndroid Build Coastguard Worker field public static final byte ANNOTATION_ID_FIELD_RESTRICTION_USER_ENGAGEMENT = 16; // 0x10 161*344a7f5eSAndroid Build Coastguard Worker field public static final byte ANNOTATION_ID_IS_UID = 1; // 0x1 162*344a7f5eSAndroid Build Coastguard Worker field public static final byte ANNOTATION_ID_PRIMARY_FIELD = 3; // 0x3 163*344a7f5eSAndroid Build Coastguard Worker field public static final byte ANNOTATION_ID_PRIMARY_FIELD_FIRST_UID = 5; // 0x5 164*344a7f5eSAndroid Build Coastguard Worker field public static final byte ANNOTATION_ID_RESTRICTION_CATEGORY = 9; // 0x9 165*344a7f5eSAndroid Build Coastguard Worker field public static final byte ANNOTATION_ID_STATE_NESTED = 8; // 0x8 166*344a7f5eSAndroid Build Coastguard Worker field public static final byte ANNOTATION_ID_TRIGGER_STATE_RESET = 7; // 0x7 167*344a7f5eSAndroid Build Coastguard Worker field public static final byte ANNOTATION_ID_TRUNCATE_TIMESTAMP = 2; // 0x2 168*344a7f5eSAndroid Build Coastguard Worker field public static final int RESTRICTION_CATEGORY_AUTHENTICATION = 3; // 0x3 169*344a7f5eSAndroid Build Coastguard Worker field public static final int RESTRICTION_CATEGORY_DIAGNOSTIC = 1; // 0x1 170*344a7f5eSAndroid Build Coastguard Worker field public static final int RESTRICTION_CATEGORY_FRAUD_AND_ABUSE = 4; // 0x4 171*344a7f5eSAndroid Build Coastguard Worker field public static final int RESTRICTION_CATEGORY_SYSTEM_INTELLIGENCE = 2; // 0x2 172*344a7f5eSAndroid Build Coastguard Worker } 173*344a7f5eSAndroid Build Coastguard Worker 174*344a7f5eSAndroid Build Coastguard Worker} 175*344a7f5eSAndroid Build Coastguard Worker 176