paulhu | 667e8fb | 2021-12-14 01:30:22 +0000 | [diff] [blame] | 1 | // Signature format: 2.0 |
Junyu Lai | 2ef865e | 2022-01-17 11:52:57 +0000 | [diff] [blame] | 2 | package android.app.usage { |
| 3 | |
| 4 | public class NetworkStatsManager { |
junyulai | b59e542 | 2022-03-01 17:08:01 +0800 | [diff] [blame] | 5 | method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_STATS_PROVIDER, android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK}) public void registerNetworkStatsProvider(@NonNull String, @NonNull android.net.netstats.provider.NetworkStatsProvider); |
| 6 | method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_STATS_PROVIDER, android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK}) public void unregisterNetworkStatsProvider(@NonNull android.net.netstats.provider.NetworkStatsProvider); |
Junyu Lai | 2ef865e | 2022-01-17 11:52:57 +0000 | [diff] [blame] | 7 | } |
| 8 | |
| 9 | } |
| 10 | |
Remi NGUYEN VAN | 51935fc | 2022-01-07 13:18:54 +0900 | [diff] [blame] | 11 | package android.nearby { |
| 12 | |
Wei Wang | b15b5a8 | 2022-02-01 17:08:08 -0800 | [diff] [blame] | 13 | public interface BroadcastCallback { |
Wei Wang | 88c4844 | 2022-03-05 12:14:12 -0800 | [diff] [blame] | 14 | method public void onStatusChanged(int); |
Wei Wang | b15b5a8 | 2022-02-01 17:08:08 -0800 | [diff] [blame] | 15 | field public static final int STATUS_FAILURE = 1; // 0x1 |
| 16 | field public static final int STATUS_FAILURE_ALREADY_REGISTERED = 2; // 0x2 |
| 17 | field public static final int STATUS_FAILURE_MISSING_PERMISSIONS = 4; // 0x4 |
| 18 | field public static final int STATUS_FAILURE_SIZE_EXCEED_LIMIT = 3; // 0x3 |
| 19 | field public static final int STATUS_OK = 0; // 0x0 |
| 20 | } |
| 21 | |
Wei Wang | 24e2cb2 | 2022-03-12 12:15:34 -0800 | [diff] [blame] | 22 | public abstract class BroadcastRequest { |
Wei Wang | b15b5a8 | 2022-02-01 17:08:08 -0800 | [diff] [blame] | 23 | method @NonNull public java.util.List<java.lang.Integer> getMediums(); |
| 24 | method @IntRange(from=0xffffff81, to=126) public int getTxPower(); |
| 25 | method public int getType(); |
| 26 | method public int getVersion(); |
Wei Wang | b15b5a8 | 2022-02-01 17:08:08 -0800 | [diff] [blame] | 27 | field public static final int BROADCAST_TYPE_NEARBY_PRESENCE = 3; // 0x3 |
Wei Wang | 88c4844 | 2022-03-05 12:14:12 -0800 | [diff] [blame] | 28 | field public static final int BROADCAST_TYPE_UNKNOWN = -1; // 0xffffffff |
Wei Wang | 88c4844 | 2022-03-05 12:14:12 -0800 | [diff] [blame] | 29 | field public static final int PRESENCE_VERSION_UNKNOWN = -1; // 0xffffffff |
Wei Wang | b15b5a8 | 2022-02-01 17:08:08 -0800 | [diff] [blame] | 30 | field public static final int PRESENCE_VERSION_V0 = 0; // 0x0 |
| 31 | field public static final int PRESENCE_VERSION_V1 = 1; // 0x1 |
Wei Wang | 88c4844 | 2022-03-05 12:14:12 -0800 | [diff] [blame] | 32 | field public static final int UNKNOWN_TX_POWER = -127; // 0xffffff81 |
Wei Wang | b15b5a8 | 2022-02-01 17:08:08 -0800 | [diff] [blame] | 33 | } |
| 34 | |
| 35 | public final class CredentialElement implements android.os.Parcelable { |
| 36 | ctor public CredentialElement(@NonNull String, @NonNull byte[]); |
| 37 | method public int describeContents(); |
| 38 | method @NonNull public String getKey(); |
| 39 | method @NonNull public byte[] getValue(); |
| 40 | method public void writeToParcel(@NonNull android.os.Parcel, int); |
| 41 | field @NonNull public static final android.os.Parcelable.Creator<android.nearby.CredentialElement> CREATOR; |
| 42 | } |
| 43 | |
| 44 | public final class DataElement implements android.os.Parcelable { |
| 45 | ctor public DataElement(int, @NonNull byte[]); |
| 46 | method public int describeContents(); |
| 47 | method public int getKey(); |
| 48 | method @NonNull public byte[] getValue(); |
| 49 | method public void writeToParcel(@NonNull android.os.Parcel, int); |
| 50 | field @NonNull public static final android.os.Parcelable.Creator<android.nearby.DataElement> CREATOR; |
| 51 | } |
| 52 | |
Remi NGUYEN VAN | 51935fc | 2022-01-07 13:18:54 +0900 | [diff] [blame] | 53 | public class FastPairAccountKeyDeviceMetadata { |
Chun Zhang | d9d12aa | 2022-03-15 00:43:53 -0700 | [diff] [blame] | 54 | method @Nullable public byte[] getDeviceAccountKey(); |
Remi NGUYEN VAN | 51935fc | 2022-01-07 13:18:54 +0900 | [diff] [blame] | 55 | method @Nullable public android.nearby.FastPairDeviceMetadata getFastPairDeviceMetadata(); |
| 56 | method @Nullable public android.nearby.FastPairDiscoveryItem getFastPairDiscoveryItem(); |
Chun Zhang | d9d12aa | 2022-03-15 00:43:53 -0700 | [diff] [blame] | 57 | method @Nullable public byte[] getSha256DeviceAccountKeyPublicAddress(); |
Remi NGUYEN VAN | 51935fc | 2022-01-07 13:18:54 +0900 | [diff] [blame] | 58 | } |
| 59 | |
| 60 | public static final class FastPairAccountKeyDeviceMetadata.Builder { |
| 61 | ctor public FastPairAccountKeyDeviceMetadata.Builder(); |
| 62 | method @NonNull public android.nearby.FastPairAccountKeyDeviceMetadata build(); |
Chun Zhang | d9d12aa | 2022-03-15 00:43:53 -0700 | [diff] [blame] | 63 | method @NonNull public android.nearby.FastPairAccountKeyDeviceMetadata.Builder setDeviceAccountKey(@Nullable byte[]); |
Remi NGUYEN VAN | 51935fc | 2022-01-07 13:18:54 +0900 | [diff] [blame] | 64 | method @NonNull public android.nearby.FastPairAccountKeyDeviceMetadata.Builder setFastPairDeviceMetadata(@Nullable android.nearby.FastPairDeviceMetadata); |
| 65 | method @NonNull public android.nearby.FastPairAccountKeyDeviceMetadata.Builder setFastPairDiscoveryItem(@Nullable android.nearby.FastPairDiscoveryItem); |
Chun Zhang | d9d12aa | 2022-03-15 00:43:53 -0700 | [diff] [blame] | 66 | method @NonNull public android.nearby.FastPairAccountKeyDeviceMetadata.Builder setSha256DeviceAccountKeyPublicAddress(@Nullable byte[]); |
Remi NGUYEN VAN | 51935fc | 2022-01-07 13:18:54 +0900 | [diff] [blame] | 67 | } |
| 68 | |
Chun Zhang | ee379fd | 2022-03-09 11:18:20 -0800 | [diff] [blame] | 69 | public class FastPairAntispoofKeyDeviceMetadata { |
Chun Zhang | d9d12aa | 2022-03-15 00:43:53 -0700 | [diff] [blame] | 70 | method @Nullable public byte[] getAntispoofPublicKey(); |
| 71 | method @Nullable public android.nearby.FastPairDeviceMetadata getFastPairDeviceMetadata(); |
Remi NGUYEN VAN | 51935fc | 2022-01-07 13:18:54 +0900 | [diff] [blame] | 72 | } |
| 73 | |
Chun Zhang | ee379fd | 2022-03-09 11:18:20 -0800 | [diff] [blame] | 74 | public static final class FastPairAntispoofKeyDeviceMetadata.Builder { |
| 75 | ctor public FastPairAntispoofKeyDeviceMetadata.Builder(); |
| 76 | method @NonNull public android.nearby.FastPairAntispoofKeyDeviceMetadata build(); |
Chun Zhang | d9d12aa | 2022-03-15 00:43:53 -0700 | [diff] [blame] | 77 | method @NonNull public android.nearby.FastPairAntispoofKeyDeviceMetadata.Builder setAntispoofPublicKey(@Nullable byte[]); |
Chun Zhang | ee379fd | 2022-03-09 11:18:20 -0800 | [diff] [blame] | 78 | method @NonNull public android.nearby.FastPairAntispoofKeyDeviceMetadata.Builder setFastPairDeviceMetadata(@Nullable android.nearby.FastPairDeviceMetadata); |
Remi NGUYEN VAN | 51935fc | 2022-01-07 13:18:54 +0900 | [diff] [blame] | 79 | } |
| 80 | |
Chun Zhang | fa9c46a | 2022-03-17 12:12:27 -0700 | [diff] [blame] | 81 | public abstract class FastPairDataProviderService extends android.app.Service { |
| 82 | ctor public FastPairDataProviderService(@NonNull String); |
| 83 | method @NonNull public final android.os.IBinder onBind(@NonNull android.content.Intent); |
| 84 | method public abstract void onLoadFastPairAccountDevicesMetadata(@NonNull android.nearby.FastPairDataProviderService.FastPairAccountDevicesMetadataRequest, @NonNull android.nearby.FastPairDataProviderService.FastPairAccountDevicesMetadataCallback); |
| 85 | method public abstract void onLoadFastPairAntispoofKeyDeviceMetadata(@NonNull android.nearby.FastPairDataProviderService.FastPairAntispoofKeyDeviceMetadataRequest, @NonNull android.nearby.FastPairDataProviderService.FastPairAntispoofKeyDeviceMetadataCallback); |
| 86 | method public abstract void onLoadFastPairEligibleAccounts(@NonNull android.nearby.FastPairDataProviderService.FastPairEligibleAccountsRequest, @NonNull android.nearby.FastPairDataProviderService.FastPairEligibleAccountsCallback); |
| 87 | method public abstract void onManageFastPairAccount(@NonNull android.nearby.FastPairDataProviderService.FastPairManageAccountRequest, @NonNull android.nearby.FastPairDataProviderService.FastPairManageActionCallback); |
| 88 | method public abstract void onManageFastPairAccountDevice(@NonNull android.nearby.FastPairDataProviderService.FastPairManageAccountDeviceRequest, @NonNull android.nearby.FastPairDataProviderService.FastPairManageActionCallback); |
Remi NGUYEN VAN | 51935fc | 2022-01-07 13:18:54 +0900 | [diff] [blame] | 89 | field public static final String ACTION_FAST_PAIR_DATA_PROVIDER = "android.nearby.action.FAST_PAIR_DATA_PROVIDER"; |
| 90 | field public static final int ERROR_CODE_BAD_REQUEST = 0; // 0x0 |
| 91 | field public static final int ERROR_CODE_INTERNAL_ERROR = 1; // 0x1 |
| 92 | field public static final int MANAGE_REQUEST_ADD = 0; // 0x0 |
| 93 | field public static final int MANAGE_REQUEST_REMOVE = 1; // 0x1 |
| 94 | } |
| 95 | |
Chun Zhang | fa9c46a | 2022-03-17 12:12:27 -0700 | [diff] [blame] | 96 | public static interface FastPairDataProviderService.FastPairAccountDevicesMetadataCallback { |
Remi NGUYEN VAN | 51935fc | 2022-01-07 13:18:54 +0900 | [diff] [blame] | 97 | method public void onError(int, @Nullable String); |
| 98 | method public void onFastPairAccountDevicesMetadataReceived(@NonNull java.util.Collection<android.nearby.FastPairAccountKeyDeviceMetadata>); |
| 99 | } |
| 100 | |
Chun Zhang | fa9c46a | 2022-03-17 12:12:27 -0700 | [diff] [blame] | 101 | public static class FastPairDataProviderService.FastPairAccountDevicesMetadataRequest { |
Remi NGUYEN VAN | 51935fc | 2022-01-07 13:18:54 +0900 | [diff] [blame] | 102 | method @NonNull public android.accounts.Account getAccount(); |
Chun Zhang | d9d12aa | 2022-03-15 00:43:53 -0700 | [diff] [blame] | 103 | method @NonNull public java.util.Collection<byte[]> getDeviceAccountKeys(); |
Remi NGUYEN VAN | 51935fc | 2022-01-07 13:18:54 +0900 | [diff] [blame] | 104 | } |
| 105 | |
Chun Zhang | fa9c46a | 2022-03-17 12:12:27 -0700 | [diff] [blame] | 106 | public static interface FastPairDataProviderService.FastPairAntispoofKeyDeviceMetadataCallback { |
Remi NGUYEN VAN | 51935fc | 2022-01-07 13:18:54 +0900 | [diff] [blame] | 107 | method public void onError(int, @Nullable String); |
Chun Zhang | ee379fd | 2022-03-09 11:18:20 -0800 | [diff] [blame] | 108 | method public void onFastPairAntispoofKeyDeviceMetadataReceived(@NonNull android.nearby.FastPairAntispoofKeyDeviceMetadata); |
Remi NGUYEN VAN | 51935fc | 2022-01-07 13:18:54 +0900 | [diff] [blame] | 109 | } |
| 110 | |
Chun Zhang | fa9c46a | 2022-03-17 12:12:27 -0700 | [diff] [blame] | 111 | public static class FastPairDataProviderService.FastPairAntispoofKeyDeviceMetadataRequest { |
Remi NGUYEN VAN | 51935fc | 2022-01-07 13:18:54 +0900 | [diff] [blame] | 112 | method @NonNull public byte[] getModelId(); |
| 113 | } |
| 114 | |
Chun Zhang | fa9c46a | 2022-03-17 12:12:27 -0700 | [diff] [blame] | 115 | public static interface FastPairDataProviderService.FastPairEligibleAccountsCallback { |
Remi NGUYEN VAN | 51935fc | 2022-01-07 13:18:54 +0900 | [diff] [blame] | 116 | method public void onError(int, @Nullable String); |
| 117 | method public void onFastPairEligibleAccountsReceived(@NonNull java.util.Collection<android.nearby.FastPairEligibleAccount>); |
| 118 | } |
| 119 | |
Chun Zhang | fa9c46a | 2022-03-17 12:12:27 -0700 | [diff] [blame] | 120 | public static class FastPairDataProviderService.FastPairEligibleAccountsRequest { |
Remi NGUYEN VAN | 51935fc | 2022-01-07 13:18:54 +0900 | [diff] [blame] | 121 | } |
| 122 | |
Chun Zhang | fa9c46a | 2022-03-17 12:12:27 -0700 | [diff] [blame] | 123 | public static class FastPairDataProviderService.FastPairManageAccountDeviceRequest { |
Remi NGUYEN VAN | 51935fc | 2022-01-07 13:18:54 +0900 | [diff] [blame] | 124 | method @NonNull public android.accounts.Account getAccount(); |
| 125 | method @NonNull public android.nearby.FastPairAccountKeyDeviceMetadata getAccountKeyDeviceMetadata(); |
| 126 | method @Nullable public String getBleAddress(); |
| 127 | method public int getRequestType(); |
| 128 | } |
| 129 | |
Chun Zhang | fa9c46a | 2022-03-17 12:12:27 -0700 | [diff] [blame] | 130 | public static class FastPairDataProviderService.FastPairManageAccountRequest { |
Remi NGUYEN VAN | 51935fc | 2022-01-07 13:18:54 +0900 | [diff] [blame] | 131 | method @NonNull public android.accounts.Account getAccount(); |
| 132 | method public int getRequestType(); |
| 133 | } |
| 134 | |
Chun Zhang | fa9c46a | 2022-03-17 12:12:27 -0700 | [diff] [blame] | 135 | public static interface FastPairDataProviderService.FastPairManageActionCallback { |
Remi NGUYEN VAN | 51935fc | 2022-01-07 13:18:54 +0900 | [diff] [blame] | 136 | method public void onError(int, @Nullable String); |
| 137 | method public void onSuccess(); |
| 138 | } |
| 139 | |
| 140 | public class FastPairDeviceMetadata { |
| 141 | method @Nullable public String getAssistantSetupHalfSheet(); |
| 142 | method @Nullable public String getAssistantSetupNotification(); |
| 143 | method public int getBleTxPower(); |
| 144 | method @Nullable public String getConfirmPinDescription(); |
| 145 | method @Nullable public String getConfirmPinTitle(); |
| 146 | method @Nullable public String getConnectSuccessCompanionAppInstalled(); |
| 147 | method @Nullable public String getConnectSuccessCompanionAppNotInstalled(); |
| 148 | method public int getDeviceType(); |
| 149 | method @Nullable public String getDownloadCompanionAppDescription(); |
| 150 | method @Nullable public String getFailConnectGoToSettingsDescription(); |
| 151 | method @Nullable public String getFastPairTvConnectDeviceNoAccountDescription(); |
| 152 | method @Nullable public byte[] getImage(); |
| 153 | method @Nullable public String getImageUrl(); |
| 154 | method @Nullable public String getInitialNotificationDescription(); |
| 155 | method @Nullable public String getInitialNotificationDescriptionNoAccount(); |
| 156 | method @Nullable public String getInitialPairingDescription(); |
| 157 | method @Nullable public String getIntentUri(); |
| 158 | method @Nullable public String getLocale(); |
Chun Zhang | f639ce0 | 2022-02-08 22:16:38 -0800 | [diff] [blame] | 159 | method @Nullable public String getName(); |
Remi NGUYEN VAN | 51935fc | 2022-01-07 13:18:54 +0900 | [diff] [blame] | 160 | method @Nullable public String getOpenCompanionAppDescription(); |
| 161 | method @Nullable public String getRetroactivePairingDescription(); |
| 162 | method @Nullable public String getSubsequentPairingDescription(); |
| 163 | method @Nullable public String getSyncContactsDescription(); |
| 164 | method @Nullable public String getSyncContactsTitle(); |
| 165 | method @Nullable public String getSyncSmsDescription(); |
| 166 | method @Nullable public String getSyncSmsTitle(); |
| 167 | method public float getTriggerDistance(); |
| 168 | method @Nullable public String getTrueWirelessImageUrlCase(); |
| 169 | method @Nullable public String getTrueWirelessImageUrlLeftBud(); |
| 170 | method @Nullable public String getTrueWirelessImageUrlRightBud(); |
| 171 | method @Nullable public String getUnableToConnectDescription(); |
| 172 | method @Nullable public String getUnableToConnectTitle(); |
| 173 | method @Nullable public String getUpdateCompanionAppDescription(); |
| 174 | method @Nullable public String getWaitLaunchCompanionAppDescription(); |
| 175 | } |
| 176 | |
| 177 | public static final class FastPairDeviceMetadata.Builder { |
| 178 | ctor public FastPairDeviceMetadata.Builder(); |
| 179 | method @NonNull public android.nearby.FastPairDeviceMetadata build(); |
| 180 | method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setAssistantSetupHalfSheet(@Nullable String); |
| 181 | method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setAssistantSetupNotification(@Nullable String); |
| 182 | method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setBleTxPower(int); |
| 183 | method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setConfirmPinDescription(@Nullable String); |
| 184 | method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setConfirmPinTitle(@Nullable String); |
| 185 | method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setConnectSuccessCompanionAppInstalled(@Nullable String); |
| 186 | method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setConnectSuccessCompanionAppNotInstalled(@Nullable String); |
| 187 | method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setDeviceType(int); |
| 188 | method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setDownloadCompanionAppDescription(@Nullable String); |
| 189 | method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setFailConnectGoToSettingsDescription(@Nullable String); |
| 190 | method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setFastPairTvConnectDeviceNoAccountDescription(@Nullable String); |
| 191 | method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setImage(@Nullable byte[]); |
| 192 | method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setImageUrl(@Nullable String); |
| 193 | method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setInitialNotificationDescription(@Nullable String); |
| 194 | method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setInitialNotificationDescriptionNoAccount(@Nullable String); |
| 195 | method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setInitialPairingDescription(@Nullable String); |
| 196 | method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setIntentUri(@Nullable String); |
| 197 | method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setLocale(@Nullable String); |
Chun Zhang | f639ce0 | 2022-02-08 22:16:38 -0800 | [diff] [blame] | 198 | method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setName(@Nullable String); |
Remi NGUYEN VAN | 51935fc | 2022-01-07 13:18:54 +0900 | [diff] [blame] | 199 | method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setOpenCompanionAppDescription(@Nullable String); |
| 200 | method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setRetroactivePairingDescription(@Nullable String); |
| 201 | method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setSubsequentPairingDescription(@Nullable String); |
| 202 | method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setSyncContactsDescription(@Nullable String); |
| 203 | method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setSyncContactsTitle(@Nullable String); |
| 204 | method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setSyncSmsDescription(@Nullable String); |
| 205 | method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setSyncSmsTitle(@Nullable String); |
| 206 | method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setTriggerDistance(float); |
| 207 | method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setTrueWirelessImageUrlCase(@Nullable String); |
| 208 | method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setTrueWirelessImageUrlLeftBud(@Nullable String); |
| 209 | method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setTrueWirelessImageUrlRightBud(@Nullable String); |
| 210 | method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setUnableToConnectDescription(@Nullable String); |
| 211 | method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setUnableToConnectTitle(@Nullable String); |
| 212 | method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setUpdateCompanionAppDescription(@Nullable String); |
| 213 | method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setWaitLaunchCompanionAppDescription(@Nullable String); |
| 214 | } |
| 215 | |
| 216 | public class FastPairDiscoveryItem { |
| 217 | method @Nullable public String getActionUrl(); |
| 218 | method public int getActionUrlType(); |
| 219 | method @Nullable public String getAppName(); |
| 220 | method public int getAttachmentType(); |
| 221 | method @Nullable public byte[] getAuthenticationPublicKeySecp256r1(); |
| 222 | method @Nullable public byte[] getBleRecordBytes(); |
| 223 | method public int getDebugCategory(); |
| 224 | method @Nullable public String getDebugMessage(); |
| 225 | method @Nullable public String getDescription(); |
| 226 | method @Nullable public String getDeviceName(); |
| 227 | method @Nullable public String getDisplayUrl(); |
| 228 | method @Nullable public String getEntityId(); |
| 229 | method @Nullable public String getFeatureGraphicUrl(); |
| 230 | method public long getFirstObservationTimestampMillis(); |
| 231 | method @Nullable public String getGroupId(); |
| 232 | method @Nullable public String getIconFfeUrl(); |
| 233 | method @Nullable public byte[] getIconPng(); |
| 234 | method @Nullable public String getId(); |
| 235 | method public long getLastObservationTimestampMillis(); |
| 236 | method public int getLastUserExperience(); |
| 237 | method public long getLostMillis(); |
| 238 | method @Nullable public String getMacAddress(); |
| 239 | method @Nullable public String getPackageName(); |
| 240 | method public long getPendingAppInstallTimestampMillis(); |
| 241 | method public int getRssi(); |
| 242 | method public int getState(); |
| 243 | method @Nullable public String getTitle(); |
| 244 | method @Nullable public String getTriggerId(); |
| 245 | method public int getTxPower(); |
| 246 | method public int getType(); |
| 247 | } |
| 248 | |
| 249 | public static final class FastPairDiscoveryItem.Builder { |
| 250 | ctor public FastPairDiscoveryItem.Builder(); |
| 251 | method @NonNull public android.nearby.FastPairDiscoveryItem build(); |
| 252 | method @NonNull public android.nearby.FastPairDiscoveryItem.Builder setActionUrl(@Nullable String); |
| 253 | method @NonNull public android.nearby.FastPairDiscoveryItem.Builder setActionUrlType(int); |
| 254 | method @NonNull public android.nearby.FastPairDiscoveryItem.Builder setAppName(@Nullable String); |
| 255 | method @NonNull public android.nearby.FastPairDiscoveryItem.Builder setAttachmentType(int); |
| 256 | method @NonNull public android.nearby.FastPairDiscoveryItem.Builder setAuthenticationPublicKeySecp256r1(@Nullable byte[]); |
| 257 | method @NonNull public android.nearby.FastPairDiscoveryItem.Builder setBleRecordBytes(@Nullable byte[]); |
| 258 | method @NonNull public android.nearby.FastPairDiscoveryItem.Builder setDebugCategory(int); |
| 259 | method @NonNull public android.nearby.FastPairDiscoveryItem.Builder setDebugMessage(@Nullable String); |
| 260 | method @NonNull public android.nearby.FastPairDiscoveryItem.Builder setDescription(@Nullable String); |
| 261 | method @NonNull public android.nearby.FastPairDiscoveryItem.Builder setDeviceName(@Nullable String); |
| 262 | method @NonNull public android.nearby.FastPairDiscoveryItem.Builder setDisplayUrl(@Nullable String); |
| 263 | method @NonNull public android.nearby.FastPairDiscoveryItem.Builder setEntityId(@Nullable String); |
| 264 | method @NonNull public android.nearby.FastPairDiscoveryItem.Builder setFeatureGraphicUrl(@Nullable String); |
| 265 | method @NonNull public android.nearby.FastPairDiscoveryItem.Builder setFirstObservationTimestampMillis(long); |
| 266 | method @NonNull public android.nearby.FastPairDiscoveryItem.Builder setGroupId(@Nullable String); |
| 267 | method @NonNull public android.nearby.FastPairDiscoveryItem.Builder setIconFfeUrl(@Nullable String); |
| 268 | method @NonNull public android.nearby.FastPairDiscoveryItem.Builder setIconPng(@Nullable byte[]); |
| 269 | method @NonNull public android.nearby.FastPairDiscoveryItem.Builder setId(@Nullable String); |
| 270 | method @NonNull public android.nearby.FastPairDiscoveryItem.Builder setLastObservationTimestampMillis(long); |
| 271 | method @NonNull public android.nearby.FastPairDiscoveryItem.Builder setLastUserExperience(int); |
| 272 | method @NonNull public android.nearby.FastPairDiscoveryItem.Builder setLostMillis(long); |
| 273 | method @NonNull public android.nearby.FastPairDiscoveryItem.Builder setMacAddress(@Nullable String); |
| 274 | method @NonNull public android.nearby.FastPairDiscoveryItem.Builder setPackageName(@Nullable String); |
| 275 | method @NonNull public android.nearby.FastPairDiscoveryItem.Builder setPendingAppInstallTimestampMillis(long); |
| 276 | method @NonNull public android.nearby.FastPairDiscoveryItem.Builder setRssi(int); |
| 277 | method @NonNull public android.nearby.FastPairDiscoveryItem.Builder setState(int); |
| 278 | method @NonNull public android.nearby.FastPairDiscoveryItem.Builder setTitle(@Nullable String); |
| 279 | method @NonNull public android.nearby.FastPairDiscoveryItem.Builder setTriggerId(@Nullable String); |
| 280 | method @NonNull public android.nearby.FastPairDiscoveryItem.Builder setTxPower(int); |
| 281 | method @NonNull public android.nearby.FastPairDiscoveryItem.Builder setType(int); |
| 282 | } |
| 283 | |
| 284 | public class FastPairEligibleAccount { |
Chun Zhang | d9d12aa | 2022-03-15 00:43:53 -0700 | [diff] [blame] | 285 | method @Nullable public android.accounts.Account getAccount(); |
| 286 | method public boolean isOptIn(); |
Remi NGUYEN VAN | 51935fc | 2022-01-07 13:18:54 +0900 | [diff] [blame] | 287 | } |
| 288 | |
| 289 | public static final class FastPairEligibleAccount.Builder { |
| 290 | ctor public FastPairEligibleAccount.Builder(); |
| 291 | method @NonNull public android.nearby.FastPairEligibleAccount build(); |
| 292 | method @NonNull public android.nearby.FastPairEligibleAccount.Builder setAccount(@Nullable android.accounts.Account); |
| 293 | method @NonNull public android.nearby.FastPairEligibleAccount.Builder setOptIn(boolean); |
| 294 | } |
| 295 | |
| 296 | public abstract class NearbyDevice { |
Wei Wang | b15b5a8 | 2022-02-01 17:08:08 -0800 | [diff] [blame] | 297 | method @NonNull public java.util.List<java.lang.Integer> getMediums(); |
| 298 | method @Nullable public String getName(); |
Remi NGUYEN VAN | 51935fc | 2022-01-07 13:18:54 +0900 | [diff] [blame] | 299 | method @IntRange(from=0xffffff81, to=126) public int getRssi(); |
| 300 | method public static boolean isValidMedium(int); |
| 301 | } |
| 302 | |
Remi NGUYEN VAN | 51935fc | 2022-01-07 13:18:54 +0900 | [diff] [blame] | 303 | public class NearbyManager { |
Xinyi Zhou | 1b2a5bf | 2022-03-22 18:42:26 -0700 | [diff] [blame] | 304 | method public static boolean getFastPairScanEnabled(@NonNull android.content.Context); |
Chun Zhang | 32a93a5 | 2022-03-24 20:49:25 -0700 | [diff] [blame] | 305 | method @RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) public static void setFastPairScanEnabled(@NonNull android.content.Context, boolean); |
Xinyi Zhou | b4efda8 | 2022-03-15 18:22:35 -0700 | [diff] [blame] | 306 | method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_ADVERTISE, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public void startBroadcast(@NonNull android.nearby.BroadcastRequest, @NonNull java.util.concurrent.Executor, @NonNull android.nearby.BroadcastCallback); |
| 307 | method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_SCAN, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public int startScan(@NonNull android.nearby.ScanRequest, @NonNull java.util.concurrent.Executor, @NonNull android.nearby.ScanCallback); |
| 308 | method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_ADVERTISE, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public void stopBroadcast(@NonNull android.nearby.BroadcastCallback); |
| 309 | method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_SCAN, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public void stopScan(@NonNull android.nearby.ScanCallback); |
Remi NGUYEN VAN | 51935fc | 2022-01-07 13:18:54 +0900 | [diff] [blame] | 310 | } |
| 311 | |
Wei Wang | b15b5a8 | 2022-02-01 17:08:08 -0800 | [diff] [blame] | 312 | public final class PresenceBroadcastRequest extends android.nearby.BroadcastRequest implements android.os.Parcelable { |
Wei Wang | 24e2cb2 | 2022-03-12 12:15:34 -0800 | [diff] [blame] | 313 | method public int describeContents(); |
Wei Wang | b15b5a8 | 2022-02-01 17:08:08 -0800 | [diff] [blame] | 314 | method @NonNull public java.util.List<java.lang.Integer> getActions(); |
| 315 | method @NonNull public android.nearby.PrivateCredential getCredential(); |
| 316 | method @NonNull public java.util.List<android.nearby.DataElement> getExtendedProperties(); |
| 317 | method @NonNull public byte[] getSalt(); |
Wei Wang | 24e2cb2 | 2022-03-12 12:15:34 -0800 | [diff] [blame] | 318 | method public void writeToParcel(@NonNull android.os.Parcel, int); |
Wei Wang | b15b5a8 | 2022-02-01 17:08:08 -0800 | [diff] [blame] | 319 | field @NonNull public static final android.os.Parcelable.Creator<android.nearby.PresenceBroadcastRequest> CREATOR; |
| 320 | } |
| 321 | |
| 322 | public static final class PresenceBroadcastRequest.Builder { |
Wei Wang | 88c4844 | 2022-03-05 12:14:12 -0800 | [diff] [blame] | 323 | ctor public PresenceBroadcastRequest.Builder(@NonNull java.util.List<java.lang.Integer>, @NonNull byte[], @NonNull android.nearby.PrivateCredential); |
Wei Wang | b15b5a8 | 2022-02-01 17:08:08 -0800 | [diff] [blame] | 324 | method @NonNull public android.nearby.PresenceBroadcastRequest.Builder addAction(@IntRange(from=1, to=255) int); |
| 325 | method @NonNull public android.nearby.PresenceBroadcastRequest.Builder addExtendedProperty(@NonNull android.nearby.DataElement); |
| 326 | method @NonNull public android.nearby.PresenceBroadcastRequest build(); |
Wei Wang | b15b5a8 | 2022-02-01 17:08:08 -0800 | [diff] [blame] | 327 | method @NonNull public android.nearby.PresenceBroadcastRequest.Builder setTxPower(@IntRange(from=0xffffff81, to=126) int); |
| 328 | method @NonNull public android.nearby.PresenceBroadcastRequest.Builder setVersion(int); |
| 329 | } |
| 330 | |
Wei Wang | 24e2cb2 | 2022-03-12 12:15:34 -0800 | [diff] [blame] | 331 | public abstract class PresenceCredential { |
Wei Wang | b15b5a8 | 2022-02-01 17:08:08 -0800 | [diff] [blame] | 332 | method @NonNull public byte[] getAuthenticityKey(); |
| 333 | method @NonNull public java.util.List<android.nearby.CredentialElement> getCredentialElements(); |
| 334 | method public int getIdentityType(); |
| 335 | method @NonNull public byte[] getSecretId(); |
| 336 | method public int getType(); |
Wei Wang | b15b5a8 | 2022-02-01 17:08:08 -0800 | [diff] [blame] | 337 | field public static final int CREDENTIAL_TYPE_PRIVATE = 0; // 0x0 |
| 338 | field public static final int CREDENTIAL_TYPE_PUBLIC = 1; // 0x1 |
| 339 | field public static final int IDENTITY_TYPE_PRIVATE = 1; // 0x1 |
| 340 | field public static final int IDENTITY_TYPE_PROVISIONED = 2; // 0x2 |
| 341 | field public static final int IDENTITY_TYPE_PUBLIC = 4; // 0x4 |
| 342 | field public static final int IDENTITY_TYPE_TRUSTED = 3; // 0x3 |
| 343 | field public static final int IDENTITY_TYPE_UNKNOWN = 0; // 0x0 |
| 344 | } |
| 345 | |
| 346 | public final class PresenceDevice extends android.nearby.NearbyDevice implements android.os.Parcelable { |
| 347 | method public int describeContents(); |
| 348 | method @NonNull public String getDeviceId(); |
| 349 | method @Nullable public String getDeviceImageUrl(); |
| 350 | method public int getDeviceType(); |
| 351 | method public long getDiscoveryTimestampMillis(); |
| 352 | method @NonNull public byte[] getEncryptedIdentity(); |
| 353 | method @NonNull public java.util.List<android.nearby.DataElement> getExtendedProperties(); |
| 354 | method @NonNull public byte[] getSalt(); |
| 355 | method @NonNull public byte[] getSecretId(); |
| 356 | method public void writeToParcel(@NonNull android.os.Parcel, int); |
| 357 | field @NonNull public static final android.os.Parcelable.Creator<android.nearby.PresenceDevice> CREATOR; |
| 358 | } |
| 359 | |
| 360 | public static final class PresenceDevice.Builder { |
Wei Wang | 88c4844 | 2022-03-05 12:14:12 -0800 | [diff] [blame] | 361 | ctor public PresenceDevice.Builder(@NonNull String, @NonNull byte[], @NonNull byte[], @NonNull byte[]); |
Wei Wang | b15b5a8 | 2022-02-01 17:08:08 -0800 | [diff] [blame] | 362 | method @NonNull public android.nearby.PresenceDevice.Builder addExtendedProperty(@NonNull android.nearby.DataElement); |
| 363 | method @NonNull public android.nearby.PresenceDevice.Builder addMedium(int); |
| 364 | method @NonNull public android.nearby.PresenceDevice build(); |
Wei Wang | b15b5a8 | 2022-02-01 17:08:08 -0800 | [diff] [blame] | 365 | method @NonNull public android.nearby.PresenceDevice.Builder setDeviceImageUrl(@Nullable String); |
| 366 | method @NonNull public android.nearby.PresenceDevice.Builder setDeviceType(int); |
| 367 | method @NonNull public android.nearby.PresenceDevice.Builder setDiscoveryTimestampMillis(long); |
Wei Wang | b15b5a8 | 2022-02-01 17:08:08 -0800 | [diff] [blame] | 368 | method @NonNull public android.nearby.PresenceDevice.Builder setName(@Nullable String); |
| 369 | method @NonNull public android.nearby.PresenceDevice.Builder setRssi(int); |
Wei Wang | b15b5a8 | 2022-02-01 17:08:08 -0800 | [diff] [blame] | 370 | } |
| 371 | |
| 372 | public final class PresenceScanFilter extends android.nearby.ScanFilter implements android.os.Parcelable { |
Wei Wang | 24e2cb2 | 2022-03-12 12:15:34 -0800 | [diff] [blame] | 373 | method public int describeContents(); |
Wei Wang | b15b5a8 | 2022-02-01 17:08:08 -0800 | [diff] [blame] | 374 | method @NonNull public java.util.List<android.nearby.PublicCredential> getCredentials(); |
| 375 | method @NonNull public java.util.List<android.nearby.DataElement> getExtendedProperties(); |
| 376 | method @NonNull public java.util.List<java.lang.Integer> getPresenceActions(); |
Wei Wang | 24e2cb2 | 2022-03-12 12:15:34 -0800 | [diff] [blame] | 377 | method public void writeToParcel(@NonNull android.os.Parcel, int); |
Wei Wang | b15b5a8 | 2022-02-01 17:08:08 -0800 | [diff] [blame] | 378 | field @NonNull public static final android.os.Parcelable.Creator<android.nearby.PresenceScanFilter> CREATOR; |
| 379 | } |
| 380 | |
| 381 | public static final class PresenceScanFilter.Builder { |
| 382 | ctor public PresenceScanFilter.Builder(); |
| 383 | method @NonNull public android.nearby.PresenceScanFilter.Builder addCredential(@NonNull android.nearby.PublicCredential); |
| 384 | method @NonNull public android.nearby.PresenceScanFilter.Builder addExtendedProperty(@NonNull android.nearby.DataElement); |
| 385 | method @NonNull public android.nearby.PresenceScanFilter.Builder addPresenceAction(@IntRange(from=1, to=255) int); |
| 386 | method @NonNull public android.nearby.PresenceScanFilter build(); |
| 387 | method @NonNull public android.nearby.PresenceScanFilter.Builder setMaxPathLoss(@IntRange(from=0, to=127) int); |
| 388 | } |
| 389 | |
| 390 | public final class PrivateCredential extends android.nearby.PresenceCredential implements android.os.Parcelable { |
Wei Wang | 24e2cb2 | 2022-03-12 12:15:34 -0800 | [diff] [blame] | 391 | method public int describeContents(); |
Wei Wang | b15b5a8 | 2022-02-01 17:08:08 -0800 | [diff] [blame] | 392 | method @NonNull public String getDeviceName(); |
| 393 | method @NonNull public byte[] getMetadataEncryptionKey(); |
Wei Wang | 24e2cb2 | 2022-03-12 12:15:34 -0800 | [diff] [blame] | 394 | method public void writeToParcel(@NonNull android.os.Parcel, int); |
Wei Wang | b15b5a8 | 2022-02-01 17:08:08 -0800 | [diff] [blame] | 395 | field @NonNull public static final android.os.Parcelable.Creator<android.nearby.PrivateCredential> CREATOR; |
| 396 | } |
| 397 | |
| 398 | public static final class PrivateCredential.Builder { |
Wei Wang | 24e2cb2 | 2022-03-12 12:15:34 -0800 | [diff] [blame] | 399 | ctor public PrivateCredential.Builder(@NonNull byte[], @NonNull byte[], @NonNull byte[], @NonNull String); |
Wei Wang | b15b5a8 | 2022-02-01 17:08:08 -0800 | [diff] [blame] | 400 | method @NonNull public android.nearby.PrivateCredential.Builder addCredentialElement(@NonNull android.nearby.CredentialElement); |
| 401 | method @NonNull public android.nearby.PrivateCredential build(); |
Wei Wang | b15b5a8 | 2022-02-01 17:08:08 -0800 | [diff] [blame] | 402 | method @NonNull public android.nearby.PrivateCredential.Builder setIdentityType(int); |
Wei Wang | b15b5a8 | 2022-02-01 17:08:08 -0800 | [diff] [blame] | 403 | } |
| 404 | |
| 405 | public final class PublicCredential extends android.nearby.PresenceCredential implements android.os.Parcelable { |
Wei Wang | 24e2cb2 | 2022-03-12 12:15:34 -0800 | [diff] [blame] | 406 | method public int describeContents(); |
Wei Wang | b15b5a8 | 2022-02-01 17:08:08 -0800 | [diff] [blame] | 407 | method @NonNull public byte[] getEncryptedMetadata(); |
| 408 | method @NonNull public byte[] getEncryptedMetadataKeyTag(); |
| 409 | method @NonNull public byte[] getPublicKey(); |
Wei Wang | 24e2cb2 | 2022-03-12 12:15:34 -0800 | [diff] [blame] | 410 | method public void writeToParcel(@NonNull android.os.Parcel, int); |
Wei Wang | b15b5a8 | 2022-02-01 17:08:08 -0800 | [diff] [blame] | 411 | field @NonNull public static final android.os.Parcelable.Creator<android.nearby.PublicCredential> CREATOR; |
| 412 | } |
| 413 | |
| 414 | public static final class PublicCredential.Builder { |
Wei Wang | 24e2cb2 | 2022-03-12 12:15:34 -0800 | [diff] [blame] | 415 | ctor public PublicCredential.Builder(@NonNull byte[], @NonNull byte[], @NonNull byte[], @NonNull byte[], @NonNull byte[]); |
Wei Wang | b15b5a8 | 2022-02-01 17:08:08 -0800 | [diff] [blame] | 416 | method @NonNull public android.nearby.PublicCredential.Builder addCredentialElement(@NonNull android.nearby.CredentialElement); |
| 417 | method @NonNull public android.nearby.PublicCredential build(); |
Wei Wang | b15b5a8 | 2022-02-01 17:08:08 -0800 | [diff] [blame] | 418 | method @NonNull public android.nearby.PublicCredential.Builder setIdentityType(int); |
Wei Wang | b15b5a8 | 2022-02-01 17:08:08 -0800 | [diff] [blame] | 419 | } |
| 420 | |
Remi NGUYEN VAN | 51935fc | 2022-01-07 13:18:54 +0900 | [diff] [blame] | 421 | public interface ScanCallback { |
| 422 | method public void onDiscovered(@NonNull android.nearby.NearbyDevice); |
| 423 | method public void onLost(@NonNull android.nearby.NearbyDevice); |
| 424 | method public void onUpdated(@NonNull android.nearby.NearbyDevice); |
| 425 | } |
| 426 | |
Wei Wang | 24e2cb2 | 2022-03-12 12:15:34 -0800 | [diff] [blame] | 427 | public abstract class ScanFilter { |
Wei Wang | b15b5a8 | 2022-02-01 17:08:08 -0800 | [diff] [blame] | 428 | method @IntRange(from=0, to=127) public int getMaxPathLoss(); |
| 429 | method public int getType(); |
Wei Wang | b15b5a8 | 2022-02-01 17:08:08 -0800 | [diff] [blame] | 430 | } |
| 431 | |
Remi NGUYEN VAN | 51935fc | 2022-01-07 13:18:54 +0900 | [diff] [blame] | 432 | public final class ScanRequest implements android.os.Parcelable { |
| 433 | method public int describeContents(); |
Wei Wang | b15b5a8 | 2022-02-01 17:08:08 -0800 | [diff] [blame] | 434 | method @NonNull public java.util.List<android.nearby.ScanFilter> getScanFilters(); |
Remi NGUYEN VAN | 51935fc | 2022-01-07 13:18:54 +0900 | [diff] [blame] | 435 | method public int getScanMode(); |
| 436 | method public int getScanType(); |
| 437 | method @NonNull public android.os.WorkSource getWorkSource(); |
Xinyi Zhou | ff98750 | 2022-03-09 17:38:41 -0800 | [diff] [blame] | 438 | method public boolean isBleEnabled(); |
Remi NGUYEN VAN | 51935fc | 2022-01-07 13:18:54 +0900 | [diff] [blame] | 439 | method public static boolean isValidScanMode(int); |
| 440 | method public static boolean isValidScanType(int); |
| 441 | method @NonNull public static String scanModeToString(int); |
| 442 | method public void writeToParcel(@NonNull android.os.Parcel, int); |
| 443 | field @NonNull public static final android.os.Parcelable.Creator<android.nearby.ScanRequest> CREATOR; |
| 444 | field public static final int SCAN_MODE_BALANCED = 1; // 0x1 |
| 445 | field public static final int SCAN_MODE_LOW_LATENCY = 2; // 0x2 |
| 446 | field public static final int SCAN_MODE_LOW_POWER = 0; // 0x0 |
| 447 | field public static final int SCAN_MODE_NO_POWER = -1; // 0xffffffff |
| 448 | field public static final int SCAN_TYPE_EXPOSURE_NOTIFICATION = 4; // 0x4 |
| 449 | field public static final int SCAN_TYPE_FAST_PAIR = 1; // 0x1 |
| 450 | field public static final int SCAN_TYPE_NEARBY_PRESENCE = 3; // 0x3 |
| 451 | field public static final int SCAN_TYPE_NEARBY_SHARE = 2; // 0x2 |
| 452 | } |
| 453 | |
| 454 | public static final class ScanRequest.Builder { |
| 455 | ctor public ScanRequest.Builder(); |
Wei Wang | b15b5a8 | 2022-02-01 17:08:08 -0800 | [diff] [blame] | 456 | method @NonNull public android.nearby.ScanRequest.Builder addScanFilter(@NonNull android.nearby.ScanFilter); |
Remi NGUYEN VAN | 51935fc | 2022-01-07 13:18:54 +0900 | [diff] [blame] | 457 | method @NonNull public android.nearby.ScanRequest build(); |
Xinyi Zhou | ff98750 | 2022-03-09 17:38:41 -0800 | [diff] [blame] | 458 | method @NonNull public android.nearby.ScanRequest.Builder setBleEnabled(boolean); |
Remi NGUYEN VAN | 51935fc | 2022-01-07 13:18:54 +0900 | [diff] [blame] | 459 | method @NonNull public android.nearby.ScanRequest.Builder setScanMode(int); |
| 460 | method @NonNull public android.nearby.ScanRequest.Builder setScanType(int); |
| 461 | method @NonNull @RequiresPermission(android.Manifest.permission.UPDATE_DEVICE_STATS) public android.nearby.ScanRequest.Builder setWorkSource(@Nullable android.os.WorkSource); |
| 462 | } |
| 463 | |
| 464 | } |
| 465 | |
Aaron Huang | 68ca373 | 2022-01-06 19:30:43 +0800 | [diff] [blame] | 466 | package android.net { |
| 467 | |
Xiao Ma | eaaf7d3 | 2022-01-23 16:14:51 +0000 | [diff] [blame] | 468 | public class EthernetManager { |
Patrick Rohr | fa376a5 | 2022-03-16 20:16:09 +0100 | [diff] [blame] | 469 | method @RequiresPermission(anyOf={android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK, android.Manifest.permission.NETWORK_STACK, android.Manifest.permission.MANAGE_ETHERNET_NETWORKS}) public void disableInterface(@NonNull String, @Nullable java.util.concurrent.Executor, @Nullable android.os.OutcomeReceiver<java.lang.String,android.net.EthernetNetworkManagementException>); |
| 470 | method @RequiresPermission(anyOf={android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK, android.Manifest.permission.NETWORK_STACK, android.Manifest.permission.MANAGE_ETHERNET_NETWORKS}) public void enableInterface(@NonNull String, @Nullable java.util.concurrent.Executor, @Nullable android.os.OutcomeReceiver<java.lang.String,android.net.EthernetNetworkManagementException>); |
Xiao Ma | eaaf7d3 | 2022-01-23 16:14:51 +0000 | [diff] [blame] | 471 | method @NonNull @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_STACK, android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK}) public android.net.EthernetManager.TetheredInterfaceRequest requestTetheredInterface(@NonNull java.util.concurrent.Executor, @NonNull android.net.EthernetManager.TetheredInterfaceCallback); |
Patrick Rohr | c551ebb | 2022-03-16 20:15:18 +0100 | [diff] [blame] | 472 | method @RequiresPermission(anyOf={android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK, android.Manifest.permission.NETWORK_STACK, android.Manifest.permission.MANAGE_ETHERNET_NETWORKS}) public void updateConfiguration(@NonNull String, @NonNull android.net.EthernetNetworkUpdateRequest, @Nullable java.util.concurrent.Executor, @Nullable android.os.OutcomeReceiver<java.lang.String,android.net.EthernetNetworkManagementException>); |
Xiao Ma | eaaf7d3 | 2022-01-23 16:14:51 +0000 | [diff] [blame] | 473 | } |
| 474 | |
| 475 | public static interface EthernetManager.TetheredInterfaceCallback { |
| 476 | method public void onAvailable(@NonNull String); |
| 477 | method public void onUnavailable(); |
| 478 | } |
| 479 | |
| 480 | public static class EthernetManager.TetheredInterfaceRequest { |
| 481 | method public void release(); |
| 482 | } |
| 483 | |
| 484 | public final class EthernetNetworkManagementException extends java.lang.RuntimeException implements android.os.Parcelable { |
| 485 | ctor public EthernetNetworkManagementException(@NonNull String); |
| 486 | method public int describeContents(); |
| 487 | method public void writeToParcel(@NonNull android.os.Parcel, int); |
| 488 | field @NonNull public static final android.os.Parcelable.Creator<android.net.EthernetNetworkManagementException> CREATOR; |
| 489 | } |
| 490 | |
| 491 | public final class EthernetNetworkUpdateRequest implements android.os.Parcelable { |
| 492 | method public int describeContents(); |
Patrick Rohr | 8a910f4 | 2022-03-16 20:07:23 +0100 | [diff] [blame] | 493 | method @Nullable public android.net.IpConfiguration getIpConfiguration(); |
Xiao Ma | eaaf7d3 | 2022-01-23 16:14:51 +0000 | [diff] [blame] | 494 | method @Nullable public android.net.NetworkCapabilities getNetworkCapabilities(); |
| 495 | method public void writeToParcel(@NonNull android.os.Parcel, int); |
| 496 | field @NonNull public static final android.os.Parcelable.Creator<android.net.EthernetNetworkUpdateRequest> CREATOR; |
| 497 | } |
| 498 | |
| 499 | public static final class EthernetNetworkUpdateRequest.Builder { |
| 500 | ctor public EthernetNetworkUpdateRequest.Builder(); |
| 501 | ctor public EthernetNetworkUpdateRequest.Builder(@NonNull android.net.EthernetNetworkUpdateRequest); |
| 502 | method @NonNull public android.net.EthernetNetworkUpdateRequest build(); |
Patrick Rohr | 8a910f4 | 2022-03-16 20:07:23 +0100 | [diff] [blame] | 503 | method @NonNull public android.net.EthernetNetworkUpdateRequest.Builder setIpConfiguration(@Nullable android.net.IpConfiguration); |
Xiao Ma | eaaf7d3 | 2022-01-23 16:14:51 +0000 | [diff] [blame] | 504 | method @NonNull public android.net.EthernetNetworkUpdateRequest.Builder setNetworkCapabilities(@Nullable android.net.NetworkCapabilities); |
| 505 | } |
| 506 | |
Yan Yan | f8063e3 | 2022-02-08 19:26:29 -0800 | [diff] [blame] | 507 | public class IpSecManager { |
Aaron Huang | 68ca373 | 2022-01-06 19:30:43 +0800 | [diff] [blame] | 508 | method @RequiresPermission(android.Manifest.permission.MANAGE_IPSEC_TUNNELS) public void applyTunnelModeTransform(@NonNull android.net.IpSecManager.IpSecTunnelInterface, int, @NonNull android.net.IpSecTransform) throws java.io.IOException; |
| 509 | method @NonNull @RequiresPermission(android.Manifest.permission.MANAGE_IPSEC_TUNNELS) public android.net.IpSecManager.IpSecTunnelInterface createIpSecTunnelInterface(@NonNull java.net.InetAddress, @NonNull java.net.InetAddress, @NonNull android.net.Network) throws java.io.IOException, android.net.IpSecManager.ResourceUnavailableException; |
| 510 | } |
| 511 | |
| 512 | public static final class IpSecManager.IpSecTunnelInterface implements java.lang.AutoCloseable { |
| 513 | method @RequiresPermission(android.Manifest.permission.MANAGE_IPSEC_TUNNELS) public void addAddress(@NonNull java.net.InetAddress, int) throws java.io.IOException; |
| 514 | method public void close(); |
| 515 | method @NonNull public String getInterfaceName(); |
| 516 | method @RequiresPermission(android.Manifest.permission.MANAGE_IPSEC_TUNNELS) public void removeAddress(@NonNull java.net.InetAddress, int) throws java.io.IOException; |
| 517 | method @RequiresPermission(android.Manifest.permission.MANAGE_IPSEC_TUNNELS) public void setUnderlyingNetwork(@NonNull android.net.Network) throws java.io.IOException; |
| 518 | } |
| 519 | |
| 520 | public static class IpSecTransform.Builder { |
| 521 | method @NonNull @RequiresPermission(android.Manifest.permission.MANAGE_IPSEC_TUNNELS) public android.net.IpSecTransform buildTunnelModeTransform(@NonNull java.net.InetAddress, @NonNull android.net.IpSecManager.SecurityParameterIndex) throws java.io.IOException, android.net.IpSecManager.ResourceUnavailableException, android.net.IpSecManager.SpiUnavailableException; |
| 522 | } |
| 523 | |
Junyu Lai | 2ef865e | 2022-01-17 11:52:57 +0000 | [diff] [blame] | 524 | public final class NetworkStats implements java.lang.Iterable<android.net.NetworkStats.Entry> android.os.Parcelable { |
| 525 | ctor public NetworkStats(long, int); |
| 526 | method @NonNull public android.net.NetworkStats add(@NonNull android.net.NetworkStats); |
| 527 | method @NonNull public android.net.NetworkStats addEntry(@NonNull android.net.NetworkStats.Entry); |
| 528 | method public int describeContents(); |
junyulai | 6801690 | 2022-03-28 15:39:12 +0800 | [diff] [blame^] | 529 | method @NonNull public java.util.Iterator<android.net.NetworkStats.Entry> iterator(); |
Junyu Lai | 2ef865e | 2022-01-17 11:52:57 +0000 | [diff] [blame] | 530 | method @NonNull public android.net.NetworkStats subtract(@NonNull android.net.NetworkStats); |
| 531 | method public void writeToParcel(@NonNull android.os.Parcel, int); |
| 532 | field @NonNull public static final android.os.Parcelable.Creator<android.net.NetworkStats> CREATOR; |
| 533 | field public static final int DEFAULT_NETWORK_ALL = -1; // 0xffffffff |
| 534 | field public static final int DEFAULT_NETWORK_NO = 0; // 0x0 |
| 535 | field public static final int DEFAULT_NETWORK_YES = 1; // 0x1 |
| 536 | field public static final String IFACE_VT = "vt_data0"; |
| 537 | field public static final int METERED_ALL = -1; // 0xffffffff |
| 538 | field public static final int METERED_NO = 0; // 0x0 |
| 539 | field public static final int METERED_YES = 1; // 0x1 |
| 540 | field public static final int ROAMING_ALL = -1; // 0xffffffff |
| 541 | field public static final int ROAMING_NO = 0; // 0x0 |
| 542 | field public static final int ROAMING_YES = 1; // 0x1 |
| 543 | field public static final int SET_ALL = -1; // 0xffffffff |
| 544 | field public static final int SET_DEFAULT = 0; // 0x0 |
| 545 | field public static final int SET_FOREGROUND = 1; // 0x1 |
| 546 | field public static final int TAG_NONE = 0; // 0x0 |
| 547 | field public static final int UID_ALL = -1; // 0xffffffff |
| 548 | field public static final int UID_TETHERING = -5; // 0xfffffffb |
| 549 | } |
| 550 | |
| 551 | public static class NetworkStats.Entry { |
| 552 | ctor public NetworkStats.Entry(@Nullable String, int, int, int, int, int, int, long, long, long, long, long); |
junyulai | 6801690 | 2022-03-28 15:39:12 +0800 | [diff] [blame^] | 553 | method public int getDefaultNetwork(); |
| 554 | method public int getMetered(); |
| 555 | method public long getOperations(); |
| 556 | method public int getRoaming(); |
| 557 | method public long getRxBytes(); |
| 558 | method public long getRxPackets(); |
| 559 | method public int getSet(); |
| 560 | method public int getTag(); |
| 561 | method public long getTxBytes(); |
| 562 | method public long getTxPackets(); |
| 563 | method public int getUid(); |
Junyu Lai | 2ef865e | 2022-01-17 11:52:57 +0000 | [diff] [blame] | 564 | } |
| 565 | |
| 566 | public class TrafficStats { |
| 567 | method public static void setThreadStatsTagApp(); |
| 568 | method public static void setThreadStatsTagBackup(); |
Junyu Lai | 2ef865e | 2022-01-17 11:52:57 +0000 | [diff] [blame] | 569 | method public static void setThreadStatsTagRestore(); |
| 570 | field public static final int TAG_NETWORK_STACK_IMPERSONATION_RANGE_END = -113; // 0xffffff8f |
| 571 | field public static final int TAG_NETWORK_STACK_IMPERSONATION_RANGE_START = -128; // 0xffffff80 |
| 572 | field public static final int TAG_NETWORK_STACK_RANGE_END = -257; // 0xfffffeff |
| 573 | field public static final int TAG_NETWORK_STACK_RANGE_START = -768; // 0xfffffd00 |
| 574 | field public static final int TAG_SYSTEM_IMPERSONATION_RANGE_END = -241; // 0xffffff0f |
| 575 | field public static final int TAG_SYSTEM_IMPERSONATION_RANGE_START = -256; // 0xffffff00 |
| 576 | } |
| 577 | |
| 578 | } |
| 579 | |
| 580 | package android.net.netstats.provider { |
| 581 | |
| 582 | public abstract class NetworkStatsProvider { |
| 583 | ctor public NetworkStatsProvider(); |
| 584 | method public void notifyAlertReached(); |
| 585 | method public void notifyLimitReached(); |
| 586 | method public void notifyStatsUpdated(int, @NonNull android.net.NetworkStats, @NonNull android.net.NetworkStats); |
| 587 | method public void notifyWarningReached(); |
| 588 | method public abstract void onRequestStatsUpdate(int); |
| 589 | method public abstract void onSetAlert(long); |
| 590 | method public abstract void onSetLimit(@NonNull String, long); |
| 591 | method public void onSetWarningAndLimit(@NonNull String, long, long); |
| 592 | field public static final int QUOTA_UNLIMITED = -1; // 0xffffffff |
| 593 | } |
| 594 | |
Aaron Huang | 68ca373 | 2022-01-06 19:30:43 +0800 | [diff] [blame] | 595 | } |
| 596 | |