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(); |
Remi NGUYEN VAN | 51935fc | 2022-01-07 13:18:54 +0900 | [diff] [blame] | 126 | method public int getRequestType(); |
| 127 | } |
| 128 | |
Chun Zhang | fa9c46a | 2022-03-17 12:12:27 -0700 | [diff] [blame] | 129 | public static class FastPairDataProviderService.FastPairManageAccountRequest { |
Remi NGUYEN VAN | 51935fc | 2022-01-07 13:18:54 +0900 | [diff] [blame] | 130 | method @NonNull public android.accounts.Account getAccount(); |
| 131 | method public int getRequestType(); |
| 132 | } |
| 133 | |
Chun Zhang | fa9c46a | 2022-03-17 12:12:27 -0700 | [diff] [blame] | 134 | public static interface FastPairDataProviderService.FastPairManageActionCallback { |
Remi NGUYEN VAN | 51935fc | 2022-01-07 13:18:54 +0900 | [diff] [blame] | 135 | method public void onError(int, @Nullable String); |
| 136 | method public void onSuccess(); |
| 137 | } |
| 138 | |
| 139 | public class FastPairDeviceMetadata { |
Remi NGUYEN VAN | 51935fc | 2022-01-07 13:18:54 +0900 | [diff] [blame] | 140 | method public int getBleTxPower(); |
Remi NGUYEN VAN | 51935fc | 2022-01-07 13:18:54 +0900 | [diff] [blame] | 141 | method @Nullable public String getConnectSuccessCompanionAppInstalled(); |
| 142 | method @Nullable public String getConnectSuccessCompanionAppNotInstalled(); |
| 143 | method public int getDeviceType(); |
| 144 | method @Nullable public String getDownloadCompanionAppDescription(); |
| 145 | method @Nullable public String getFailConnectGoToSettingsDescription(); |
Remi NGUYEN VAN | 51935fc | 2022-01-07 13:18:54 +0900 | [diff] [blame] | 146 | method @Nullable public byte[] getImage(); |
| 147 | method @Nullable public String getImageUrl(); |
| 148 | method @Nullable public String getInitialNotificationDescription(); |
| 149 | method @Nullable public String getInitialNotificationDescriptionNoAccount(); |
| 150 | method @Nullable public String getInitialPairingDescription(); |
| 151 | method @Nullable public String getIntentUri(); |
Chun Zhang | f639ce0 | 2022-02-08 22:16:38 -0800 | [diff] [blame] | 152 | method @Nullable public String getName(); |
Remi NGUYEN VAN | 51935fc | 2022-01-07 13:18:54 +0900 | [diff] [blame] | 153 | method @Nullable public String getOpenCompanionAppDescription(); |
| 154 | method @Nullable public String getRetroactivePairingDescription(); |
| 155 | method @Nullable public String getSubsequentPairingDescription(); |
Remi NGUYEN VAN | 51935fc | 2022-01-07 13:18:54 +0900 | [diff] [blame] | 156 | method public float getTriggerDistance(); |
| 157 | method @Nullable public String getTrueWirelessImageUrlCase(); |
| 158 | method @Nullable public String getTrueWirelessImageUrlLeftBud(); |
| 159 | method @Nullable public String getTrueWirelessImageUrlRightBud(); |
| 160 | method @Nullable public String getUnableToConnectDescription(); |
| 161 | method @Nullable public String getUnableToConnectTitle(); |
| 162 | method @Nullable public String getUpdateCompanionAppDescription(); |
| 163 | method @Nullable public String getWaitLaunchCompanionAppDescription(); |
| 164 | } |
| 165 | |
| 166 | public static final class FastPairDeviceMetadata.Builder { |
| 167 | ctor public FastPairDeviceMetadata.Builder(); |
| 168 | method @NonNull public android.nearby.FastPairDeviceMetadata build(); |
Remi NGUYEN VAN | 51935fc | 2022-01-07 13:18:54 +0900 | [diff] [blame] | 169 | method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setBleTxPower(int); |
Remi NGUYEN VAN | 51935fc | 2022-01-07 13:18:54 +0900 | [diff] [blame] | 170 | method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setConnectSuccessCompanionAppInstalled(@Nullable String); |
| 171 | method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setConnectSuccessCompanionAppNotInstalled(@Nullable String); |
| 172 | method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setDeviceType(int); |
| 173 | method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setDownloadCompanionAppDescription(@Nullable String); |
| 174 | method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setFailConnectGoToSettingsDescription(@Nullable String); |
Remi NGUYEN VAN | 51935fc | 2022-01-07 13:18:54 +0900 | [diff] [blame] | 175 | method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setImage(@Nullable byte[]); |
| 176 | method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setImageUrl(@Nullable String); |
| 177 | method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setInitialNotificationDescription(@Nullable String); |
| 178 | method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setInitialNotificationDescriptionNoAccount(@Nullable String); |
| 179 | method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setInitialPairingDescription(@Nullable String); |
| 180 | method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setIntentUri(@Nullable String); |
Chun Zhang | f639ce0 | 2022-02-08 22:16:38 -0800 | [diff] [blame] | 181 | method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setName(@Nullable String); |
Remi NGUYEN VAN | 51935fc | 2022-01-07 13:18:54 +0900 | [diff] [blame] | 182 | method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setOpenCompanionAppDescription(@Nullable String); |
| 183 | method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setRetroactivePairingDescription(@Nullable String); |
| 184 | method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setSubsequentPairingDescription(@Nullable String); |
Remi NGUYEN VAN | 51935fc | 2022-01-07 13:18:54 +0900 | [diff] [blame] | 185 | method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setTriggerDistance(float); |
| 186 | method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setTrueWirelessImageUrlCase(@Nullable String); |
| 187 | method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setTrueWirelessImageUrlLeftBud(@Nullable String); |
| 188 | method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setTrueWirelessImageUrlRightBud(@Nullable String); |
| 189 | method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setUnableToConnectDescription(@Nullable String); |
| 190 | method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setUnableToConnectTitle(@Nullable String); |
| 191 | method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setUpdateCompanionAppDescription(@Nullable String); |
| 192 | method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setWaitLaunchCompanionAppDescription(@Nullable String); |
| 193 | } |
| 194 | |
| 195 | public class FastPairDiscoveryItem { |
| 196 | method @Nullable public String getActionUrl(); |
| 197 | method public int getActionUrlType(); |
| 198 | method @Nullable public String getAppName(); |
Remi NGUYEN VAN | 51935fc | 2022-01-07 13:18:54 +0900 | [diff] [blame] | 199 | method @Nullable public byte[] getAuthenticationPublicKeySecp256r1(); |
Remi NGUYEN VAN | 51935fc | 2022-01-07 13:18:54 +0900 | [diff] [blame] | 200 | method @Nullable public String getDescription(); |
| 201 | method @Nullable public String getDeviceName(); |
| 202 | method @Nullable public String getDisplayUrl(); |
Remi NGUYEN VAN | 51935fc | 2022-01-07 13:18:54 +0900 | [diff] [blame] | 203 | method public long getFirstObservationTimestampMillis(); |
Remi NGUYEN VAN | 51935fc | 2022-01-07 13:18:54 +0900 | [diff] [blame] | 204 | method @Nullable public String getIconFfeUrl(); |
| 205 | method @Nullable public byte[] getIconPng(); |
| 206 | method @Nullable public String getId(); |
| 207 | method public long getLastObservationTimestampMillis(); |
Remi NGUYEN VAN | 51935fc | 2022-01-07 13:18:54 +0900 | [diff] [blame] | 208 | method @Nullable public String getMacAddress(); |
| 209 | method @Nullable public String getPackageName(); |
| 210 | method public long getPendingAppInstallTimestampMillis(); |
| 211 | method public int getRssi(); |
| 212 | method public int getState(); |
| 213 | method @Nullable public String getTitle(); |
| 214 | method @Nullable public String getTriggerId(); |
| 215 | method public int getTxPower(); |
Remi NGUYEN VAN | 51935fc | 2022-01-07 13:18:54 +0900 | [diff] [blame] | 216 | } |
| 217 | |
| 218 | public static final class FastPairDiscoveryItem.Builder { |
| 219 | ctor public FastPairDiscoveryItem.Builder(); |
| 220 | method @NonNull public android.nearby.FastPairDiscoveryItem build(); |
| 221 | method @NonNull public android.nearby.FastPairDiscoveryItem.Builder setActionUrl(@Nullable String); |
| 222 | method @NonNull public android.nearby.FastPairDiscoveryItem.Builder setActionUrlType(int); |
| 223 | method @NonNull public android.nearby.FastPairDiscoveryItem.Builder setAppName(@Nullable String); |
Remi NGUYEN VAN | 51935fc | 2022-01-07 13:18:54 +0900 | [diff] [blame] | 224 | method @NonNull public android.nearby.FastPairDiscoveryItem.Builder setAuthenticationPublicKeySecp256r1(@Nullable byte[]); |
Remi NGUYEN VAN | 51935fc | 2022-01-07 13:18:54 +0900 | [diff] [blame] | 225 | method @NonNull public android.nearby.FastPairDiscoveryItem.Builder setDescription(@Nullable String); |
| 226 | method @NonNull public android.nearby.FastPairDiscoveryItem.Builder setDeviceName(@Nullable String); |
| 227 | method @NonNull public android.nearby.FastPairDiscoveryItem.Builder setDisplayUrl(@Nullable String); |
Remi NGUYEN VAN | 51935fc | 2022-01-07 13:18:54 +0900 | [diff] [blame] | 228 | method @NonNull public android.nearby.FastPairDiscoveryItem.Builder setFirstObservationTimestampMillis(long); |
Remi NGUYEN VAN | 51935fc | 2022-01-07 13:18:54 +0900 | [diff] [blame] | 229 | method @NonNull public android.nearby.FastPairDiscoveryItem.Builder setIconFfeUrl(@Nullable String); |
| 230 | method @NonNull public android.nearby.FastPairDiscoveryItem.Builder setIconPng(@Nullable byte[]); |
| 231 | method @NonNull public android.nearby.FastPairDiscoveryItem.Builder setId(@Nullable String); |
| 232 | method @NonNull public android.nearby.FastPairDiscoveryItem.Builder setLastObservationTimestampMillis(long); |
Remi NGUYEN VAN | 51935fc | 2022-01-07 13:18:54 +0900 | [diff] [blame] | 233 | method @NonNull public android.nearby.FastPairDiscoveryItem.Builder setMacAddress(@Nullable String); |
| 234 | method @NonNull public android.nearby.FastPairDiscoveryItem.Builder setPackageName(@Nullable String); |
| 235 | method @NonNull public android.nearby.FastPairDiscoveryItem.Builder setPendingAppInstallTimestampMillis(long); |
| 236 | method @NonNull public android.nearby.FastPairDiscoveryItem.Builder setRssi(int); |
| 237 | method @NonNull public android.nearby.FastPairDiscoveryItem.Builder setState(int); |
| 238 | method @NonNull public android.nearby.FastPairDiscoveryItem.Builder setTitle(@Nullable String); |
| 239 | method @NonNull public android.nearby.FastPairDiscoveryItem.Builder setTriggerId(@Nullable String); |
| 240 | method @NonNull public android.nearby.FastPairDiscoveryItem.Builder setTxPower(int); |
Remi NGUYEN VAN | 51935fc | 2022-01-07 13:18:54 +0900 | [diff] [blame] | 241 | } |
| 242 | |
| 243 | public class FastPairEligibleAccount { |
Chun Zhang | d9d12aa | 2022-03-15 00:43:53 -0700 | [diff] [blame] | 244 | method @Nullable public android.accounts.Account getAccount(); |
| 245 | method public boolean isOptIn(); |
Remi NGUYEN VAN | 51935fc | 2022-01-07 13:18:54 +0900 | [diff] [blame] | 246 | } |
| 247 | |
| 248 | public static final class FastPairEligibleAccount.Builder { |
| 249 | ctor public FastPairEligibleAccount.Builder(); |
| 250 | method @NonNull public android.nearby.FastPairEligibleAccount build(); |
| 251 | method @NonNull public android.nearby.FastPairEligibleAccount.Builder setAccount(@Nullable android.accounts.Account); |
| 252 | method @NonNull public android.nearby.FastPairEligibleAccount.Builder setOptIn(boolean); |
| 253 | } |
| 254 | |
| 255 | public abstract class NearbyDevice { |
Wei Wang | b15b5a8 | 2022-02-01 17:08:08 -0800 | [diff] [blame] | 256 | method @NonNull public java.util.List<java.lang.Integer> getMediums(); |
| 257 | method @Nullable public String getName(); |
Remi NGUYEN VAN | 51935fc | 2022-01-07 13:18:54 +0900 | [diff] [blame] | 258 | method @IntRange(from=0xffffff81, to=126) public int getRssi(); |
| 259 | method public static boolean isValidMedium(int); |
| 260 | } |
| 261 | |
Remi NGUYEN VAN | 51935fc | 2022-01-07 13:18:54 +0900 | [diff] [blame] | 262 | public class NearbyManager { |
Xinyi Zhou | 1b2a5bf | 2022-03-22 18:42:26 -0700 | [diff] [blame] | 263 | method public static boolean getFastPairScanEnabled(@NonNull android.content.Context); |
Chun Zhang | 32a93a5 | 2022-03-24 20:49:25 -0700 | [diff] [blame] | 264 | 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] | 265 | 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); |
| 266 | 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); |
| 267 | method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_ADVERTISE, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public void stopBroadcast(@NonNull android.nearby.BroadcastCallback); |
| 268 | 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] | 269 | } |
| 270 | |
Wei Wang | b15b5a8 | 2022-02-01 17:08:08 -0800 | [diff] [blame] | 271 | public final class PresenceBroadcastRequest extends android.nearby.BroadcastRequest implements android.os.Parcelable { |
Wei Wang | 24e2cb2 | 2022-03-12 12:15:34 -0800 | [diff] [blame] | 272 | method public int describeContents(); |
Wei Wang | b15b5a8 | 2022-02-01 17:08:08 -0800 | [diff] [blame] | 273 | method @NonNull public java.util.List<java.lang.Integer> getActions(); |
| 274 | method @NonNull public android.nearby.PrivateCredential getCredential(); |
| 275 | method @NonNull public java.util.List<android.nearby.DataElement> getExtendedProperties(); |
| 276 | method @NonNull public byte[] getSalt(); |
Wei Wang | 24e2cb2 | 2022-03-12 12:15:34 -0800 | [diff] [blame] | 277 | method public void writeToParcel(@NonNull android.os.Parcel, int); |
Wei Wang | b15b5a8 | 2022-02-01 17:08:08 -0800 | [diff] [blame] | 278 | field @NonNull public static final android.os.Parcelable.Creator<android.nearby.PresenceBroadcastRequest> CREATOR; |
| 279 | } |
| 280 | |
| 281 | public static final class PresenceBroadcastRequest.Builder { |
Wei Wang | 88c4844 | 2022-03-05 12:14:12 -0800 | [diff] [blame] | 282 | 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] | 283 | method @NonNull public android.nearby.PresenceBroadcastRequest.Builder addAction(@IntRange(from=1, to=255) int); |
| 284 | method @NonNull public android.nearby.PresenceBroadcastRequest.Builder addExtendedProperty(@NonNull android.nearby.DataElement); |
| 285 | method @NonNull public android.nearby.PresenceBroadcastRequest build(); |
Wei Wang | b15b5a8 | 2022-02-01 17:08:08 -0800 | [diff] [blame] | 286 | method @NonNull public android.nearby.PresenceBroadcastRequest.Builder setTxPower(@IntRange(from=0xffffff81, to=126) int); |
| 287 | method @NonNull public android.nearby.PresenceBroadcastRequest.Builder setVersion(int); |
| 288 | } |
| 289 | |
Wei Wang | 24e2cb2 | 2022-03-12 12:15:34 -0800 | [diff] [blame] | 290 | public abstract class PresenceCredential { |
Wei Wang | b15b5a8 | 2022-02-01 17:08:08 -0800 | [diff] [blame] | 291 | method @NonNull public byte[] getAuthenticityKey(); |
| 292 | method @NonNull public java.util.List<android.nearby.CredentialElement> getCredentialElements(); |
| 293 | method public int getIdentityType(); |
| 294 | method @NonNull public byte[] getSecretId(); |
| 295 | method public int getType(); |
Wei Wang | b15b5a8 | 2022-02-01 17:08:08 -0800 | [diff] [blame] | 296 | field public static final int CREDENTIAL_TYPE_PRIVATE = 0; // 0x0 |
| 297 | field public static final int CREDENTIAL_TYPE_PUBLIC = 1; // 0x1 |
| 298 | field public static final int IDENTITY_TYPE_PRIVATE = 1; // 0x1 |
| 299 | field public static final int IDENTITY_TYPE_PROVISIONED = 2; // 0x2 |
| 300 | field public static final int IDENTITY_TYPE_PUBLIC = 4; // 0x4 |
| 301 | field public static final int IDENTITY_TYPE_TRUSTED = 3; // 0x3 |
| 302 | field public static final int IDENTITY_TYPE_UNKNOWN = 0; // 0x0 |
| 303 | } |
| 304 | |
| 305 | public final class PresenceDevice extends android.nearby.NearbyDevice implements android.os.Parcelable { |
| 306 | method public int describeContents(); |
| 307 | method @NonNull public String getDeviceId(); |
| 308 | method @Nullable public String getDeviceImageUrl(); |
| 309 | method public int getDeviceType(); |
| 310 | method public long getDiscoveryTimestampMillis(); |
| 311 | method @NonNull public byte[] getEncryptedIdentity(); |
| 312 | method @NonNull public java.util.List<android.nearby.DataElement> getExtendedProperties(); |
| 313 | method @NonNull public byte[] getSalt(); |
| 314 | method @NonNull public byte[] getSecretId(); |
| 315 | method public void writeToParcel(@NonNull android.os.Parcel, int); |
| 316 | field @NonNull public static final android.os.Parcelable.Creator<android.nearby.PresenceDevice> CREATOR; |
| 317 | } |
| 318 | |
| 319 | public static final class PresenceDevice.Builder { |
Wei Wang | 88c4844 | 2022-03-05 12:14:12 -0800 | [diff] [blame] | 320 | ctor public PresenceDevice.Builder(@NonNull String, @NonNull byte[], @NonNull byte[], @NonNull byte[]); |
Wei Wang | b15b5a8 | 2022-02-01 17:08:08 -0800 | [diff] [blame] | 321 | method @NonNull public android.nearby.PresenceDevice.Builder addExtendedProperty(@NonNull android.nearby.DataElement); |
| 322 | method @NonNull public android.nearby.PresenceDevice.Builder addMedium(int); |
| 323 | method @NonNull public android.nearby.PresenceDevice build(); |
Wei Wang | b15b5a8 | 2022-02-01 17:08:08 -0800 | [diff] [blame] | 324 | method @NonNull public android.nearby.PresenceDevice.Builder setDeviceImageUrl(@Nullable String); |
| 325 | method @NonNull public android.nearby.PresenceDevice.Builder setDeviceType(int); |
| 326 | method @NonNull public android.nearby.PresenceDevice.Builder setDiscoveryTimestampMillis(long); |
Wei Wang | b15b5a8 | 2022-02-01 17:08:08 -0800 | [diff] [blame] | 327 | method @NonNull public android.nearby.PresenceDevice.Builder setName(@Nullable String); |
| 328 | method @NonNull public android.nearby.PresenceDevice.Builder setRssi(int); |
Wei Wang | b15b5a8 | 2022-02-01 17:08:08 -0800 | [diff] [blame] | 329 | } |
| 330 | |
| 331 | public final class PresenceScanFilter extends android.nearby.ScanFilter implements android.os.Parcelable { |
Wei Wang | 24e2cb2 | 2022-03-12 12:15:34 -0800 | [diff] [blame] | 332 | method public int describeContents(); |
Wei Wang | b15b5a8 | 2022-02-01 17:08:08 -0800 | [diff] [blame] | 333 | method @NonNull public java.util.List<android.nearby.PublicCredential> getCredentials(); |
| 334 | method @NonNull public java.util.List<android.nearby.DataElement> getExtendedProperties(); |
| 335 | method @NonNull public java.util.List<java.lang.Integer> getPresenceActions(); |
Wei Wang | 24e2cb2 | 2022-03-12 12:15:34 -0800 | [diff] [blame] | 336 | method public void writeToParcel(@NonNull android.os.Parcel, int); |
Wei Wang | b15b5a8 | 2022-02-01 17:08:08 -0800 | [diff] [blame] | 337 | field @NonNull public static final android.os.Parcelable.Creator<android.nearby.PresenceScanFilter> CREATOR; |
| 338 | } |
| 339 | |
| 340 | public static final class PresenceScanFilter.Builder { |
| 341 | ctor public PresenceScanFilter.Builder(); |
| 342 | method @NonNull public android.nearby.PresenceScanFilter.Builder addCredential(@NonNull android.nearby.PublicCredential); |
| 343 | method @NonNull public android.nearby.PresenceScanFilter.Builder addExtendedProperty(@NonNull android.nearby.DataElement); |
| 344 | method @NonNull public android.nearby.PresenceScanFilter.Builder addPresenceAction(@IntRange(from=1, to=255) int); |
| 345 | method @NonNull public android.nearby.PresenceScanFilter build(); |
| 346 | method @NonNull public android.nearby.PresenceScanFilter.Builder setMaxPathLoss(@IntRange(from=0, to=127) int); |
| 347 | } |
| 348 | |
| 349 | public final class PrivateCredential extends android.nearby.PresenceCredential implements android.os.Parcelable { |
Wei Wang | 24e2cb2 | 2022-03-12 12:15:34 -0800 | [diff] [blame] | 350 | method public int describeContents(); |
Wei Wang | b15b5a8 | 2022-02-01 17:08:08 -0800 | [diff] [blame] | 351 | method @NonNull public String getDeviceName(); |
| 352 | method @NonNull public byte[] getMetadataEncryptionKey(); |
Wei Wang | 24e2cb2 | 2022-03-12 12:15:34 -0800 | [diff] [blame] | 353 | method public void writeToParcel(@NonNull android.os.Parcel, int); |
Wei Wang | b15b5a8 | 2022-02-01 17:08:08 -0800 | [diff] [blame] | 354 | field @NonNull public static final android.os.Parcelable.Creator<android.nearby.PrivateCredential> CREATOR; |
| 355 | } |
| 356 | |
| 357 | public static final class PrivateCredential.Builder { |
Wei Wang | 24e2cb2 | 2022-03-12 12:15:34 -0800 | [diff] [blame] | 358 | ctor public PrivateCredential.Builder(@NonNull byte[], @NonNull byte[], @NonNull byte[], @NonNull String); |
Wei Wang | b15b5a8 | 2022-02-01 17:08:08 -0800 | [diff] [blame] | 359 | method @NonNull public android.nearby.PrivateCredential.Builder addCredentialElement(@NonNull android.nearby.CredentialElement); |
| 360 | method @NonNull public android.nearby.PrivateCredential build(); |
Wei Wang | b15b5a8 | 2022-02-01 17:08:08 -0800 | [diff] [blame] | 361 | method @NonNull public android.nearby.PrivateCredential.Builder setIdentityType(int); |
Wei Wang | b15b5a8 | 2022-02-01 17:08:08 -0800 | [diff] [blame] | 362 | } |
| 363 | |
| 364 | public final class PublicCredential extends android.nearby.PresenceCredential implements android.os.Parcelable { |
Wei Wang | 24e2cb2 | 2022-03-12 12:15:34 -0800 | [diff] [blame] | 365 | method public int describeContents(); |
Wei Wang | b15b5a8 | 2022-02-01 17:08:08 -0800 | [diff] [blame] | 366 | method @NonNull public byte[] getEncryptedMetadata(); |
| 367 | method @NonNull public byte[] getEncryptedMetadataKeyTag(); |
| 368 | method @NonNull public byte[] getPublicKey(); |
Wei Wang | 24e2cb2 | 2022-03-12 12:15:34 -0800 | [diff] [blame] | 369 | method public void writeToParcel(@NonNull android.os.Parcel, int); |
Wei Wang | b15b5a8 | 2022-02-01 17:08:08 -0800 | [diff] [blame] | 370 | field @NonNull public static final android.os.Parcelable.Creator<android.nearby.PublicCredential> CREATOR; |
| 371 | } |
| 372 | |
| 373 | public static final class PublicCredential.Builder { |
Wei Wang | 24e2cb2 | 2022-03-12 12:15:34 -0800 | [diff] [blame] | 374 | 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] | 375 | method @NonNull public android.nearby.PublicCredential.Builder addCredentialElement(@NonNull android.nearby.CredentialElement); |
| 376 | method @NonNull public android.nearby.PublicCredential build(); |
Wei Wang | b15b5a8 | 2022-02-01 17:08:08 -0800 | [diff] [blame] | 377 | method @NonNull public android.nearby.PublicCredential.Builder setIdentityType(int); |
Wei Wang | b15b5a8 | 2022-02-01 17:08:08 -0800 | [diff] [blame] | 378 | } |
| 379 | |
Remi NGUYEN VAN | 51935fc | 2022-01-07 13:18:54 +0900 | [diff] [blame] | 380 | public interface ScanCallback { |
| 381 | method public void onDiscovered(@NonNull android.nearby.NearbyDevice); |
| 382 | method public void onLost(@NonNull android.nearby.NearbyDevice); |
| 383 | method public void onUpdated(@NonNull android.nearby.NearbyDevice); |
| 384 | } |
| 385 | |
Wei Wang | 24e2cb2 | 2022-03-12 12:15:34 -0800 | [diff] [blame] | 386 | public abstract class ScanFilter { |
Wei Wang | b15b5a8 | 2022-02-01 17:08:08 -0800 | [diff] [blame] | 387 | method @IntRange(from=0, to=127) public int getMaxPathLoss(); |
| 388 | method public int getType(); |
Wei Wang | b15b5a8 | 2022-02-01 17:08:08 -0800 | [diff] [blame] | 389 | } |
| 390 | |
Remi NGUYEN VAN | 51935fc | 2022-01-07 13:18:54 +0900 | [diff] [blame] | 391 | public final class ScanRequest implements android.os.Parcelable { |
| 392 | method public int describeContents(); |
Wei Wang | b15b5a8 | 2022-02-01 17:08:08 -0800 | [diff] [blame] | 393 | method @NonNull public java.util.List<android.nearby.ScanFilter> getScanFilters(); |
Remi NGUYEN VAN | 51935fc | 2022-01-07 13:18:54 +0900 | [diff] [blame] | 394 | method public int getScanMode(); |
| 395 | method public int getScanType(); |
| 396 | method @NonNull public android.os.WorkSource getWorkSource(); |
Xinyi Zhou | ff98750 | 2022-03-09 17:38:41 -0800 | [diff] [blame] | 397 | method public boolean isBleEnabled(); |
Remi NGUYEN VAN | 51935fc | 2022-01-07 13:18:54 +0900 | [diff] [blame] | 398 | method public static boolean isValidScanMode(int); |
| 399 | method public static boolean isValidScanType(int); |
| 400 | method @NonNull public static String scanModeToString(int); |
| 401 | method public void writeToParcel(@NonNull android.os.Parcel, int); |
| 402 | field @NonNull public static final android.os.Parcelable.Creator<android.nearby.ScanRequest> CREATOR; |
| 403 | field public static final int SCAN_MODE_BALANCED = 1; // 0x1 |
| 404 | field public static final int SCAN_MODE_LOW_LATENCY = 2; // 0x2 |
| 405 | field public static final int SCAN_MODE_LOW_POWER = 0; // 0x0 |
| 406 | field public static final int SCAN_MODE_NO_POWER = -1; // 0xffffffff |
Remi NGUYEN VAN | 51935fc | 2022-01-07 13:18:54 +0900 | [diff] [blame] | 407 | field public static final int SCAN_TYPE_FAST_PAIR = 1; // 0x1 |
Chun Zhang | e4440de | 2022-03-24 22:40:56 -0700 | [diff] [blame] | 408 | field public static final int SCAN_TYPE_NEARBY_PRESENCE = 2; // 0x2 |
Remi NGUYEN VAN | 51935fc | 2022-01-07 13:18:54 +0900 | [diff] [blame] | 409 | } |
| 410 | |
| 411 | public static final class ScanRequest.Builder { |
| 412 | ctor public ScanRequest.Builder(); |
Wei Wang | b15b5a8 | 2022-02-01 17:08:08 -0800 | [diff] [blame] | 413 | 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] | 414 | method @NonNull public android.nearby.ScanRequest build(); |
Xinyi Zhou | ff98750 | 2022-03-09 17:38:41 -0800 | [diff] [blame] | 415 | method @NonNull public android.nearby.ScanRequest.Builder setBleEnabled(boolean); |
Remi NGUYEN VAN | 51935fc | 2022-01-07 13:18:54 +0900 | [diff] [blame] | 416 | method @NonNull public android.nearby.ScanRequest.Builder setScanMode(int); |
| 417 | method @NonNull public android.nearby.ScanRequest.Builder setScanType(int); |
| 418 | method @NonNull @RequiresPermission(android.Manifest.permission.UPDATE_DEVICE_STATS) public android.nearby.ScanRequest.Builder setWorkSource(@Nullable android.os.WorkSource); |
| 419 | } |
| 420 | |
| 421 | } |
| 422 | |
Aaron Huang | 68ca373 | 2022-01-06 19:30:43 +0800 | [diff] [blame] | 423 | package android.net { |
| 424 | |
Xiao Ma | eaaf7d3 | 2022-01-23 16:14:51 +0000 | [diff] [blame] | 425 | public class EthernetManager { |
Patrick Rohr | fa376a5 | 2022-03-16 20:16:09 +0100 | [diff] [blame] | 426 | 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>); |
| 427 | 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] | 428 | 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] | 429 | 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] | 430 | } |
| 431 | |
| 432 | public static interface EthernetManager.TetheredInterfaceCallback { |
| 433 | method public void onAvailable(@NonNull String); |
| 434 | method public void onUnavailable(); |
| 435 | } |
| 436 | |
| 437 | public static class EthernetManager.TetheredInterfaceRequest { |
| 438 | method public void release(); |
| 439 | } |
| 440 | |
| 441 | public final class EthernetNetworkManagementException extends java.lang.RuntimeException implements android.os.Parcelable { |
| 442 | ctor public EthernetNetworkManagementException(@NonNull String); |
| 443 | method public int describeContents(); |
| 444 | method public void writeToParcel(@NonNull android.os.Parcel, int); |
| 445 | field @NonNull public static final android.os.Parcelable.Creator<android.net.EthernetNetworkManagementException> CREATOR; |
| 446 | } |
| 447 | |
| 448 | public final class EthernetNetworkUpdateRequest implements android.os.Parcelable { |
| 449 | method public int describeContents(); |
Patrick Rohr | 8a910f4 | 2022-03-16 20:07:23 +0100 | [diff] [blame] | 450 | method @Nullable public android.net.IpConfiguration getIpConfiguration(); |
Xiao Ma | eaaf7d3 | 2022-01-23 16:14:51 +0000 | [diff] [blame] | 451 | method @Nullable public android.net.NetworkCapabilities getNetworkCapabilities(); |
| 452 | method public void writeToParcel(@NonNull android.os.Parcel, int); |
| 453 | field @NonNull public static final android.os.Parcelable.Creator<android.net.EthernetNetworkUpdateRequest> CREATOR; |
| 454 | } |
| 455 | |
| 456 | public static final class EthernetNetworkUpdateRequest.Builder { |
| 457 | ctor public EthernetNetworkUpdateRequest.Builder(); |
| 458 | ctor public EthernetNetworkUpdateRequest.Builder(@NonNull android.net.EthernetNetworkUpdateRequest); |
| 459 | method @NonNull public android.net.EthernetNetworkUpdateRequest build(); |
Patrick Rohr | 8a910f4 | 2022-03-16 20:07:23 +0100 | [diff] [blame] | 460 | method @NonNull public android.net.EthernetNetworkUpdateRequest.Builder setIpConfiguration(@Nullable android.net.IpConfiguration); |
Xiao Ma | eaaf7d3 | 2022-01-23 16:14:51 +0000 | [diff] [blame] | 461 | method @NonNull public android.net.EthernetNetworkUpdateRequest.Builder setNetworkCapabilities(@Nullable android.net.NetworkCapabilities); |
| 462 | } |
| 463 | |
Yan Yan | f8063e3 | 2022-02-08 19:26:29 -0800 | [diff] [blame] | 464 | public class IpSecManager { |
Aaron Huang | 68ca373 | 2022-01-06 19:30:43 +0800 | [diff] [blame] | 465 | 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; |
| 466 | 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; |
| 467 | } |
| 468 | |
| 469 | public static final class IpSecManager.IpSecTunnelInterface implements java.lang.AutoCloseable { |
| 470 | method @RequiresPermission(android.Manifest.permission.MANAGE_IPSEC_TUNNELS) public void addAddress(@NonNull java.net.InetAddress, int) throws java.io.IOException; |
| 471 | method public void close(); |
| 472 | method @NonNull public String getInterfaceName(); |
| 473 | method @RequiresPermission(android.Manifest.permission.MANAGE_IPSEC_TUNNELS) public void removeAddress(@NonNull java.net.InetAddress, int) throws java.io.IOException; |
| 474 | method @RequiresPermission(android.Manifest.permission.MANAGE_IPSEC_TUNNELS) public void setUnderlyingNetwork(@NonNull android.net.Network) throws java.io.IOException; |
| 475 | } |
| 476 | |
| 477 | public static class IpSecTransform.Builder { |
| 478 | 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; |
| 479 | } |
| 480 | |
Junyu Lai | 2ef865e | 2022-01-17 11:52:57 +0000 | [diff] [blame] | 481 | public final class NetworkStats implements java.lang.Iterable<android.net.NetworkStats.Entry> android.os.Parcelable { |
| 482 | ctor public NetworkStats(long, int); |
| 483 | method @NonNull public android.net.NetworkStats add(@NonNull android.net.NetworkStats); |
| 484 | method @NonNull public android.net.NetworkStats addEntry(@NonNull android.net.NetworkStats.Entry); |
| 485 | method public int describeContents(); |
Junyu Lai | 2ef865e | 2022-01-17 11:52:57 +0000 | [diff] [blame] | 486 | method @NonNull public android.net.NetworkStats subtract(@NonNull android.net.NetworkStats); |
| 487 | method public void writeToParcel(@NonNull android.os.Parcel, int); |
| 488 | field @NonNull public static final android.os.Parcelable.Creator<android.net.NetworkStats> CREATOR; |
| 489 | field public static final int DEFAULT_NETWORK_ALL = -1; // 0xffffffff |
| 490 | field public static final int DEFAULT_NETWORK_NO = 0; // 0x0 |
| 491 | field public static final int DEFAULT_NETWORK_YES = 1; // 0x1 |
| 492 | field public static final String IFACE_VT = "vt_data0"; |
| 493 | field public static final int METERED_ALL = -1; // 0xffffffff |
| 494 | field public static final int METERED_NO = 0; // 0x0 |
| 495 | field public static final int METERED_YES = 1; // 0x1 |
| 496 | field public static final int ROAMING_ALL = -1; // 0xffffffff |
| 497 | field public static final int ROAMING_NO = 0; // 0x0 |
| 498 | field public static final int ROAMING_YES = 1; // 0x1 |
| 499 | field public static final int SET_ALL = -1; // 0xffffffff |
| 500 | field public static final int SET_DEFAULT = 0; // 0x0 |
| 501 | field public static final int SET_FOREGROUND = 1; // 0x1 |
| 502 | field public static final int TAG_NONE = 0; // 0x0 |
| 503 | field public static final int UID_ALL = -1; // 0xffffffff |
| 504 | field public static final int UID_TETHERING = -5; // 0xfffffffb |
| 505 | } |
| 506 | |
| 507 | public static class NetworkStats.Entry { |
| 508 | ctor public NetworkStats.Entry(@Nullable String, int, int, int, int, int, int, long, long, long, long, long); |
Junyu Lai | 2ef865e | 2022-01-17 11:52:57 +0000 | [diff] [blame] | 509 | } |
| 510 | |
| 511 | public class TrafficStats { |
| 512 | method public static void setThreadStatsTagApp(); |
| 513 | method public static void setThreadStatsTagBackup(); |
Junyu Lai | 2ef865e | 2022-01-17 11:52:57 +0000 | [diff] [blame] | 514 | method public static void setThreadStatsTagRestore(); |
| 515 | field public static final int TAG_NETWORK_STACK_IMPERSONATION_RANGE_END = -113; // 0xffffff8f |
| 516 | field public static final int TAG_NETWORK_STACK_IMPERSONATION_RANGE_START = -128; // 0xffffff80 |
| 517 | field public static final int TAG_NETWORK_STACK_RANGE_END = -257; // 0xfffffeff |
| 518 | field public static final int TAG_NETWORK_STACK_RANGE_START = -768; // 0xfffffd00 |
| 519 | field public static final int TAG_SYSTEM_IMPERSONATION_RANGE_END = -241; // 0xffffff0f |
| 520 | field public static final int TAG_SYSTEM_IMPERSONATION_RANGE_START = -256; // 0xffffff00 |
| 521 | } |
| 522 | |
| 523 | } |
| 524 | |
| 525 | package android.net.netstats.provider { |
| 526 | |
| 527 | public abstract class NetworkStatsProvider { |
| 528 | ctor public NetworkStatsProvider(); |
| 529 | method public void notifyAlertReached(); |
| 530 | method public void notifyLimitReached(); |
| 531 | method public void notifyStatsUpdated(int, @NonNull android.net.NetworkStats, @NonNull android.net.NetworkStats); |
| 532 | method public void notifyWarningReached(); |
| 533 | method public abstract void onRequestStatsUpdate(int); |
| 534 | method public abstract void onSetAlert(long); |
| 535 | method public abstract void onSetLimit(@NonNull String, long); |
| 536 | method public void onSetWarningAndLimit(@NonNull String, long, long); |
| 537 | field public static final int QUOTA_UNLIMITED = -1; // 0xffffffff |
| 538 | } |
| 539 | |
Aaron Huang | 68ca373 | 2022-01-06 19:30:43 +0800 | [diff] [blame] | 540 | } |
| 541 | |