Merge "Support query cancellation for async DNS API"
diff --git a/Android.bp b/Android.bp
index ec3a4ea..02fc062 100644
--- a/Android.bp
+++ b/Android.bp
@@ -696,10 +696,6 @@
"android.hardware.radio-V1.2-java",
"android.hardware.radio-V1.3-java",
"android.hardware.radio-V1.4-java",
- "android.hardware.radio.config-V1.0-java",
- "android.hardware.radio.config-V1.1-java",
- "android.hardware.radio.config-V1.2-java",
- "android.hardware.radio.deprecated-V1.0-java",
"android.hardware.thermal-V1.0-java-constants",
"android.hardware.tv.input-V1.0-java-constants",
"android.hardware.usb-V1.0-java-constants",
@@ -709,8 +705,6 @@
"android.hardware.vibrator-V1.1-java",
"android.hardware.vibrator-V1.2-java",
"android.hardware.wifi-V1.0-java-constants",
- "networkstack-aidl-framework-java",
- "netd_aidl_parcelables-java",
],
required: [
@@ -820,61 +814,26 @@
output_extension: "srcjar",
}
-// AIDL interfaces between the core system and the networking mainline module.
-aidl_interface {
- name: "networkstack-aidl-interfaces",
- local_include_dir: "core/java",
+filegroup {
+ name: "framework-annotations",
srcs: [
- "core/java/android/net/ApfCapabilitiesParcelable.aidl",
- "core/java/android/net/DhcpResultsParcelable.aidl",
- "core/java/android/net/INetworkMonitor.aidl",
- "core/java/android/net/INetworkMonitorCallbacks.aidl",
- "core/java/android/net/INetworkStackConnector.aidl",
- "core/java/android/net/INetworkStackStatusCallback.aidl",
- "core/java/android/net/InitialConfigurationParcelable.aidl",
- "core/java/android/net/IpPrefixParcelable.aidl",
- "core/java/android/net/LinkAddressParcelable.aidl",
- "core/java/android/net/LinkPropertiesParcelable.aidl",
- "core/java/android/net/NetworkParcelable.aidl",
- "core/java/android/net/PrivateDnsConfigParcel.aidl",
- "core/java/android/net/ProvisioningConfigurationParcelable.aidl",
- "core/java/android/net/ProxyInfoParcelable.aidl",
- "core/java/android/net/RouteInfoParcelable.aidl",
- "core/java/android/net/StaticIpConfigurationParcelable.aidl",
- "core/java/android/net/TcpKeepalivePacketDataParcelable.aidl",
- "core/java/android/net/dhcp/DhcpServingParamsParcel.aidl",
- "core/java/android/net/dhcp/IDhcpServer.aidl",
- "core/java/android/net/dhcp/IDhcpServerCallbacks.aidl",
- "core/java/android/net/ip/IIpClient.aidl",
- "core/java/android/net/ip/IIpClientCallbacks.aidl",
- ],
- api_dir: "aidl/networkstack",
-}
-
-aidl_interface {
- name: "networkstack-aidl-framework",
- local_include_dir: "core/java",
- srcs: [
- "core/java/android/net/TcpKeepalivePacketDataParcelable.aidl",
- "core/java/android/net/IIpMemoryStore.aidl",
- "core/java/android/net/ipmemorystore/**/*.aidl",
- ],
- api_dir: "aidl/networkstack",
+ "core/java/android/annotation/NonNull.java",
+ "core/java/android/annotation/Nullable.java",
+ "core/java/android/annotation/IntDef.java",
+ "core/java/android/annotation/IntRange.java",
+ "core/java/android/annotation/UnsupportedAppUsage.java",
+ "core/java/com/android/internal/annotations/GuardedBy.java",
+ "core/java/com/android/internal/annotations/VisibleForTesting.java",
+ ]
}
filegroup {
name: "framework-networkstack-shared-srcs",
srcs: [
// TODO: remove these annotations as soon as we can use andoid.support.annotations.*
- "core/java/android/annotation/NonNull.java",
- "core/java/android/annotation/Nullable.java",
- "core/java/android/annotation/IntDef.java",
- "core/java/android/annotation/IntRange.java",
- "core/java/android/annotation/UnsupportedAppUsage.java",
+ ":framework-annotations",
"core/java/android/net/DhcpResults.java",
"core/java/android/util/LocalLog.java",
- "core/java/com/android/internal/annotations/GuardedBy.java",
- "core/java/com/android/internal/annotations/VisibleForTesting.java",
"core/java/com/android/internal/util/HexDump.java",
"core/java/com/android/internal/util/IndentingPrintWriter.java",
"core/java/com/android/internal/util/IState.java",
@@ -1061,6 +1020,7 @@
"core/java/android/annotation/Nullable.java",
"core/java/android/annotation/SystemApi.java",
"core/java/android/annotation/TestApi.java",
+ "core/java/android/annotation/UnsupportedAppUsage.java",
"core/java/android/os/HwBinder.java",
"core/java/android/os/HwBlob.java",
"core/java/android/os/HwParcel.java",
diff --git a/api/current.txt b/api/current.txt
index 7ba503c..e740b85 100755
--- a/api/current.txt
+++ b/api/current.txt
@@ -6451,7 +6451,7 @@
method @Nullable public String[] getAccountTypesWithManagementDisabled();
method @Nullable public java.util.List<android.content.ComponentName> getActiveAdmins();
method @NonNull public java.util.Set<java.lang.String> getAffiliationIds(@NonNull android.content.ComponentName);
- method @Nullable public java.util.List<java.lang.String> getAlwaysOnVpnLockdownWhitelist(@NonNull android.content.ComponentName);
+ method @Nullable public java.util.Set<java.lang.String> getAlwaysOnVpnLockdownWhitelist(@NonNull android.content.ComponentName);
method @Nullable public String getAlwaysOnVpnPackage(@NonNull android.content.ComponentName);
method @WorkerThread @NonNull public android.os.Bundle getApplicationRestrictions(@Nullable android.content.ComponentName, String);
method @Deprecated @Nullable public String getApplicationRestrictionsManagingPackage(@NonNull android.content.ComponentName);
@@ -6559,7 +6559,7 @@
method public void setAccountManagementDisabled(@NonNull android.content.ComponentName, String, boolean);
method public void setAffiliationIds(@NonNull android.content.ComponentName, @NonNull java.util.Set<java.lang.String>);
method public void setAlwaysOnVpnPackage(@NonNull android.content.ComponentName, @Nullable String, boolean) throws android.content.pm.PackageManager.NameNotFoundException;
- method public void setAlwaysOnVpnPackage(@NonNull android.content.ComponentName, @Nullable String, boolean, @Nullable java.util.List<java.lang.String>) throws android.content.pm.PackageManager.NameNotFoundException;
+ method public void setAlwaysOnVpnPackage(@NonNull android.content.ComponentName, @Nullable String, boolean, @Nullable java.util.Set<java.lang.String>) throws android.content.pm.PackageManager.NameNotFoundException;
method public boolean setApplicationHidden(@NonNull android.content.ComponentName, String, boolean);
method @WorkerThread public void setApplicationRestrictions(@Nullable android.content.ComponentName, String, android.os.Bundle);
method @Deprecated public void setApplicationRestrictionsManagingPackage(@NonNull android.content.ComponentName, @Nullable String) throws android.content.pm.PackageManager.NameNotFoundException;
@@ -27348,16 +27348,25 @@
}
public final class LinkProperties implements android.os.Parcelable {
+ ctor public LinkProperties();
+ method public boolean addRoute(@NonNull android.net.RouteInfo);
+ method public void clear();
method public int describeContents();
- method public java.util.List<java.net.InetAddress> getDnsServers();
- method public String getDomains();
- method public android.net.ProxyInfo getHttpProxy();
+ method @NonNull public java.util.List<java.net.InetAddress> getDnsServers();
+ method @Nullable public String getDomains();
+ method @Nullable public android.net.ProxyInfo getHttpProxy();
method @Nullable public String getInterfaceName();
- method public java.util.List<android.net.LinkAddress> getLinkAddresses();
+ method @NonNull public java.util.List<android.net.LinkAddress> getLinkAddresses();
method public int getMtu();
method @Nullable public String getPrivateDnsServerName();
- method public java.util.List<android.net.RouteInfo> getRoutes();
+ method @NonNull public java.util.List<android.net.RouteInfo> getRoutes();
method public boolean isPrivateDnsActive();
+ method public void setDnsServers(@NonNull java.util.Collection<java.net.InetAddress>);
+ method public void setDomains(@Nullable String);
+ method public void setHttpProxy(@Nullable android.net.ProxyInfo);
+ method public void setInterfaceName(@Nullable String);
+ method public void setLinkAddresses(@NonNull java.util.Collection<android.net.LinkAddress>);
+ method public void setMtu(int);
method public void writeToParcel(android.os.Parcel, int);
field public static final android.os.Parcelable.Creator<android.net.LinkProperties> CREATOR;
}
@@ -27465,6 +27474,7 @@
method public int describeContents();
method public int getLinkDownstreamBandwidthKbps();
method public int getLinkUpstreamBandwidthKbps();
+ method public int getSignalStrength();
method @Nullable public android.net.TransportInfo getTransportInfo();
method public boolean hasCapability(int);
method public boolean hasTransport(int);
@@ -27493,6 +27503,7 @@
field public static final int NET_CAPABILITY_VALIDATED = 16; // 0x10
field public static final int NET_CAPABILITY_WIFI_P2P = 6; // 0x6
field public static final int NET_CAPABILITY_XCAP = 9; // 0x9
+ field public static final int SIGNAL_STRENGTH_UNSPECIFIED = -2147483648; // 0x80000000
field public static final int TRANSPORT_BLUETOOTH = 2; // 0x2
field public static final int TRANSPORT_CELLULAR = 0; // 0x0
field public static final int TRANSPORT_ETHERNET = 3; // 0x3
@@ -27504,7 +27515,7 @@
@Deprecated public class NetworkInfo implements android.os.Parcelable {
method @Deprecated public int describeContents();
- method @Deprecated public android.net.NetworkInfo.DetailedState getDetailedState();
+ method @Deprecated @NonNull public android.net.NetworkInfo.DetailedState getDetailedState();
method @Deprecated public String getExtraInfo();
method @Deprecated public String getReason();
method @Deprecated public android.net.NetworkInfo.State getState();
@@ -40424,12 +40435,12 @@
method public static java.io.FileDescriptor accept(java.io.FileDescriptor, java.net.InetSocketAddress) throws android.system.ErrnoException, java.net.SocketException;
method public static boolean access(String, int) throws android.system.ErrnoException;
method public static void bind(java.io.FileDescriptor, java.net.InetAddress, int) throws android.system.ErrnoException, java.net.SocketException;
- method public static void bind(java.io.FileDescriptor, java.net.SocketAddress) throws android.system.ErrnoException, java.net.SocketException;
+ method public static void bind(@NonNull java.io.FileDescriptor, @NonNull java.net.SocketAddress) throws android.system.ErrnoException, java.net.SocketException;
method public static void chmod(String, int) throws android.system.ErrnoException;
method public static void chown(String, int, int) throws android.system.ErrnoException;
method public static void close(java.io.FileDescriptor) throws android.system.ErrnoException;
method public static void connect(java.io.FileDescriptor, java.net.InetAddress, int) throws android.system.ErrnoException, java.net.SocketException;
- method public static void connect(java.io.FileDescriptor, java.net.SocketAddress) throws android.system.ErrnoException, java.net.SocketException;
+ method public static void connect(@NonNull java.io.FileDescriptor, @NonNull java.net.SocketAddress) throws android.system.ErrnoException, java.net.SocketException;
method public static java.io.FileDescriptor dup(java.io.FileDescriptor) throws android.system.ErrnoException;
method public static java.io.FileDescriptor dup2(java.io.FileDescriptor, int) throws android.system.ErrnoException;
method public static String[] environ();
@@ -40494,7 +40505,7 @@
method public static long sendfile(java.io.FileDescriptor, java.io.FileDescriptor, android.system.Int64Ref, long) throws android.system.ErrnoException;
method public static int sendto(java.io.FileDescriptor, java.nio.ByteBuffer, int, java.net.InetAddress, int) throws android.system.ErrnoException, java.net.SocketException;
method public static int sendto(java.io.FileDescriptor, byte[], int, int, int, java.net.InetAddress, int) throws android.system.ErrnoException, java.net.SocketException;
- method public static int sendto(java.io.FileDescriptor, byte[], int, int, int, java.net.SocketAddress) throws android.system.ErrnoException, java.net.SocketException;
+ method public static int sendto(@NonNull java.io.FileDescriptor, @NonNull byte[], int, int, int, @Nullable java.net.SocketAddress) throws android.system.ErrnoException, java.net.SocketException;
method @Deprecated public static void setegid(int) throws android.system.ErrnoException;
method public static void setenv(String, String, boolean) throws android.system.ErrnoException;
method @Deprecated public static void seteuid(int) throws android.system.ErrnoException;
@@ -42202,6 +42213,7 @@
field public static final String KEY_EDITABLE_ENHANCED_4G_LTE_BOOL = "editable_enhanced_4g_lte_bool";
field public static final String KEY_EDITABLE_VOICEMAIL_NUMBER_BOOL = "editable_voicemail_number_bool";
field public static final String KEY_EDITABLE_VOICEMAIL_NUMBER_SETTING_BOOL = "editable_voicemail_number_setting_bool";
+ field public static final String KEY_EMERGENCY_NUMBER_PREFIX_STRING_ARRAY = "emergency_number_prefix_string_array";
field public static final String KEY_ENABLE_DIALER_KEY_VIBRATION_BOOL = "enable_dialer_key_vibration_bool";
field public static final String KEY_ENHANCED_4G_LTE_ON_BY_DEFAULT_BOOL = "enhanced_4g_lte_on_by_default_bool";
field public static final String KEY_FORCE_HOME_NETWORK_BOOL = "force_home_network_bool";
@@ -42351,12 +42363,12 @@
}
public final class CellIdentityNr extends android.telephony.CellIdentity {
- method public String getMccString();
- method public String getMncString();
+ method @Nullable public String getMccString();
+ method @Nullable public String getMncString();
method public long getNci();
- method public int getNrarfcn();
- method public int getPci();
- method public int getTac();
+ method @IntRange(from=0, to=3279165) public int getNrarfcn();
+ method @IntRange(from=0, to=1007) public int getPci();
+ method @IntRange(from=0, to=65535) public int getTac();
method public void writeToParcel(android.os.Parcel, int);
field public static final android.os.Parcelable.Creator<android.telephony.CellIdentityNr> CREATOR;
}
@@ -42370,7 +42382,7 @@
method @Nullable public String getMobileNetworkOperator();
method public int getUarfcn();
method public void writeToParcel(android.os.Parcel, int);
- field public static final android.os.Parcelable.Creator<android.telephony.CellIdentityTdscdma> CREATOR;
+ field @NonNull public static final android.os.Parcelable.Creator<android.telephony.CellIdentityTdscdma> CREATOR;
}
public final class CellIdentityWcdma extends android.telephony.CellIdentity {
@@ -42423,12 +42435,19 @@
}
public final class CellInfoNr extends android.telephony.CellInfo {
- method public android.telephony.CellIdentity getCellIdentity();
- method public android.telephony.CellSignalStrength getCellSignalStrength();
+ method @NonNull public android.telephony.CellIdentity getCellIdentity();
+ method @NonNull public android.telephony.CellSignalStrength getCellSignalStrength();
method public void writeToParcel(android.os.Parcel, int);
field public static final android.os.Parcelable.Creator<android.telephony.CellInfoNr> CREATOR;
}
+ public final class CellInfoTdscdma extends android.telephony.CellInfo implements android.os.Parcelable {
+ method @NonNull public android.telephony.CellIdentityTdscdma getCellIdentity();
+ method @NonNull public android.telephony.CellSignalStrengthTdscdma getCellSignalStrength();
+ method public void writeToParcel(android.os.Parcel, int);
+ field @NonNull public static final android.os.Parcelable.Creator<android.telephony.CellInfoTdscdma> CREATOR;
+ }
+
public final class CellInfoWcdma extends android.telephony.CellInfo implements android.os.Parcelable {
method public android.telephony.CellIdentityWcdma getCellIdentity();
method public android.telephony.CellSignalStrengthWcdma getCellSignalStrength();
@@ -42512,6 +42531,16 @@
field public static final android.os.Parcelable.Creator<android.telephony.CellSignalStrengthNr> CREATOR;
}
+ public final class CellSignalStrengthTdscdma extends android.telephony.CellSignalStrength implements android.os.Parcelable {
+ method public int describeContents();
+ method public int getAsuLevel();
+ method public int getDbm();
+ method public int getLevel();
+ method public int getRscp();
+ method public void writeToParcel(android.os.Parcel, int);
+ field @NonNull public static final android.os.Parcelable.Creator<android.telephony.CellSignalStrengthTdscdma> CREATOR;
+ }
+
public final class CellSignalStrengthWcdma extends android.telephony.CellSignalStrength implements android.os.Parcelable {
method public int describeContents();
method public int getAsuLevel();
@@ -43046,14 +43075,14 @@
method @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) @WorkerThread public android.os.PersistableBundle getCarrierConfig();
method public int getCarrierIdFromSimMccMnc();
method @Deprecated @RequiresPermission(android.Manifest.permission.ACCESS_FINE_LOCATION) public android.telephony.CellLocation getCellLocation();
- method @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) @Nullable public java.util.Map<java.lang.Integer,java.util.List<android.telephony.emergency.EmergencyNumber>> getCurrentEmergencyNumberList();
- method @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) @Nullable public java.util.Map<java.lang.Integer,java.util.List<android.telephony.emergency.EmergencyNumber>> getCurrentEmergencyNumberList(int);
method public int getDataActivity();
method @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) public int getDataNetworkType();
method public int getDataState();
method @Deprecated @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) public String getDeviceId();
method @Deprecated @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) public String getDeviceId(int);
method @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) public String getDeviceSoftwareVersion();
+ method @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) @NonNull public java.util.Map<java.lang.Integer,java.util.List<android.telephony.emergency.EmergencyNumber>> getEmergencyNumberList();
+ method @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) @NonNull public java.util.Map<java.lang.Integer,java.util.List<android.telephony.emergency.EmergencyNumber>> getEmergencyNumberList(int);
method @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) public String[] getForbiddenPlmns();
method @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) public String getGroupIdLevel1();
method public String getIccAuthentication(int, int, String);
@@ -43105,11 +43134,11 @@
method public String iccTransmitApduBasicChannel(int, int, int, int, int, String);
method public String iccTransmitApduLogicalChannel(int, int, int, int, int, int, String);
method public boolean isConcurrentVoiceAndDataSupported();
- method public boolean isCurrentEmergencyNumber(@NonNull String);
method @RequiresPermission(anyOf={android.Manifest.permission.ACCESS_NETWORK_STATE, android.Manifest.permission.MODIFY_PHONE_STATE}) public boolean isDataEnabled();
method @RequiresPermission(anyOf={android.Manifest.permission.ACCESS_NETWORK_STATE, android.Manifest.permission.READ_PHONE_STATE}) public boolean isDataRoamingEnabled();
+ method public boolean isEmergencyNumber(@NonNull String);
method public boolean isHearingAidCompatibilitySupported();
- method @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) public boolean isMultisimSupported();
+ method @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) public int isMultiSimSupported();
method public boolean isNetworkRoaming();
method public boolean isRttSupported();
method public boolean isSmsCapable();
@@ -43173,7 +43202,7 @@
field public static final String EXTRA_CARRIER_ID = "android.telephony.extra.CARRIER_ID";
field public static final String EXTRA_CARRIER_NAME = "android.telephony.extra.CARRIER_NAME";
field public static final String EXTRA_HIDE_PUBLIC_SETTINGS = "android.telephony.extra.HIDE_PUBLIC_SETTINGS";
- field public static final String EXTRA_INCOMING_NUMBER = "incoming_number";
+ field @Deprecated public static final String EXTRA_INCOMING_NUMBER = "incoming_number";
field public static final String EXTRA_IS_REFRESH = "android.telephony.extra.IS_REFRESH";
field public static final String EXTRA_LAUNCH_VOICEMAIL_SETTINGS_INTENT = "android.telephony.extra.LAUNCH_VOICEMAIL_SETTINGS_INTENT";
field public static final String EXTRA_NETWORK_COUNTRY = "android.telephony.extra.NETWORK_COUNTRY";
@@ -43188,6 +43217,9 @@
field public static final String EXTRA_SUBSCRIPTION_ID = "android.telephony.extra.SUBSCRIPTION_ID";
field public static final String EXTRA_VOICEMAIL_NUMBER = "android.telephony.extra.VOICEMAIL_NUMBER";
field public static final String METADATA_HIDE_VOICEMAIL_SETTINGS_MENU = "android.telephony.HIDE_VOICEMAIL_SETTINGS_MENU";
+ field public static final int MULTISIM_ALLOWED = 0; // 0x0
+ field public static final int MULTISIM_NOT_SUPPORTED_BY_CARRIER = 2; // 0x2
+ field public static final int MULTISIM_NOT_SUPPORTED_BY_HARDWARE = 1; // 0x1
field public static final int NETWORK_TYPE_1xRTT = 7; // 0x7
field public static final int NETWORK_TYPE_CDMA = 4; // 0x4
field public static final int NETWORK_TYPE_EDGE = 2; // 0x2
@@ -43426,15 +43458,13 @@
public final class EmergencyNumber implements java.lang.Comparable<android.telephony.emergency.EmergencyNumber> android.os.Parcelable {
method public int compareTo(@NonNull android.telephony.emergency.EmergencyNumber);
method public int describeContents();
- method public String getCountryIso();
+ method @NonNull public String getCountryIso();
method public int getEmergencyCallRouting();
- method public int getEmergencyNumberSourceBitmask();
- method public java.util.List<java.lang.Integer> getEmergencyNumberSources();
- method public java.util.List<java.lang.Integer> getEmergencyServiceCategories();
- method public int getEmergencyServiceCategoryBitmask();
+ method @NonNull public java.util.List<java.lang.Integer> getEmergencyNumberSources();
+ method @NonNull public java.util.List<java.lang.Integer> getEmergencyServiceCategories();
method @NonNull public java.util.List<java.lang.String> getEmergencyUrns();
- method public String getMnc();
- method public String getNumber();
+ method @NonNull public String getMnc();
+ method @NonNull public String getNumber();
method public boolean isFromSources(int);
method public boolean isInEmergencyServiceCategories(int);
method public void writeToParcel(android.os.Parcel, int);
diff --git a/api/removed.txt b/api/removed.txt
index d6169cb..72202ad 100644
--- a/api/removed.txt
+++ b/api/removed.txt
@@ -304,17 +304,11 @@
package android.net {
public class ConnectivityManager {
- method @Deprecated public void getLatestTetheringEntitlementValue(int, boolean, @NonNull android.net.ConnectivityManager.TetheringEntitlementValueListener, @Nullable android.os.Handler);
method @Deprecated public boolean requestRouteToHost(int, int);
method @Deprecated public int startUsingNetworkFeature(int, String);
method @Deprecated public int stopUsingNetworkFeature(int, String);
}
- @Deprecated public abstract static class ConnectivityManager.TetheringEntitlementValueListener {
- ctor public ConnectivityManager.TetheringEntitlementValueListener();
- method public void onEntitlementResult(int);
- }
-
@Deprecated public class NetworkBadging {
method @NonNull public static android.graphics.drawable.Drawable getWifiIcon(@IntRange(from=0, to=4) int, int, @Nullable android.content.res.Resources.Theme);
field public static final int BADGING_4K = 30; // 0x1e
diff --git a/api/system-current.txt b/api/system-current.txt
index 849035d..a392cf2 100644
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -3085,8 +3085,8 @@
package android.net {
public class CaptivePortal implements android.os.Parcelable {
- ctor public CaptivePortal(android.os.IBinder);
- method public void logEvent(int, String);
+ ctor public CaptivePortal(@NonNull android.os.IBinder);
+ method public void logEvent(int, @NonNull String);
method public void useNetwork();
field public static final int APP_RETURN_DISMISSED = 0; // 0x0
field public static final int APP_RETURN_UNWANTED = 1; // 0x1
@@ -3102,7 +3102,7 @@
method @RequiresPermission(anyOf={android.Manifest.permission.TETHER_PRIVILEGED, android.Manifest.permission.WRITE_SETTINGS}) public boolean isTetheringSupported();
method @RequiresPermission(android.Manifest.permission.TETHER_PRIVILEGED) public void registerTetheringEventCallback(@NonNull java.util.concurrent.Executor, @NonNull android.net.ConnectivityManager.OnTetheringEventCallback);
method @RequiresPermission(anyOf={"android.permission.NETWORK_SETTINGS", android.Manifest.permission.NETWORK_SETUP_WIZARD, "android.permission.NETWORK_STACK"}) public void setAirplaneMode(boolean);
- method @RequiresPermission(android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK) public void startCaptivePortalApp(android.net.Network, android.os.Bundle);
+ method @RequiresPermission(android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK) public void startCaptivePortalApp(@NonNull android.net.Network, @NonNull android.os.Bundle);
method @RequiresPermission(android.Manifest.permission.TETHER_PRIVILEGED) public void startTethering(int, boolean, android.net.ConnectivityManager.OnStartTetheringCallback);
method @RequiresPermission(android.Manifest.permission.TETHER_PRIVILEGED) public void startTethering(int, boolean, android.net.ConnectivityManager.OnStartTetheringCallback, android.os.Handler);
method @RequiresPermission(android.Manifest.permission.TETHER_PRIVILEGED) public void stopTethering(int);
@@ -3133,65 +3133,55 @@
}
public final class IpPrefix implements android.os.Parcelable {
- ctor public IpPrefix(java.net.InetAddress, int);
- ctor public IpPrefix(String);
+ ctor public IpPrefix(@NonNull java.net.InetAddress, int);
+ ctor public IpPrefix(@NonNull String);
}
public class LinkAddress implements android.os.Parcelable {
ctor public LinkAddress(java.net.InetAddress, int, int, int);
ctor public LinkAddress(@NonNull java.net.InetAddress, int);
ctor public LinkAddress(@NonNull String);
- ctor public LinkAddress(String, int, int);
+ ctor public LinkAddress(@NonNull String, int, int);
method public boolean isGlobalPreferred();
- method public boolean isIPv4();
- method public boolean isIPv6();
- method public boolean isSameAddressAs(android.net.LinkAddress);
+ method public boolean isIpv4();
+ method public boolean isIpv6();
+ method public boolean isSameAddressAs(@Nullable android.net.LinkAddress);
}
public final class LinkProperties implements android.os.Parcelable {
- ctor public LinkProperties();
- ctor public LinkProperties(android.net.LinkProperties);
- method public boolean addDnsServer(java.net.InetAddress);
- method public boolean addLinkAddress(android.net.LinkAddress);
- method public boolean addRoute(android.net.RouteInfo);
- method public void clear();
+ ctor public LinkProperties(@Nullable android.net.LinkProperties);
+ method public boolean addDnsServer(@NonNull java.net.InetAddress);
+ method public boolean addLinkAddress(@NonNull android.net.LinkAddress);
method @Nullable public android.net.IpPrefix getNat64Prefix();
- method public java.util.List<java.net.InetAddress> getPcscfServers();
- method public String getTcpBufferSizes();
- method public java.util.List<java.net.InetAddress> getValidatedPrivateDnsServers();
- method public boolean hasGlobalIPv6Address();
- method public boolean hasIPv4Address();
- method public boolean hasIPv6DefaultRoute();
- method public boolean isIPv4Provisioned();
- method public boolean isIPv6Provisioned();
+ method @NonNull public java.util.List<java.net.InetAddress> getPcscfServers();
+ method @Nullable public String getTcpBufferSizes();
+ method @NonNull public java.util.List<java.net.InetAddress> getValidatedPrivateDnsServers();
+ method public boolean hasGlobalIpv6Address();
+ method public boolean hasIpv4Address();
+ method public boolean hasIpv6DefaultRoute();
+ method public boolean isIpv4Provisioned();
+ method public boolean isIpv6Provisioned();
method public boolean isProvisioned();
- method public boolean isReachable(java.net.InetAddress);
- method public boolean removeDnsServer(java.net.InetAddress);
- method public boolean removeLinkAddress(android.net.LinkAddress);
- method public boolean removeRoute(android.net.RouteInfo);
- method public void setDnsServers(java.util.Collection<java.net.InetAddress>);
- method public void setDomains(String);
- method public void setHttpProxy(android.net.ProxyInfo);
- method public void setInterfaceName(String);
- method public void setLinkAddresses(java.util.Collection<android.net.LinkAddress>);
- method public void setMtu(int);
- method public void setNat64Prefix(android.net.IpPrefix);
- method public void setPcscfServers(java.util.Collection<java.net.InetAddress>);
+ method public boolean isReachable(@NonNull java.net.InetAddress);
+ method public boolean removeDnsServer(@NonNull java.net.InetAddress);
+ method public boolean removeLinkAddress(@NonNull android.net.LinkAddress);
+ method public boolean removeRoute(@NonNull android.net.RouteInfo);
+ method public void setNat64Prefix(@Nullable android.net.IpPrefix);
+ method public void setPcscfServers(@NonNull java.util.Collection<java.net.InetAddress>);
method public void setPrivateDnsServerName(@Nullable String);
- method public void setTcpBufferSizes(String);
+ method public void setTcpBufferSizes(@Nullable String);
method public void setUsePrivateDns(boolean);
- method public void setValidatedPrivateDnsServers(java.util.Collection<java.net.InetAddress>);
+ method public void setValidatedPrivateDnsServers(@NonNull java.util.Collection<java.net.InetAddress>);
}
public class Network implements android.os.Parcelable {
- ctor public Network(android.net.Network);
- method public android.net.Network getPrivateDnsBypassingCopy();
+ ctor public Network(@NonNull android.net.Network);
+ method @NonNull public android.net.Network getPrivateDnsBypassingCopy();
}
public final class NetworkCapabilities implements android.os.Parcelable {
- method public int getSignalStrength();
- method public int[] getTransportTypes();
- method public boolean satisfiedByNetworkCapabilities(android.net.NetworkCapabilities);
+ method @NonNull public int[] getTransportTypes();
+ method public boolean satisfiedByNetworkCapabilities(@Nullable android.net.NetworkCapabilities);
field public static final int NET_CAPABILITY_OEM_PAID = 22; // 0x16
field public static final int NET_CAPABILITY_PARTIAL_CONNECTIVITY = 24; // 0x18
}
@@ -3213,7 +3203,7 @@
}
public static class NetworkRequest.Builder {
- method public android.net.NetworkRequest.Builder setSignalStrength(int);
+ method @NonNull public android.net.NetworkRequest.Builder setSignalStrength(int);
}
public class NetworkScoreManager {
@@ -3237,7 +3227,7 @@
}
public final class RouteInfo implements android.os.Parcelable {
- ctor public RouteInfo(android.net.IpPrefix, java.net.InetAddress, String, int);
+ ctor public RouteInfo(@Nullable android.net.IpPrefix, @Nullable java.net.InetAddress, @Nullable String, int);
method public int getType();
field public static final int RTN_THROW = 9; // 0x9
field public static final int RTN_UNICAST = 1; // 0x1
@@ -3277,18 +3267,18 @@
public final class StaticIpConfiguration implements android.os.Parcelable {
ctor public StaticIpConfiguration();
- ctor public StaticIpConfiguration(android.net.StaticIpConfiguration);
- method public void addDnsServer(java.net.InetAddress);
+ ctor public StaticIpConfiguration(@Nullable android.net.StaticIpConfiguration);
+ method public void addDnsServer(@NonNull java.net.InetAddress);
method public void clear();
method public int describeContents();
- method public java.util.List<java.net.InetAddress> getDnsServers();
- method public String getDomains();
- method public java.net.InetAddress getGateway();
- method public android.net.LinkAddress getIpAddress();
- method public java.util.List<android.net.RouteInfo> getRoutes(String);
- method public void setDomains(String);
- method public void setGateway(java.net.InetAddress);
- method public void setIpAddress(android.net.LinkAddress);
+ method @NonNull public java.util.List<java.net.InetAddress> getDnsServers();
+ method @Nullable public String getDomains();
+ method @Nullable public java.net.InetAddress getGateway();
+ method @Nullable public android.net.LinkAddress getIpAddress();
+ method @NonNull public java.util.List<android.net.RouteInfo> getRoutes(String);
+ method public void setDomains(@Nullable String);
+ method public void setGateway(@Nullable java.net.InetAddress);
+ method public void setIpAddress(@Nullable android.net.LinkAddress);
method public void writeToParcel(android.os.Parcel, int);
field public static final android.os.Parcelable.Creator<android.net.StaticIpConfiguration> CREATOR;
}
@@ -3323,11 +3313,14 @@
package android.net.apf {
- public class ApfCapabilities {
+ public final class ApfCapabilities implements android.os.Parcelable {
ctor public ApfCapabilities(int, int, int);
- method public static boolean getApfDrop8023Frames(android.content.Context);
- method public static int[] getApfEthTypeBlackList(android.content.Context);
+ method public int describeContents();
+ method public static boolean getApfDrop8023Frames(@NonNull android.content.Context);
+ method @NonNull public static int[] getApfEthTypeBlackList(@NonNull android.content.Context);
method public boolean hasDataAccess();
+ method public void writeToParcel(android.os.Parcel, int);
+ field public static final android.os.Parcelable.Creator<android.net.apf.ApfCapabilities> CREATOR;
field public final int apfPacketFormat;
field public final int apfVersionSupported;
field public final int maximumApfProgramSize;
@@ -3339,28 +3332,28 @@
public final class CaptivePortalProbeResult {
ctor public CaptivePortalProbeResult(int);
- ctor public CaptivePortalProbeResult(int, String, String);
- ctor public CaptivePortalProbeResult(int, String, String, android.net.captiveportal.CaptivePortalProbeSpec);
+ ctor public CaptivePortalProbeResult(int, @Nullable String, @Nullable String);
+ ctor public CaptivePortalProbeResult(int, @Nullable String, @Nullable String, @Nullable android.net.captiveportal.CaptivePortalProbeSpec);
method public boolean isFailed();
method public boolean isPartialConnectivity();
method public boolean isPortal();
method public boolean isSuccessful();
- field public static final android.net.captiveportal.CaptivePortalProbeResult FAILED;
+ field @NonNull public static final android.net.captiveportal.CaptivePortalProbeResult FAILED;
field public static final int FAILED_CODE = 599; // 0x257
field public static final android.net.captiveportal.CaptivePortalProbeResult PARTIAL;
field public static final int PORTAL_CODE = 302; // 0x12e
- field public static final android.net.captiveportal.CaptivePortalProbeResult SUCCESS;
+ field @NonNull public static final android.net.captiveportal.CaptivePortalProbeResult SUCCESS;
field public static final int SUCCESS_CODE = 204; // 0xcc
- field public final String detectUrl;
+ field @Nullable public final String detectUrl;
field @Nullable public final android.net.captiveportal.CaptivePortalProbeSpec probeSpec;
- field public final String redirectUrl;
+ field @Nullable public final String redirectUrl;
}
public abstract class CaptivePortalProbeSpec {
- method public String getEncodedSpec();
- method public abstract android.net.captiveportal.CaptivePortalProbeResult getResult(int, @Nullable String);
- method public java.net.URL getUrl();
- method public static java.util.Collection<android.net.captiveportal.CaptivePortalProbeSpec> parseCaptivePortalProbeSpecs(String);
+ method @NonNull public String getEncodedSpec();
+ method @NonNull public abstract android.net.captiveportal.CaptivePortalProbeResult getResult(int, @Nullable String);
+ method @NonNull public java.net.URL getUrl();
+ method @NonNull public static java.util.Collection<android.net.captiveportal.CaptivePortalProbeSpec> parseCaptivePortalProbeSpecs(@NonNull String);
method @Nullable public static android.net.captiveportal.CaptivePortalProbeSpec parseSpecOrNull(@Nullable String);
}
@@ -3371,78 +3364,78 @@
public final class ApfProgramEvent implements android.net.metrics.IpConnectivityLog.Event {
}
- public static class ApfProgramEvent.Builder {
+ public static final class ApfProgramEvent.Builder {
ctor public ApfProgramEvent.Builder();
- method public android.net.metrics.ApfProgramEvent build();
- method public android.net.metrics.ApfProgramEvent.Builder setActualLifetime(long);
- method public android.net.metrics.ApfProgramEvent.Builder setCurrentRas(int);
- method public android.net.metrics.ApfProgramEvent.Builder setFilteredRas(int);
- method public android.net.metrics.ApfProgramEvent.Builder setFlags(boolean, boolean);
- method public android.net.metrics.ApfProgramEvent.Builder setLifetime(long);
- method public android.net.metrics.ApfProgramEvent.Builder setProgramLength(int);
+ method @NonNull public android.net.metrics.ApfProgramEvent build();
+ method @NonNull public android.net.metrics.ApfProgramEvent.Builder setActualLifetime(long);
+ method @NonNull public android.net.metrics.ApfProgramEvent.Builder setCurrentRas(int);
+ method @NonNull public android.net.metrics.ApfProgramEvent.Builder setFilteredRas(int);
+ method @NonNull public android.net.metrics.ApfProgramEvent.Builder setFlags(boolean, boolean);
+ method @NonNull public android.net.metrics.ApfProgramEvent.Builder setLifetime(long);
+ method @NonNull public android.net.metrics.ApfProgramEvent.Builder setProgramLength(int);
}
public final class ApfStats implements android.net.metrics.IpConnectivityLog.Event {
}
- public static class ApfStats.Builder {
+ public static final class ApfStats.Builder {
ctor public ApfStats.Builder();
- method public android.net.metrics.ApfStats build();
- method public android.net.metrics.ApfStats.Builder setDroppedRas(int);
- method public android.net.metrics.ApfStats.Builder setDurationMs(long);
- method public android.net.metrics.ApfStats.Builder setMatchingRas(int);
- method public android.net.metrics.ApfStats.Builder setMaxProgramSize(int);
- method public android.net.metrics.ApfStats.Builder setParseErrors(int);
- method public android.net.metrics.ApfStats.Builder setProgramUpdates(int);
- method public android.net.metrics.ApfStats.Builder setProgramUpdatesAll(int);
- method public android.net.metrics.ApfStats.Builder setProgramUpdatesAllowingMulticast(int);
- method public android.net.metrics.ApfStats.Builder setReceivedRas(int);
- method public android.net.metrics.ApfStats.Builder setZeroLifetimeRas(int);
+ method @NonNull public android.net.metrics.ApfStats build();
+ method @NonNull public android.net.metrics.ApfStats.Builder setDroppedRas(int);
+ method @NonNull public android.net.metrics.ApfStats.Builder setDurationMs(long);
+ method @NonNull public android.net.metrics.ApfStats.Builder setMatchingRas(int);
+ method @NonNull public android.net.metrics.ApfStats.Builder setMaxProgramSize(int);
+ method @NonNull public android.net.metrics.ApfStats.Builder setParseErrors(int);
+ method @NonNull public android.net.metrics.ApfStats.Builder setProgramUpdates(int);
+ method @NonNull public android.net.metrics.ApfStats.Builder setProgramUpdatesAll(int);
+ method @NonNull public android.net.metrics.ApfStats.Builder setProgramUpdatesAllowingMulticast(int);
+ method @NonNull public android.net.metrics.ApfStats.Builder setReceivedRas(int);
+ method @NonNull public android.net.metrics.ApfStats.Builder setZeroLifetimeRas(int);
}
public final class DhcpClientEvent implements android.net.metrics.IpConnectivityLog.Event {
}
- public static class DhcpClientEvent.Builder {
+ public static final class DhcpClientEvent.Builder {
ctor public DhcpClientEvent.Builder();
- method public android.net.metrics.DhcpClientEvent build();
- method public android.net.metrics.DhcpClientEvent.Builder setDurationMs(int);
- method public android.net.metrics.DhcpClientEvent.Builder setMsg(String);
+ method @NonNull public android.net.metrics.DhcpClientEvent build();
+ method @NonNull public android.net.metrics.DhcpClientEvent.Builder setDurationMs(int);
+ method @NonNull public android.net.metrics.DhcpClientEvent.Builder setMsg(String);
}
public final class DhcpErrorEvent implements android.net.metrics.IpConnectivityLog.Event {
ctor public DhcpErrorEvent(int);
method public static int errorCodeWithOption(int, int);
- field public static final int BOOTP_TOO_SHORT;
- field public static final int BUFFER_UNDERFLOW;
- field public static final int DHCP_BAD_MAGIC_COOKIE;
+ field public static final int BOOTP_TOO_SHORT = 67174400; // 0x4010000
+ field public static final int BUFFER_UNDERFLOW = 83951616; // 0x5010000
+ field public static final int DHCP_BAD_MAGIC_COOKIE = 67239936; // 0x4020000
field public static final int DHCP_ERROR = 4; // 0x4
- field public static final int DHCP_INVALID_OPTION_LENGTH;
- field public static final int DHCP_NO_COOKIE;
- field public static final int DHCP_NO_MSG_TYPE;
- field public static final int DHCP_UNKNOWN_MSG_TYPE;
+ field public static final int DHCP_INVALID_OPTION_LENGTH = 67305472; // 0x4030000
+ field public static final int DHCP_NO_COOKIE = 67502080; // 0x4060000
+ field public static final int DHCP_NO_MSG_TYPE = 67371008; // 0x4040000
+ field public static final int DHCP_UNKNOWN_MSG_TYPE = 67436544; // 0x4050000
field public static final int L2_ERROR = 1; // 0x1
- field public static final int L2_TOO_SHORT;
- field public static final int L2_WRONG_ETH_TYPE;
+ field public static final int L2_TOO_SHORT = 16842752; // 0x1010000
+ field public static final int L2_WRONG_ETH_TYPE = 16908288; // 0x1020000
field public static final int L3_ERROR = 2; // 0x2
- field public static final int L3_INVALID_IP;
- field public static final int L3_NOT_IPV4;
- field public static final int L3_TOO_SHORT;
+ field public static final int L3_INVALID_IP = 33751040; // 0x2030000
+ field public static final int L3_NOT_IPV4 = 33685504; // 0x2020000
+ field public static final int L3_TOO_SHORT = 33619968; // 0x2010000
field public static final int L4_ERROR = 3; // 0x3
- field public static final int L4_NOT_UDP;
- field public static final int L4_WRONG_PORT;
+ field public static final int L4_NOT_UDP = 50397184; // 0x3010000
+ field public static final int L4_WRONG_PORT = 50462720; // 0x3020000
field public static final int MISC_ERROR = 5; // 0x5
- field public static final int PARSING_ERROR;
- field public static final int RECEIVE_ERROR;
+ field public static final int PARSING_ERROR = 84082688; // 0x5030000
+ field public static final int RECEIVE_ERROR = 84017152; // 0x5020000
}
public class IpConnectivityLog {
ctor public IpConnectivityLog();
- method public boolean log(long, android.net.metrics.IpConnectivityLog.Event);
- method public boolean log(String, android.net.metrics.IpConnectivityLog.Event);
- method public boolean log(android.net.Network, int[], android.net.metrics.IpConnectivityLog.Event);
- method public boolean log(int, int[], android.net.metrics.IpConnectivityLog.Event);
- method public boolean log(android.net.metrics.IpConnectivityLog.Event);
+ method public boolean log(long, @NonNull android.net.metrics.IpConnectivityLog.Event);
+ method public boolean log(@NonNull String, @NonNull android.net.metrics.IpConnectivityLog.Event);
+ method public boolean log(@NonNull android.net.Network, @NonNull int[], @NonNull android.net.metrics.IpConnectivityLog.Event);
+ method public boolean log(int, @NonNull int[], @NonNull android.net.metrics.IpConnectivityLog.Event);
+ method public boolean log(@NonNull android.net.metrics.IpConnectivityLog.Event);
}
public static interface IpConnectivityLog.Event extends android.os.Parcelable {
@@ -3490,15 +3483,15 @@
public final class RaEvent implements android.net.metrics.IpConnectivityLog.Event {
}
- public static class RaEvent.Builder {
+ public static final class RaEvent.Builder {
ctor public RaEvent.Builder();
- method public android.net.metrics.RaEvent build();
- method public android.net.metrics.RaEvent.Builder updateDnsslLifetime(long);
- method public android.net.metrics.RaEvent.Builder updatePrefixPreferredLifetime(long);
- method public android.net.metrics.RaEvent.Builder updatePrefixValidLifetime(long);
- method public android.net.metrics.RaEvent.Builder updateRdnssLifetime(long);
- method public android.net.metrics.RaEvent.Builder updateRouteInfoLifetime(long);
- method public android.net.metrics.RaEvent.Builder updateRouterLifetime(long);
+ method @NonNull public android.net.metrics.RaEvent build();
+ method @NonNull public android.net.metrics.RaEvent.Builder updateDnsslLifetime(long);
+ method @NonNull public android.net.metrics.RaEvent.Builder updatePrefixPreferredLifetime(long);
+ method @NonNull public android.net.metrics.RaEvent.Builder updatePrefixValidLifetime(long);
+ method @NonNull public android.net.metrics.RaEvent.Builder updateRdnssLifetime(long);
+ method @NonNull public android.net.metrics.RaEvent.Builder updateRouteInfoLifetime(long);
+ method @NonNull public android.net.metrics.RaEvent.Builder updateRouterLifetime(long);
}
public final class ValidationProbeEvent implements android.net.metrics.IpConnectivityLog.Event {
@@ -3513,28 +3506,28 @@
field public static final int PROBE_PRIVDNS = 5; // 0x5
}
- public static class ValidationProbeEvent.Builder {
+ public static final class ValidationProbeEvent.Builder {
ctor public ValidationProbeEvent.Builder();
- method public android.net.metrics.ValidationProbeEvent build();
- method public android.net.metrics.ValidationProbeEvent.Builder setDurationMs(long);
- method public android.net.metrics.ValidationProbeEvent.Builder setProbeType(int, boolean);
- method public android.net.metrics.ValidationProbeEvent.Builder setReturnCode(int);
+ method @NonNull public android.net.metrics.ValidationProbeEvent build();
+ method @NonNull public android.net.metrics.ValidationProbeEvent.Builder setDurationMs(long);
+ method @NonNull public android.net.metrics.ValidationProbeEvent.Builder setProbeType(int, boolean);
+ method @NonNull public android.net.metrics.ValidationProbeEvent.Builder setReturnCode(int);
}
}
package android.net.util {
- public class SocketUtils {
+ public final class SocketUtils {
method public static void addArpEntry(@NonNull java.net.Inet4Address, @NonNull android.net.MacAddress, @NonNull String, @NonNull java.io.FileDescriptor) throws java.io.IOException;
method public static void attachControlPacketFilter(@NonNull java.io.FileDescriptor, int) throws java.net.SocketException;
method public static void attachDhcpFilter(@NonNull java.io.FileDescriptor) throws java.net.SocketException;
method public static void attachRaFilter(@NonNull java.io.FileDescriptor, int) throws java.net.SocketException;
method public static void bindSocketToInterface(@NonNull java.io.FileDescriptor, @NonNull String) throws android.system.ErrnoException;
method public static void closeSocket(@Nullable java.io.FileDescriptor) throws java.io.IOException;
- method public static java.net.SocketAddress makeNetlinkSocketAddress(int, int);
- method public static java.net.SocketAddress makePacketSocketAddress(short, int);
- method public static java.net.SocketAddress makePacketSocketAddress(int, @NonNull byte[]);
+ method @NonNull public static java.net.SocketAddress makeNetlinkSocketAddress(int, int);
+ method @NonNull public static java.net.SocketAddress makePacketSocketAddress(int, int);
+ method @NonNull public static java.net.SocketAddress makePacketSocketAddress(int, @NonNull byte[]);
method public static void setSocketTimeValueOption(@NonNull java.io.FileDescriptor, int, int, long) throws android.system.ErrnoException;
}
@@ -4252,7 +4245,7 @@
}
public class ServiceSpecificException extends java.lang.RuntimeException {
- ctor public ServiceSpecificException(int, String);
+ ctor public ServiceSpecificException(int, @Nullable String);
ctor public ServiceSpecificException(int);
field public final int errorCode;
}
@@ -5586,7 +5579,6 @@
field public static final int ACCESS_BLOCK_ALL = 2088; // 0x828
field public static final int ACCESS_CLASS_DSAC_REJECTION = 2108; // 0x83c
field public static final int ACCESS_CONTROL_LIST_CHECK_FAILURE = 2128; // 0x850
- field public static final int ACCESS_PROBE_LIMIT_REACHED = 2079; // 0x81f
field public static final int ACTIVATION_REJECTED_BCM_VIOLATION = 48; // 0x30
field public static final int ACTIVATION_REJECT_GGSN = 30; // 0x1e
field public static final int ACTIVATION_REJECT_UNSPECIFIED = 31; // 0x1f
@@ -5701,9 +5693,7 @@
field public static final int INVALID_PRIMARY_NSAPI = 2158; // 0x86e
field public static final int INVALID_SIM_STATE = 2224; // 0x8b0
field public static final int INVALID_TRANSACTION_ID = 81; // 0x51
- field public static final int IPV4_CONNECTIONS_LIMIT_REACHED = 2052; // 0x804
field public static final int IPV6_ADDRESS_TRANSFER_FAILED = 2047; // 0x7ff
- field public static final int IPV6_CONNECTIONS_LIMIT_REACHED = 2053; // 0x805
field public static final int IPV6_PREFIX_UNAVAILABLE = 2250; // 0x8ca
field public static final int IP_ADDRESS_MISMATCH = 119; // 0x77
field public static final int IP_VERSION_MISMATCH = 2055; // 0x807
@@ -5722,6 +5712,10 @@
field public static final int MAC_FAILURE = 2183; // 0x887
field public static final int MAXIMIUM_NSAPIS_EXCEEDED = 2157; // 0x86d
field public static final int MAXINUM_SIZE_OF_L2_MESSAGE_EXCEEDED = 2166; // 0x876
+ field public static final int MAX_ACCESS_PROBE = 2079; // 0x81f
+ field public static final int MAX_IPV4_CONNECTIONS = 2052; // 0x804
+ field public static final int MAX_IPV6_CONNECTIONS = 2053; // 0x805
+ field public static final int MAX_PPP_INACTIVITY_TIMER_EXPIRED = 2046; // 0x7fe
field public static final int MESSAGE_INCORRECT_SEMANTIC = 95; // 0x5f
field public static final int MESSAGE_TYPE_UNSUPPORTED = 97; // 0x61
field public static final int MIP_CONFIG_FAILURE = 2050; // 0x802
@@ -5830,7 +5824,6 @@
field public static final int PPP_AUTH_FAILURE = 2229; // 0x8b5
field public static final int PPP_CHAP_FAILURE = 2232; // 0x8b8
field public static final int PPP_CLOSE_IN_PROGRESS = 2233; // 0x8b9
- field public static final int PPP_INACTIVITY_TIMER_EXPIRED = 2046; // 0x7fe
field public static final int PPP_OPTION_MISMATCH = 2230; // 0x8b6
field public static final int PPP_PAP_FAILURE = 2231; // 0x8b7
field public static final int PPP_TIMEOUT = 2228; // 0x8b4
@@ -6031,69 +6024,67 @@
field public static final String MBMS_STREAMING_SERVICE_ACTION = "android.telephony.action.EmbmsStreaming";
}
- public class NetworkRegistrationState implements android.os.Parcelable {
- ctor public NetworkRegistrationState(int, int, int, int, int, boolean, @NonNull int[], @Nullable android.telephony.CellIdentity);
+ public final class NetworkRegistrationInfo implements android.os.Parcelable {
method public int describeContents();
method public int getAccessNetworkTechnology();
- method @NonNull public int[] getAvailableServices();
+ method @NonNull public java.util.List<java.lang.Integer> getAvailableServices();
method @Nullable public android.telephony.CellIdentity getCellIdentity();
method @Nullable public android.telephony.DataSpecificRegistrationStates getDataSpecificStates();
method public int getDomain();
- method public int getRegState();
+ method public int getRegistrationState();
method public int getRejectCause();
method public int getRoamingType();
method public int getTransportType();
method public boolean isEmergencyEnabled();
method public boolean isRoaming();
method public void writeToParcel(android.os.Parcel, int);
- field public static final android.os.Parcelable.Creator<android.telephony.NetworkRegistrationState> CREATOR;
+ field @NonNull public static final android.os.Parcelable.Creator<android.telephony.NetworkRegistrationInfo> CREATOR;
field public static final int DOMAIN_CS = 1; // 0x1
field public static final int DOMAIN_PS = 2; // 0x2
- field public static final int REG_STATE_DENIED = 3; // 0x3
- field public static final int REG_STATE_HOME = 1; // 0x1
- field public static final int REG_STATE_NOT_REG_NOT_SEARCHING = 0; // 0x0
- field public static final int REG_STATE_NOT_REG_SEARCHING = 2; // 0x2
- field public static final int REG_STATE_ROAMING = 5; // 0x5
- field public static final int REG_STATE_UNKNOWN = 4; // 0x4
+ field public static final int REGISTRATION_STATE_DENIED = 3; // 0x3
+ field public static final int REGISTRATION_STATE_HOME = 1; // 0x1
+ field public static final int REGISTRATION_STATE_NOT_REGISTERED_OR_SEARCHING = 0; // 0x0
+ field public static final int REGISTRATION_STATE_NOT_REGISTERED_SEARCHING = 2; // 0x2
+ field public static final int REGISTRATION_STATE_ROAMING = 5; // 0x5
+ field public static final int REGISTRATION_STATE_UNKNOWN = 4; // 0x4
field public static final int SERVICE_TYPE_DATA = 2; // 0x2
field public static final int SERVICE_TYPE_EMERGENCY = 5; // 0x5
field public static final int SERVICE_TYPE_SMS = 3; // 0x3
+ field public static final int SERVICE_TYPE_UNKNOWN = 0; // 0x0
field public static final int SERVICE_TYPE_VIDEO = 4; // 0x4
field public static final int SERVICE_TYPE_VOICE = 1; // 0x1
}
- public static class NetworkRegistrationState.Builder {
- ctor public NetworkRegistrationState.Builder();
- method @NonNull public android.telephony.NetworkRegistrationState build();
- method @NonNull public android.telephony.NetworkRegistrationState.Builder setAccessNetworkTechnology(int);
- method @NonNull public android.telephony.NetworkRegistrationState.Builder setAvailableServices(@NonNull int[]);
- method @NonNull public android.telephony.NetworkRegistrationState.Builder setCellIdentity(@Nullable android.telephony.CellIdentity);
- method @NonNull public android.telephony.NetworkRegistrationState.Builder setDomain(int);
- method @NonNull public android.telephony.NetworkRegistrationState.Builder setEmergencyOnly(boolean);
- method @NonNull public android.telephony.NetworkRegistrationState.Builder setNrStatus(int);
- method @NonNull public android.telephony.NetworkRegistrationState.Builder setRegState(int);
- method @NonNull public android.telephony.NetworkRegistrationState.Builder setRejectCause(int);
- method @NonNull public android.telephony.NetworkRegistrationState.Builder setRoamingType(int);
- method @NonNull public android.telephony.NetworkRegistrationState.Builder setTransportType(int);
+ public static final class NetworkRegistrationInfo.Builder {
+ ctor public NetworkRegistrationInfo.Builder();
+ method @NonNull public android.telephony.NetworkRegistrationInfo build();
+ method @NonNull public android.telephony.NetworkRegistrationInfo.Builder setAccessNetworkTechnology(int);
+ method @NonNull public android.telephony.NetworkRegistrationInfo.Builder setAvailableServices(@NonNull java.util.List<java.lang.Integer>);
+ method @NonNull public android.telephony.NetworkRegistrationInfo.Builder setCellIdentity(@Nullable android.telephony.CellIdentity);
+ method @NonNull public android.telephony.NetworkRegistrationInfo.Builder setDomain(int);
+ method @NonNull public android.telephony.NetworkRegistrationInfo.Builder setEmergencyOnly(boolean);
+ method @NonNull public android.telephony.NetworkRegistrationInfo.Builder setRegistrationState(int);
+ method @NonNull public android.telephony.NetworkRegistrationInfo.Builder setRejectCause(int);
+ method @NonNull public android.telephony.NetworkRegistrationInfo.Builder setTransportType(int);
}
public abstract class NetworkService extends android.app.Service {
ctor public NetworkService();
method public android.os.IBinder onBind(android.content.Intent);
method @Nullable public abstract android.telephony.NetworkService.NetworkServiceProvider onCreateNetworkServiceProvider(int);
- field public static final String NETWORK_SERVICE_INTERFACE = "android.telephony.NetworkService";
+ field public static final String SERVICE_INTERFACE = "android.telephony.NetworkService";
}
public abstract class NetworkService.NetworkServiceProvider implements java.lang.AutoCloseable {
ctor public NetworkService.NetworkServiceProvider(int);
method public abstract void close();
- method public void getNetworkRegistrationState(int, @NonNull android.telephony.NetworkServiceCallback);
method public final int getSlotIndex();
- method public final void notifyNetworkRegistrationStateChanged();
+ method public final void notifyNetworkRegistrationInfoChanged();
+ method public void requestNetworkRegistrationInfo(int, @NonNull android.telephony.NetworkServiceCallback);
}
public class NetworkServiceCallback {
- method public void onGetNetworkRegistrationStateComplete(int, @Nullable android.telephony.NetworkRegistrationState);
+ method public void onRequestNetworkRegistrationInfoComplete(int, @Nullable android.telephony.NetworkRegistrationInfo);
field public static final int RESULT_ERROR_BUSY = 3; // 0x3
field public static final int RESULT_ERROR_FAILED = 5; // 0x5
field public static final int RESULT_ERROR_ILLEGAL_STATE = 4; // 0x4
@@ -6268,12 +6259,10 @@
}
public class ServiceState implements android.os.Parcelable {
- method @Nullable public android.telephony.NetworkRegistrationState getNetworkRegistrationState(int, int);
- method @NonNull public java.util.List<android.telephony.NetworkRegistrationState> getNetworkRegistrationStates();
- method @Deprecated @NonNull public java.util.List<android.telephony.NetworkRegistrationState> getNetworkRegistrationStates(int);
- method @Deprecated @Nullable public android.telephony.NetworkRegistrationState getNetworkRegistrationStates(int, int);
- method @NonNull public java.util.List<android.telephony.NetworkRegistrationState> getNetworkRegistrationStatesForDomain(int);
- method @NonNull public java.util.List<android.telephony.NetworkRegistrationState> getNetworkRegistrationStatesForTransportType(int);
+ method @Nullable public android.telephony.NetworkRegistrationInfo getNetworkRegistrationInfo(int, int);
+ method @NonNull public java.util.List<android.telephony.NetworkRegistrationInfo> getNetworkRegistrationInfoList();
+ method @NonNull public java.util.List<android.telephony.NetworkRegistrationInfo> getNetworkRegistrationInfoListForDomain(int);
+ method @NonNull public java.util.List<android.telephony.NetworkRegistrationInfo> getNetworkRegistrationInfoListForTransportType(int);
field public static final int ROAMING_TYPE_DOMESTIC = 2; // 0x2
field public static final int ROAMING_TYPE_INTERNATIONAL = 3; // 0x3
field public static final int ROAMING_TYPE_NOT_ROAMING = 0; // 0x0
@@ -6385,7 +6374,7 @@
method @Nullable @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public String getIsimIst();
method @NonNull @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public java.util.Map<java.lang.Integer,java.lang.Integer> getLogicalToPhysicalSlotMapping();
method public static long getMaxNumberVerificationTimeoutMillis();
- method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public long getPreferredNetworkTypeBitmap();
+ method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public long getPreferredNetworkTypeBitmask();
method @RequiresPermission(anyOf={android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, android.Manifest.permission.READ_PHONE_STATE}) public int getRadioPowerState();
method public int getSimApplicationState();
method public int getSimCardState();
@@ -6397,10 +6386,14 @@
method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public int getVoiceActivationState();
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean handlePinMmi(String);
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean handlePinMmiForSubscriber(int, String);
- method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isCurrentPotentialEmergencyNumber(@NonNull String);
+ method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean iccCloseLogicalChannelBySlot(int, int);
+ method @Nullable @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public android.telephony.IccOpenLogicalChannelResponse iccOpenLogicalChannelBySlot(int, @Nullable String, int);
+ method @NonNull @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public String iccTransmitApduBasicChannelBySlot(int, int, int, int, int, int, @Nullable String);
+ method @Nullable @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public String iccTransmitApduLogicalChannelBySlot(int, int, int, int, int, int, int, @Nullable String);
method public boolean isDataConnectivityPossible();
method @Deprecated @RequiresPermission(anyOf={android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, android.Manifest.permission.READ_PHONE_STATE}) public boolean isIdle();
method @Deprecated @RequiresPermission(anyOf={android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, android.Manifest.permission.READ_PHONE_STATE}) public boolean isOffhook();
+ method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isPotentialEmergencyNumber(@NonNull String);
method @Deprecated @RequiresPermission(anyOf={android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, android.Manifest.permission.READ_PHONE_STATE}) public boolean isRadioOn();
method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isRebootRequiredForModemConfigChange();
method @Deprecated @RequiresPermission(anyOf={android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, android.Manifest.permission.READ_PHONE_STATE}) public boolean isRinging();
@@ -6417,8 +6410,8 @@
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setDataActivationState(int);
method @Deprecated @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setDataEnabled(int, boolean);
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setDataRoamingEnabled(boolean);
- method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setMultisimCarrierRestriction(boolean);
- method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean setPreferredNetworkTypeBitmap(long);
+ method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setMultiSimCarrierRestriction(boolean);
+ method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean setPreferredNetworkTypeBitmask(long);
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean setRadio(boolean);
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean setRadioPower(boolean);
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setSimPowerState(int);
@@ -6524,72 +6517,111 @@
package android.telephony.data {
public final class DataCallResponse implements android.os.Parcelable {
- ctor public DataCallResponse(int, int, int, int, int, @Nullable String, @Nullable java.util.List<android.net.LinkAddress>, @Nullable java.util.List<java.net.InetAddress>, @Nullable java.util.List<java.net.InetAddress>, @Nullable java.util.List<java.lang.String>, int);
method public int describeContents();
- method public int getActive();
method @NonNull public java.util.List<android.net.LinkAddress> getAddresses();
- method public int getCallId();
- method @NonNull public java.util.List<java.net.InetAddress> getDnses();
- method @NonNull public java.util.List<java.net.InetAddress> getGateways();
- method @NonNull public String getIfname();
+ method public int getCause();
+ method @NonNull public java.util.List<java.net.InetAddress> getDnsAddresses();
+ method @NonNull public java.util.List<java.net.InetAddress> getGatewayAddresses();
+ method public int getId();
+ method @NonNull public String getInterfaceName();
+ method public int getLinkStatus();
method public int getMtu();
- method @NonNull public java.util.List<java.lang.String> getPcscfs();
+ method @NonNull public java.util.List<java.net.InetAddress> getPcscfAddresses();
method public int getProtocolType();
- method public int getStatus();
method public int getSuggestedRetryTime();
method public void writeToParcel(android.os.Parcel, int);
- field public static final android.os.Parcelable.Creator<android.telephony.data.DataCallResponse> CREATOR;
+ field @NonNull public static final android.os.Parcelable.Creator<android.telephony.data.DataCallResponse> CREATOR;
+ field public static final int LINK_STATUS_ACTIVE = 2; // 0x2
+ field public static final int LINK_STATUS_DORMANT = 1; // 0x1
+ field public static final int LINK_STATUS_INACTIVE = 0; // 0x0
+ field public static final int LINK_STATUS_UNKNOWN = -1; // 0xffffffff
+ }
+
+ public static final class DataCallResponse.Builder {
+ ctor public DataCallResponse.Builder();
+ method @NonNull public android.telephony.data.DataCallResponse build();
+ method @NonNull public android.telephony.data.DataCallResponse.Builder setAddresses(@NonNull java.util.List<android.net.LinkAddress>);
+ method @NonNull public android.telephony.data.DataCallResponse.Builder setCause(int);
+ method @NonNull public android.telephony.data.DataCallResponse.Builder setDnsAddresses(@NonNull java.util.List<java.net.InetAddress>);
+ method @NonNull public android.telephony.data.DataCallResponse.Builder setGatewayAddresses(@NonNull java.util.List<java.net.InetAddress>);
+ method @NonNull public android.telephony.data.DataCallResponse.Builder setId(int);
+ method @NonNull public android.telephony.data.DataCallResponse.Builder setInterfaceName(@NonNull String);
+ method @NonNull public android.telephony.data.DataCallResponse.Builder setLinkStatus(int);
+ method @NonNull public android.telephony.data.DataCallResponse.Builder setMtu(int);
+ method @NonNull public android.telephony.data.DataCallResponse.Builder setPcscfAddresses(@NonNull java.util.List<java.net.InetAddress>);
+ method @NonNull public android.telephony.data.DataCallResponse.Builder setProtocolType(int);
+ method @NonNull public android.telephony.data.DataCallResponse.Builder setSuggestedRetryTime(int);
}
public final class DataProfile implements android.os.Parcelable {
- method public String getApn();
+ method public int describeContents();
+ method @NonNull public String getApn();
method public int getAuthType();
- method public int getBearerBitmap();
- method public int getMaxConns();
- method public int getMaxConnsTime();
+ method public int getBearerBitmask();
method public int getMtu();
- method public String getPassword();
+ method @Nullable public String getPassword();
method public int getProfileId();
- method public int getProtocol();
- method public int getRoamingProtocol();
- method public int getSupportedApnTypesBitmap();
+ method public int getProtocolType();
+ method public int getRoamingProtocolType();
+ method public int getSupportedApnTypesBitmask();
method public int getType();
- method public String getUserName();
- method public int getWaitTime();
+ method @Nullable public String getUserName();
method public boolean isEnabled();
method public boolean isPersistent();
method public boolean isPreferred();
+ method public void writeToParcel(android.os.Parcel, int);
+ field @NonNull public static final android.os.Parcelable.Creator<android.telephony.data.DataProfile> CREATOR;
field public static final int TYPE_3GPP = 1; // 0x1
field public static final int TYPE_3GPP2 = 2; // 0x2
field public static final int TYPE_COMMON = 0; // 0x0
}
+ public static final class DataProfile.Builder {
+ ctor public DataProfile.Builder();
+ method @NonNull public android.telephony.data.DataProfile build();
+ method @NonNull public android.telephony.data.DataProfile.Builder enable(boolean);
+ method @NonNull public android.telephony.data.DataProfile.Builder setApn(@NonNull String);
+ method @NonNull public android.telephony.data.DataProfile.Builder setAuthType(int);
+ method @NonNull public android.telephony.data.DataProfile.Builder setBearerBitmask(int);
+ method @NonNull public android.telephony.data.DataProfile.Builder setMtu(int);
+ method @NonNull public android.telephony.data.DataProfile.Builder setPassword(@NonNull String);
+ method @NonNull public android.telephony.data.DataProfile.Builder setPersistent(boolean);
+ method @NonNull public android.telephony.data.DataProfile.Builder setPreferred(boolean);
+ method @NonNull public android.telephony.data.DataProfile.Builder setProfileId(int);
+ method @NonNull public android.telephony.data.DataProfile.Builder setProtocolType(int);
+ method @NonNull public android.telephony.data.DataProfile.Builder setRoamingProtocolType(int);
+ method @NonNull public android.telephony.data.DataProfile.Builder setSupportedApnTypesBitmask(int);
+ method @NonNull public android.telephony.data.DataProfile.Builder setType(int);
+ method @NonNull public android.telephony.data.DataProfile.Builder setUserName(@NonNull String);
+ }
+
public abstract class DataService extends android.app.Service {
ctor public DataService();
method public android.os.IBinder onBind(android.content.Intent);
method @Nullable public abstract android.telephony.data.DataService.DataServiceProvider onCreateDataServiceProvider(int);
- field public static final String DATA_SERVICE_INTERFACE = "android.telephony.data.DataService";
field public static final int REQUEST_REASON_HANDOVER = 3; // 0x3
field public static final int REQUEST_REASON_NORMAL = 1; // 0x1
field public static final int REQUEST_REASON_SHUTDOWN = 2; // 0x2
+ field public static final int REQUEST_REASON_UNKNOWN = 0; // 0x0
+ field public static final String SERVICE_INTERFACE = "android.telephony.data.DataService";
}
public abstract class DataService.DataServiceProvider implements java.lang.AutoCloseable {
ctor public DataService.DataServiceProvider(int);
method public abstract void close();
method public void deactivateDataCall(int, int, @Nullable android.telephony.data.DataServiceCallback);
- method public void getDataCallList(@NonNull android.telephony.data.DataServiceCallback);
method public final int getSlotIndex();
method public final void notifyDataCallListChanged(java.util.List<android.telephony.data.DataCallResponse>);
- method public void setDataProfile(@NonNull java.util.List<android.telephony.data.DataProfile>, boolean, @Nullable android.telephony.data.DataServiceCallback);
- method public void setInitialAttachApn(@NonNull android.telephony.data.DataProfile, boolean, @Nullable android.telephony.data.DataServiceCallback);
- method public void setupDataCall(int, @NonNull android.telephony.data.DataProfile, boolean, boolean, int, @Nullable android.net.LinkProperties, @Nullable android.telephony.data.DataServiceCallback);
+ method public void requestDataCallList(@NonNull android.telephony.data.DataServiceCallback);
+ method public void setDataProfile(@NonNull java.util.List<android.telephony.data.DataProfile>, boolean, @NonNull android.telephony.data.DataServiceCallback);
+ method public void setInitialAttachApn(@NonNull android.telephony.data.DataProfile, boolean, @NonNull android.telephony.data.DataServiceCallback);
+ method public void setupDataCall(int, @NonNull android.telephony.data.DataProfile, boolean, boolean, int, @Nullable android.net.LinkProperties, @NonNull android.telephony.data.DataServiceCallback);
}
public class DataServiceCallback {
method public void onDataCallListChanged(@NonNull java.util.List<android.telephony.data.DataCallResponse>);
method public void onDeactivateDataCallComplete(int);
- method public void onGetDataCallListComplete(int, @NonNull java.util.List<android.telephony.data.DataCallResponse>);
+ method public void onRequestDataCallListComplete(int, @NonNull java.util.List<android.telephony.data.DataCallResponse>);
method public void onSetDataProfileComplete(int);
method public void onSetInitialAttachApnComplete(int);
method public void onSetupDataCallComplete(int, @Nullable android.telephony.data.DataCallResponse);
@@ -6602,15 +6634,15 @@
public abstract class QualifiedNetworksService extends android.app.Service {
ctor public QualifiedNetworksService();
- method @NonNull public abstract android.telephony.data.QualifiedNetworksService.NetworkAvailabilityUpdater createNetworkAvailabilityUpdater(int);
+ method @NonNull public abstract android.telephony.data.QualifiedNetworksService.NetworkAvailabilityProvider onCreateNetworkAvailabilityProvider(int);
field public static final String QUALIFIED_NETWORKS_SERVICE_INTERFACE = "android.telephony.data.QualifiedNetworksService";
}
- public abstract class QualifiedNetworksService.NetworkAvailabilityUpdater implements java.lang.AutoCloseable {
- ctor public QualifiedNetworksService.NetworkAvailabilityUpdater(int);
+ public abstract class QualifiedNetworksService.NetworkAvailabilityProvider implements java.lang.AutoCloseable {
+ ctor public QualifiedNetworksService.NetworkAvailabilityProvider(int);
method public abstract void close();
method public final int getSlotIndex();
- method public final void updateQualifiedNetworkTypes(int, @Nullable int[]);
+ method public final void updateQualifiedNetworkTypes(int, @NonNull java.util.List<java.lang.Integer>);
}
}
@@ -6696,6 +6728,7 @@
field public static final int EUICC_OTA_SUCCEEDED = 3; // 0x3
field public static final String EXTRA_EMBEDDED_SUBSCRIPTION_DOWNLOADABLE_SUBSCRIPTIONS = "android.telephony.euicc.extra.EMBEDDED_SUBSCRIPTION_DOWNLOADABLE_SUBSCRIPTIONS";
field public static final String EXTRA_ENABLE_SUBSCRIPTION = "android.telephony.euicc.extra.ENABLE_SUBSCRIPTION";
+ field public static final String EXTRA_FROM_SUBSCRIPTION_ID = "android.telephony.euicc.extra.FROM_SUBSCRIPTION_ID";
field public static final String EXTRA_SUBSCRIPTION_ID = "android.telephony.euicc.extra.SUBSCRIPTION_ID";
field public static final String EXTRA_SUBSCRIPTION_NICKNAME = "android.telephony.euicc.extra.SUBSCRIPTION_NICKNAME";
}
@@ -6784,7 +6817,7 @@
method public static int getCallTypeFromVideoState(int);
method public int getEmergencyCallRouting();
method public int getEmergencyServiceCategories();
- method public java.util.List<java.lang.String> getEmergencyUrns();
+ method @NonNull public java.util.List<java.lang.String> getEmergencyUrns();
method public android.telephony.ims.ImsStreamMediaProfile getMediaProfile();
method public int getRestrictCause();
method public int getServiceType();
@@ -6802,7 +6835,7 @@
method public void setEmergencyCallRouting(int);
method public void setEmergencyCallTesting(boolean);
method public void setEmergencyServiceCategories(int);
- method public void setEmergencyUrns(java.util.List<java.lang.String>);
+ method public void setEmergencyUrns(@NonNull java.util.List<java.lang.String>);
method public void setHasKnownUserIntentEmergency(boolean);
method public void updateCallExtras(android.telephony.ims.ImsCallProfile);
method public void updateCallType(android.telephony.ims.ImsCallProfile);
@@ -6915,7 +6948,7 @@
field public final java.util.HashMap<java.lang.String,android.os.Bundle> mParticipants;
}
- public class ImsException extends java.lang.Exception {
+ public final class ImsException extends java.lang.Exception {
ctor public ImsException(@Nullable String);
ctor public ImsException(@Nullable String, int);
ctor public ImsException(@Nullable String, int, @Nullable Throwable);
@@ -7446,8 +7479,8 @@
field public static final int STATE_UNAVAILABLE = 0; // 0x0
}
- public static class ImsFeature.Capabilities {
- field protected int mCapabilities;
+ @Deprecated public static class ImsFeature.Capabilities {
+ field @Deprecated protected int mCapabilities;
}
protected static class ImsFeature.CapabilityCallbackProxy {
diff --git a/api/system-removed.txt b/api/system-removed.txt
index 478ec28..2ac7fb9 100644
--- a/api/system-removed.txt
+++ b/api/system-removed.txt
@@ -154,3 +154,11 @@
}
+package android.telephony.data {
+
+ public final class DataCallResponse implements android.os.Parcelable {
+ ctor public DataCallResponse(int, int, int, int, int, @Nullable String, @Nullable java.util.List<android.net.LinkAddress>, @Nullable java.util.List<java.net.InetAddress>, @Nullable java.util.List<java.net.InetAddress>, @Nullable java.util.List<java.net.InetAddress>, int);
+ }
+
+}
+
diff --git a/api/test-current.txt b/api/test-current.txt
index 6372197..3c0a75e 100644
--- a/api/test-current.txt
+++ b/api/test-current.txt
@@ -602,8 +602,8 @@
package android.net {
public class CaptivePortal implements android.os.Parcelable {
- ctor public CaptivePortal(android.os.IBinder);
- method public void logEvent(int, String);
+ ctor public CaptivePortal(@NonNull android.os.IBinder);
+ method public void logEvent(int, @NonNull String);
method public void useNetwork();
field public static final int APP_RETURN_DISMISSED = 0; // 0x0
field public static final int APP_RETURN_UNWANTED = 1; // 0x1
@@ -611,14 +611,14 @@
}
public class ConnectivityManager {
- method @RequiresPermission(android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK) public void startCaptivePortalApp(android.net.Network, android.os.Bundle);
+ method @RequiresPermission(android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK) public void startCaptivePortalApp(@NonNull android.net.Network, @NonNull android.os.Bundle);
field public static final String EXTRA_CAPTIVE_PORTAL_PROBE_SPEC = "android.net.extra.CAPTIVE_PORTAL_PROBE_SPEC";
field public static final String EXTRA_CAPTIVE_PORTAL_USER_AGENT = "android.net.extra.CAPTIVE_PORTAL_USER_AGENT";
}
public final class IpPrefix implements android.os.Parcelable {
- ctor public IpPrefix(java.net.InetAddress, int);
- ctor public IpPrefix(String);
+ ctor public IpPrefix(@NonNull java.net.InetAddress, int);
+ ctor public IpPrefix(@NonNull String);
}
public final class IpSecManager {
@@ -629,48 +629,48 @@
ctor public LinkAddress(java.net.InetAddress, int, int, int);
ctor public LinkAddress(@NonNull java.net.InetAddress, int);
ctor public LinkAddress(@NonNull String);
- ctor public LinkAddress(String, int, int);
+ ctor public LinkAddress(@NonNull String, int, int);
method public boolean isGlobalPreferred();
- method public boolean isIPv4();
- method public boolean isIPv6();
- method public boolean isSameAddressAs(android.net.LinkAddress);
+ method public boolean isIpv4();
+ method public boolean isIpv6();
+ method public boolean isSameAddressAs(@Nullable android.net.LinkAddress);
}
public final class LinkProperties implements android.os.Parcelable {
- ctor public LinkProperties(android.net.LinkProperties);
- method public boolean addDnsServer(java.net.InetAddress);
- method public boolean addLinkAddress(android.net.LinkAddress);
+ ctor public LinkProperties(@Nullable android.net.LinkProperties);
+ method public boolean addDnsServer(@NonNull java.net.InetAddress);
+ method public boolean addLinkAddress(@NonNull android.net.LinkAddress);
method @Nullable public android.net.IpPrefix getNat64Prefix();
- method public java.util.List<java.net.InetAddress> getPcscfServers();
- method public String getTcpBufferSizes();
- method public java.util.List<java.net.InetAddress> getValidatedPrivateDnsServers();
- method public boolean hasGlobalIPv6Address();
- method public boolean hasIPv4Address();
- method public boolean hasIPv6DefaultRoute();
- method public boolean isIPv4Provisioned();
- method public boolean isIPv6Provisioned();
+ method @NonNull public java.util.List<java.net.InetAddress> getPcscfServers();
+ method @Nullable public String getTcpBufferSizes();
+ method @NonNull public java.util.List<java.net.InetAddress> getValidatedPrivateDnsServers();
+ method public boolean hasGlobalIpv6Address();
+ method public boolean hasIpv4Address();
+ method public boolean hasIpv6DefaultRoute();
+ method public boolean isIpv4Provisioned();
+ method public boolean isIpv6Provisioned();
method public boolean isProvisioned();
- method public boolean isReachable(java.net.InetAddress);
- method public boolean removeDnsServer(java.net.InetAddress);
- method public boolean removeLinkAddress(android.net.LinkAddress);
- method public boolean removeRoute(android.net.RouteInfo);
- method public void setNat64Prefix(android.net.IpPrefix);
- method public void setPcscfServers(java.util.Collection<java.net.InetAddress>);
+ method public boolean isReachable(@NonNull java.net.InetAddress);
+ method public boolean removeDnsServer(@NonNull java.net.InetAddress);
+ method public boolean removeLinkAddress(@NonNull android.net.LinkAddress);
+ method public boolean removeRoute(@NonNull android.net.RouteInfo);
+ method public void setNat64Prefix(@Nullable android.net.IpPrefix);
+ method public void setPcscfServers(@NonNull java.util.Collection<java.net.InetAddress>);
method public void setPrivateDnsServerName(@Nullable String);
- method public void setTcpBufferSizes(String);
+ method public void setTcpBufferSizes(@Nullable String);
method public void setUsePrivateDns(boolean);
- method public void setValidatedPrivateDnsServers(java.util.Collection<java.net.InetAddress>);
+ method public void setValidatedPrivateDnsServers(@NonNull java.util.Collection<java.net.InetAddress>);
}
public class Network implements android.os.Parcelable {
- ctor public Network(android.net.Network);
- method public android.net.Network getPrivateDnsBypassingCopy();
+ ctor public Network(@NonNull android.net.Network);
+ method @NonNull public android.net.Network getPrivateDnsBypassingCopy();
}
public final class NetworkCapabilities implements android.os.Parcelable {
method public int[] getCapabilities();
- method public int[] getTransportTypes();
- method public boolean satisfiedByNetworkCapabilities(android.net.NetworkCapabilities);
+ method @NonNull public int[] getTransportTypes();
+ method public boolean satisfiedByNetworkCapabilities(@Nullable android.net.NetworkCapabilities);
field public static final int TRANSPORT_TEST = 7; // 0x7
}
@@ -679,7 +679,7 @@
}
public final class RouteInfo implements android.os.Parcelable {
- ctor public RouteInfo(android.net.IpPrefix, java.net.InetAddress, String, int);
+ ctor public RouteInfo(@Nullable android.net.IpPrefix, @Nullable java.net.InetAddress, @Nullable String, int);
method public int getType();
field public static final int RTN_THROW = 9; // 0x9
field public static final int RTN_UNICAST = 1; // 0x1
@@ -688,18 +688,18 @@
public final class StaticIpConfiguration implements android.os.Parcelable {
ctor public StaticIpConfiguration();
- ctor public StaticIpConfiguration(android.net.StaticIpConfiguration);
- method public void addDnsServer(java.net.InetAddress);
+ ctor public StaticIpConfiguration(@Nullable android.net.StaticIpConfiguration);
+ method public void addDnsServer(@NonNull java.net.InetAddress);
method public void clear();
method public int describeContents();
- method public java.util.List<java.net.InetAddress> getDnsServers();
- method public String getDomains();
- method public java.net.InetAddress getGateway();
- method public android.net.LinkAddress getIpAddress();
- method public java.util.List<android.net.RouteInfo> getRoutes(String);
- method public void setDomains(String);
- method public void setGateway(java.net.InetAddress);
- method public void setIpAddress(android.net.LinkAddress);
+ method @NonNull public java.util.List<java.net.InetAddress> getDnsServers();
+ method @Nullable public String getDomains();
+ method @Nullable public java.net.InetAddress getGateway();
+ method @Nullable public android.net.LinkAddress getIpAddress();
+ method @NonNull public java.util.List<android.net.RouteInfo> getRoutes(String);
+ method public void setDomains(@Nullable String);
+ method public void setGateway(@Nullable java.net.InetAddress);
+ method public void setIpAddress(@Nullable android.net.LinkAddress);
method public void writeToParcel(android.os.Parcel, int);
field public static final android.os.Parcelable.Creator<android.net.StaticIpConfiguration> CREATOR;
}
@@ -733,11 +733,14 @@
package android.net.apf {
- public class ApfCapabilities {
+ public final class ApfCapabilities implements android.os.Parcelable {
ctor public ApfCapabilities(int, int, int);
- method public static boolean getApfDrop8023Frames(android.content.Context);
- method public static int[] getApfEthTypeBlackList(android.content.Context);
+ method public int describeContents();
+ method public static boolean getApfDrop8023Frames(@NonNull android.content.Context);
+ method @NonNull public static int[] getApfEthTypeBlackList(@NonNull android.content.Context);
method public boolean hasDataAccess();
+ method public void writeToParcel(android.os.Parcel, int);
+ field public static final android.os.Parcelable.Creator<android.net.apf.ApfCapabilities> CREATOR;
field public final int apfPacketFormat;
field public final int apfVersionSupported;
field public final int maximumApfProgramSize;
@@ -749,28 +752,28 @@
public final class CaptivePortalProbeResult {
ctor public CaptivePortalProbeResult(int);
- ctor public CaptivePortalProbeResult(int, String, String);
- ctor public CaptivePortalProbeResult(int, String, String, android.net.captiveportal.CaptivePortalProbeSpec);
+ ctor public CaptivePortalProbeResult(int, @Nullable String, @Nullable String);
+ ctor public CaptivePortalProbeResult(int, @Nullable String, @Nullable String, @Nullable android.net.captiveportal.CaptivePortalProbeSpec);
method public boolean isFailed();
method public boolean isPartialConnectivity();
method public boolean isPortal();
method public boolean isSuccessful();
- field public static final android.net.captiveportal.CaptivePortalProbeResult FAILED;
+ field @NonNull public static final android.net.captiveportal.CaptivePortalProbeResult FAILED;
field public static final int FAILED_CODE = 599; // 0x257
field public static final android.net.captiveportal.CaptivePortalProbeResult PARTIAL;
field public static final int PORTAL_CODE = 302; // 0x12e
- field public static final android.net.captiveportal.CaptivePortalProbeResult SUCCESS;
+ field @NonNull public static final android.net.captiveportal.CaptivePortalProbeResult SUCCESS;
field public static final int SUCCESS_CODE = 204; // 0xcc
- field public final String detectUrl;
+ field @Nullable public final String detectUrl;
field @Nullable public final android.net.captiveportal.CaptivePortalProbeSpec probeSpec;
- field public final String redirectUrl;
+ field @Nullable public final String redirectUrl;
}
public abstract class CaptivePortalProbeSpec {
- method public String getEncodedSpec();
- method public abstract android.net.captiveportal.CaptivePortalProbeResult getResult(int, @Nullable String);
- method public java.net.URL getUrl();
- method public static java.util.Collection<android.net.captiveportal.CaptivePortalProbeSpec> parseCaptivePortalProbeSpecs(String);
+ method @NonNull public String getEncodedSpec();
+ method @NonNull public abstract android.net.captiveportal.CaptivePortalProbeResult getResult(int, @Nullable String);
+ method @NonNull public java.net.URL getUrl();
+ method @NonNull public static java.util.Collection<android.net.captiveportal.CaptivePortalProbeSpec> parseCaptivePortalProbeSpecs(@NonNull String);
method @Nullable public static android.net.captiveportal.CaptivePortalProbeSpec parseSpecOrNull(@Nullable String);
}
@@ -781,78 +784,78 @@
public final class ApfProgramEvent implements android.net.metrics.IpConnectivityLog.Event {
}
- public static class ApfProgramEvent.Builder {
+ public static final class ApfProgramEvent.Builder {
ctor public ApfProgramEvent.Builder();
- method public android.net.metrics.ApfProgramEvent build();
- method public android.net.metrics.ApfProgramEvent.Builder setActualLifetime(long);
- method public android.net.metrics.ApfProgramEvent.Builder setCurrentRas(int);
- method public android.net.metrics.ApfProgramEvent.Builder setFilteredRas(int);
- method public android.net.metrics.ApfProgramEvent.Builder setFlags(boolean, boolean);
- method public android.net.metrics.ApfProgramEvent.Builder setLifetime(long);
- method public android.net.metrics.ApfProgramEvent.Builder setProgramLength(int);
+ method @NonNull public android.net.metrics.ApfProgramEvent build();
+ method @NonNull public android.net.metrics.ApfProgramEvent.Builder setActualLifetime(long);
+ method @NonNull public android.net.metrics.ApfProgramEvent.Builder setCurrentRas(int);
+ method @NonNull public android.net.metrics.ApfProgramEvent.Builder setFilteredRas(int);
+ method @NonNull public android.net.metrics.ApfProgramEvent.Builder setFlags(boolean, boolean);
+ method @NonNull public android.net.metrics.ApfProgramEvent.Builder setLifetime(long);
+ method @NonNull public android.net.metrics.ApfProgramEvent.Builder setProgramLength(int);
}
public final class ApfStats implements android.net.metrics.IpConnectivityLog.Event {
}
- public static class ApfStats.Builder {
+ public static final class ApfStats.Builder {
ctor public ApfStats.Builder();
- method public android.net.metrics.ApfStats build();
- method public android.net.metrics.ApfStats.Builder setDroppedRas(int);
- method public android.net.metrics.ApfStats.Builder setDurationMs(long);
- method public android.net.metrics.ApfStats.Builder setMatchingRas(int);
- method public android.net.metrics.ApfStats.Builder setMaxProgramSize(int);
- method public android.net.metrics.ApfStats.Builder setParseErrors(int);
- method public android.net.metrics.ApfStats.Builder setProgramUpdates(int);
- method public android.net.metrics.ApfStats.Builder setProgramUpdatesAll(int);
- method public android.net.metrics.ApfStats.Builder setProgramUpdatesAllowingMulticast(int);
- method public android.net.metrics.ApfStats.Builder setReceivedRas(int);
- method public android.net.metrics.ApfStats.Builder setZeroLifetimeRas(int);
+ method @NonNull public android.net.metrics.ApfStats build();
+ method @NonNull public android.net.metrics.ApfStats.Builder setDroppedRas(int);
+ method @NonNull public android.net.metrics.ApfStats.Builder setDurationMs(long);
+ method @NonNull public android.net.metrics.ApfStats.Builder setMatchingRas(int);
+ method @NonNull public android.net.metrics.ApfStats.Builder setMaxProgramSize(int);
+ method @NonNull public android.net.metrics.ApfStats.Builder setParseErrors(int);
+ method @NonNull public android.net.metrics.ApfStats.Builder setProgramUpdates(int);
+ method @NonNull public android.net.metrics.ApfStats.Builder setProgramUpdatesAll(int);
+ method @NonNull public android.net.metrics.ApfStats.Builder setProgramUpdatesAllowingMulticast(int);
+ method @NonNull public android.net.metrics.ApfStats.Builder setReceivedRas(int);
+ method @NonNull public android.net.metrics.ApfStats.Builder setZeroLifetimeRas(int);
}
public final class DhcpClientEvent implements android.net.metrics.IpConnectivityLog.Event {
}
- public static class DhcpClientEvent.Builder {
+ public static final class DhcpClientEvent.Builder {
ctor public DhcpClientEvent.Builder();
- method public android.net.metrics.DhcpClientEvent build();
- method public android.net.metrics.DhcpClientEvent.Builder setDurationMs(int);
- method public android.net.metrics.DhcpClientEvent.Builder setMsg(String);
+ method @NonNull public android.net.metrics.DhcpClientEvent build();
+ method @NonNull public android.net.metrics.DhcpClientEvent.Builder setDurationMs(int);
+ method @NonNull public android.net.metrics.DhcpClientEvent.Builder setMsg(String);
}
public final class DhcpErrorEvent implements android.net.metrics.IpConnectivityLog.Event {
ctor public DhcpErrorEvent(int);
method public static int errorCodeWithOption(int, int);
- field public static final int BOOTP_TOO_SHORT;
- field public static final int BUFFER_UNDERFLOW;
- field public static final int DHCP_BAD_MAGIC_COOKIE;
+ field public static final int BOOTP_TOO_SHORT = 67174400; // 0x4010000
+ field public static final int BUFFER_UNDERFLOW = 83951616; // 0x5010000
+ field public static final int DHCP_BAD_MAGIC_COOKIE = 67239936; // 0x4020000
field public static final int DHCP_ERROR = 4; // 0x4
- field public static final int DHCP_INVALID_OPTION_LENGTH;
- field public static final int DHCP_NO_COOKIE;
- field public static final int DHCP_NO_MSG_TYPE;
- field public static final int DHCP_UNKNOWN_MSG_TYPE;
+ field public static final int DHCP_INVALID_OPTION_LENGTH = 67305472; // 0x4030000
+ field public static final int DHCP_NO_COOKIE = 67502080; // 0x4060000
+ field public static final int DHCP_NO_MSG_TYPE = 67371008; // 0x4040000
+ field public static final int DHCP_UNKNOWN_MSG_TYPE = 67436544; // 0x4050000
field public static final int L2_ERROR = 1; // 0x1
- field public static final int L2_TOO_SHORT;
- field public static final int L2_WRONG_ETH_TYPE;
+ field public static final int L2_TOO_SHORT = 16842752; // 0x1010000
+ field public static final int L2_WRONG_ETH_TYPE = 16908288; // 0x1020000
field public static final int L3_ERROR = 2; // 0x2
- field public static final int L3_INVALID_IP;
- field public static final int L3_NOT_IPV4;
- field public static final int L3_TOO_SHORT;
+ field public static final int L3_INVALID_IP = 33751040; // 0x2030000
+ field public static final int L3_NOT_IPV4 = 33685504; // 0x2020000
+ field public static final int L3_TOO_SHORT = 33619968; // 0x2010000
field public static final int L4_ERROR = 3; // 0x3
- field public static final int L4_NOT_UDP;
- field public static final int L4_WRONG_PORT;
+ field public static final int L4_NOT_UDP = 50397184; // 0x3010000
+ field public static final int L4_WRONG_PORT = 50462720; // 0x3020000
field public static final int MISC_ERROR = 5; // 0x5
- field public static final int PARSING_ERROR;
- field public static final int RECEIVE_ERROR;
+ field public static final int PARSING_ERROR = 84082688; // 0x5030000
+ field public static final int RECEIVE_ERROR = 84017152; // 0x5020000
}
public class IpConnectivityLog {
ctor public IpConnectivityLog();
- method public boolean log(long, android.net.metrics.IpConnectivityLog.Event);
- method public boolean log(String, android.net.metrics.IpConnectivityLog.Event);
- method public boolean log(android.net.Network, int[], android.net.metrics.IpConnectivityLog.Event);
- method public boolean log(int, int[], android.net.metrics.IpConnectivityLog.Event);
- method public boolean log(android.net.metrics.IpConnectivityLog.Event);
+ method public boolean log(long, @NonNull android.net.metrics.IpConnectivityLog.Event);
+ method public boolean log(@NonNull String, @NonNull android.net.metrics.IpConnectivityLog.Event);
+ method public boolean log(@NonNull android.net.Network, @NonNull int[], @NonNull android.net.metrics.IpConnectivityLog.Event);
+ method public boolean log(int, @NonNull int[], @NonNull android.net.metrics.IpConnectivityLog.Event);
+ method public boolean log(@NonNull android.net.metrics.IpConnectivityLog.Event);
}
public static interface IpConnectivityLog.Event extends android.os.Parcelable {
@@ -900,15 +903,15 @@
public final class RaEvent implements android.net.metrics.IpConnectivityLog.Event {
}
- public static class RaEvent.Builder {
+ public static final class RaEvent.Builder {
ctor public RaEvent.Builder();
- method public android.net.metrics.RaEvent build();
- method public android.net.metrics.RaEvent.Builder updateDnsslLifetime(long);
- method public android.net.metrics.RaEvent.Builder updatePrefixPreferredLifetime(long);
- method public android.net.metrics.RaEvent.Builder updatePrefixValidLifetime(long);
- method public android.net.metrics.RaEvent.Builder updateRdnssLifetime(long);
- method public android.net.metrics.RaEvent.Builder updateRouteInfoLifetime(long);
- method public android.net.metrics.RaEvent.Builder updateRouterLifetime(long);
+ method @NonNull public android.net.metrics.RaEvent build();
+ method @NonNull public android.net.metrics.RaEvent.Builder updateDnsslLifetime(long);
+ method @NonNull public android.net.metrics.RaEvent.Builder updatePrefixPreferredLifetime(long);
+ method @NonNull public android.net.metrics.RaEvent.Builder updatePrefixValidLifetime(long);
+ method @NonNull public android.net.metrics.RaEvent.Builder updateRdnssLifetime(long);
+ method @NonNull public android.net.metrics.RaEvent.Builder updateRouteInfoLifetime(long);
+ method @NonNull public android.net.metrics.RaEvent.Builder updateRouterLifetime(long);
}
public final class ValidationProbeEvent implements android.net.metrics.IpConnectivityLog.Event {
@@ -923,28 +926,28 @@
field public static final int PROBE_PRIVDNS = 5; // 0x5
}
- public static class ValidationProbeEvent.Builder {
+ public static final class ValidationProbeEvent.Builder {
ctor public ValidationProbeEvent.Builder();
- method public android.net.metrics.ValidationProbeEvent build();
- method public android.net.metrics.ValidationProbeEvent.Builder setDurationMs(long);
- method public android.net.metrics.ValidationProbeEvent.Builder setProbeType(int, boolean);
- method public android.net.metrics.ValidationProbeEvent.Builder setReturnCode(int);
+ method @NonNull public android.net.metrics.ValidationProbeEvent build();
+ method @NonNull public android.net.metrics.ValidationProbeEvent.Builder setDurationMs(long);
+ method @NonNull public android.net.metrics.ValidationProbeEvent.Builder setProbeType(int, boolean);
+ method @NonNull public android.net.metrics.ValidationProbeEvent.Builder setReturnCode(int);
}
}
package android.net.util {
- public class SocketUtils {
+ public final class SocketUtils {
method public static void addArpEntry(@NonNull java.net.Inet4Address, @NonNull android.net.MacAddress, @NonNull String, @NonNull java.io.FileDescriptor) throws java.io.IOException;
method public static void attachControlPacketFilter(@NonNull java.io.FileDescriptor, int) throws java.net.SocketException;
method public static void attachDhcpFilter(@NonNull java.io.FileDescriptor) throws java.net.SocketException;
method public static void attachRaFilter(@NonNull java.io.FileDescriptor, int) throws java.net.SocketException;
method public static void bindSocketToInterface(@NonNull java.io.FileDescriptor, @NonNull String) throws android.system.ErrnoException;
method public static void closeSocket(@Nullable java.io.FileDescriptor) throws java.io.IOException;
- method public static java.net.SocketAddress makeNetlinkSocketAddress(int, int);
- method public static java.net.SocketAddress makePacketSocketAddress(short, int);
- method public static java.net.SocketAddress makePacketSocketAddress(int, @NonNull byte[]);
+ method @NonNull public static java.net.SocketAddress makeNetlinkSocketAddress(int, int);
+ method @NonNull public static java.net.SocketAddress makePacketSocketAddress(int, int);
+ method @NonNull public static java.net.SocketAddress makePacketSocketAddress(int, @NonNull byte[]);
method public static void setSocketTimeValueOption(@NonNull java.io.FileDescriptor, int, int, long) throws android.system.ErrnoException;
}
diff --git a/cmds/statsd/src/atoms.proto b/cmds/statsd/src/atoms.proto
index 47eccdb..2a9f248 100644
--- a/cmds/statsd/src/atoms.proto
+++ b/cmds/statsd/src/atoms.proto
@@ -1714,6 +1714,9 @@
// HCI reason code associated with this event
// Default: STATUS_UNKNOWN
optional android.bluetooth.hci.StatusEnum reason_code = 6;
+ // A status value related to this specific event
+ // Default: 0
+ optional int64 event_value = 7;
}
/**
diff --git a/config/hiddenapi-greylist.txt b/config/hiddenapi-greylist.txt
index 0959462..c3d057b 100644
--- a/config/hiddenapi-greylist.txt
+++ b/config/hiddenapi-greylist.txt
@@ -378,232 +378,17 @@
Landroid/net/wifi/IWifiScanner$Stub;->asInterface(Landroid/os/IBinder;)Landroid/net/wifi/IWifiScanner;
Landroid/net/wifi/p2p/IWifiP2pManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/net/wifi/p2p/IWifiP2pManager;
Landroid/nfc/INfcAdapter$Stub;->TRANSACTION_enable:I
-Landroid/os/AsyncResult;-><init>(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Throwable;)V
-Landroid/os/AsyncResult;->exception:Ljava/lang/Throwable;
-Landroid/os/AsyncResult;->forMessage(Landroid/os/Message;)Landroid/os/AsyncResult;
-Landroid/os/AsyncResult;->forMessage(Landroid/os/Message;Ljava/lang/Object;Ljava/lang/Throwable;)Landroid/os/AsyncResult;
-Landroid/os/AsyncResult;->result:Ljava/lang/Object;
-Landroid/os/AsyncResult;->userObj:Ljava/lang/Object;
-Landroid/os/AsyncTask;->mFuture:Ljava/util/concurrent/FutureTask;
-Landroid/os/AsyncTask;->mStatus:Landroid/os/AsyncTask$Status;
-Landroid/os/AsyncTask;->mTaskInvoked:Ljava/util/concurrent/atomic/AtomicBoolean;
-Landroid/os/AsyncTask;->mWorker:Landroid/os/AsyncTask$WorkerRunnable;
-Landroid/os/AsyncTask;->sDefaultExecutor:Ljava/util/concurrent/Executor;
-Landroid/os/AsyncTask;->setDefaultExecutor(Ljava/util/concurrent/Executor;)V
-Landroid/os/BaseBundle;->isParcelled()Z
-Landroid/os/BaseBundle;->mMap:Landroid/util/ArrayMap;
-Landroid/os/BaseBundle;->mParcelledData:Landroid/os/Parcel;
-Landroid/os/BaseBundle;->unparcel()V
-Landroid/os/BatteryManager;->EXTRA_CHARGE_COUNTER:Ljava/lang/String;
-Landroid/os/BatteryManager;->EXTRA_INVALID_CHARGER:Ljava/lang/String;
-Landroid/os/BatteryManager;->EXTRA_MAX_CHARGING_CURRENT:Ljava/lang/String;
-Landroid/os/BatteryManager;->EXTRA_MAX_CHARGING_VOLTAGE:Ljava/lang/String;
-Landroid/os/BatteryStats$Counter;->getCountLocked(I)I
-Landroid/os/BatteryStats$HistoryItem;-><init>()V
-Landroid/os/BatteryStats$HistoryItem;->batteryHealth:B
-Landroid/os/BatteryStats$HistoryItem;->batteryLevel:B
-Landroid/os/BatteryStats$HistoryItem;->batteryPlugType:B
-Landroid/os/BatteryStats$HistoryItem;->batteryStatus:B
-Landroid/os/BatteryStats$HistoryItem;->batteryVoltage:C
-Landroid/os/BatteryStats$HistoryItem;->cmd:B
-Landroid/os/BatteryStats$HistoryItem;->CMD_UPDATE:B
-Landroid/os/BatteryStats$HistoryItem;->states2:I
-Landroid/os/BatteryStats$HistoryItem;->states:I
-Landroid/os/BatteryStats$HistoryItem;->time:J
-Landroid/os/BatteryStats$Timer;->getCountLocked(I)I
-Landroid/os/BatteryStats$Timer;->getTotalTimeLocked(JI)J
-Landroid/os/BatteryStats$Uid$Pkg$Serv;->getLaunches(I)I
-Landroid/os/BatteryStats$Uid$Pkg$Serv;->getStarts(I)I
-Landroid/os/BatteryStats$Uid$Pkg$Serv;->getStartTime(JI)J
-Landroid/os/BatteryStats$Uid$Pkg;->getServiceStats()Landroid/util/ArrayMap;
-Landroid/os/BatteryStats$Uid$Pkg;->getWakeupAlarmStats()Landroid/util/ArrayMap;
Landroid/os/BatteryStats$Uid$Proc$ExcessivePower;-><init>()V
-Landroid/os/BatteryStats$Uid$Proc$ExcessivePower;->overTime:J
-Landroid/os/BatteryStats$Uid$Proc$ExcessivePower;->type:I
-Landroid/os/BatteryStats$Uid$Proc$ExcessivePower;->usedTime:J
-Landroid/os/BatteryStats$Uid$Proc;->countExcessivePowers()I
-Landroid/os/BatteryStats$Uid$Proc;->getExcessivePower(I)Landroid/os/BatteryStats$Uid$Proc$ExcessivePower;
-Landroid/os/BatteryStats$Uid$Proc;->getForegroundTime(I)J
-Landroid/os/BatteryStats$Uid$Proc;->getStarts(I)I
-Landroid/os/BatteryStats$Uid$Proc;->getSystemTime(I)J
-Landroid/os/BatteryStats$Uid$Proc;->getUserTime(I)J
-Landroid/os/BatteryStats$Uid$Sensor;->getHandle()I
-Landroid/os/BatteryStats$Uid$Sensor;->getSensorTime()Landroid/os/BatteryStats$Timer;
-Landroid/os/BatteryStats$Uid$Sensor;->GPS:I
-Landroid/os/BatteryStats$Uid$Wakelock;->getWakeTime(I)Landroid/os/BatteryStats$Timer;
Landroid/os/BatteryStats$Uid;-><init>()V
-Landroid/os/BatteryStats$Uid;->getAudioTurnedOnTimer()Landroid/os/BatteryStats$Timer;
-Landroid/os/BatteryStats$Uid;->getFullWifiLockTime(JI)J
-Landroid/os/BatteryStats$Uid;->getMobileRadioActiveTime(I)J
-Landroid/os/BatteryStats$Uid;->getNetworkActivityBytes(II)J
-Landroid/os/BatteryStats$Uid;->getPackageStats()Landroid/util/ArrayMap;
-Landroid/os/BatteryStats$Uid;->getProcessStats()Landroid/util/ArrayMap;
-Landroid/os/BatteryStats$Uid;->getSensorStats()Landroid/util/SparseArray;
-Landroid/os/BatteryStats$Uid;->getUid()I
-Landroid/os/BatteryStats$Uid;->getVideoTurnedOnTimer()Landroid/os/BatteryStats$Timer;
-Landroid/os/BatteryStats$Uid;->getWakelockStats()Landroid/util/ArrayMap;
-Landroid/os/BatteryStats$Uid;->getWifiBatchedScanTime(IJI)J
-Landroid/os/BatteryStats$Uid;->getWifiMulticastTime(JI)J
-Landroid/os/BatteryStats$Uid;->getWifiRunningTime(JI)J
-Landroid/os/BatteryStats$Uid;->getWifiScanTime(JI)J
-Landroid/os/BatteryStats;->computeBatteryRealtime(JI)J
-Landroid/os/BatteryStats;->computeBatteryTimeRemaining(J)J
-Landroid/os/BatteryStats;->computeBatteryUptime(JI)J
-Landroid/os/BatteryStats;->computeChargeTimeRemaining(J)J
-Landroid/os/BatteryStats;->dumpLine(Ljava/io/PrintWriter;ILjava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)V
-Landroid/os/BatteryStats;->getBatteryUptime(J)J
-Landroid/os/BatteryStats;->getGlobalWifiRunningTime(JI)J
-Landroid/os/BatteryStats;->getNextHistoryLocked(Landroid/os/BatteryStats$HistoryItem;)Z
-Landroid/os/BatteryStats;->getPhoneOnTime(JI)J
-Landroid/os/BatteryStats;->getPhoneSignalStrengthTime(IJI)J
-Landroid/os/BatteryStats;->getScreenBrightnessTime(IJI)J
-Landroid/os/BatteryStats;->getScreenOnTime(JI)J
-Landroid/os/BatteryStats;->getUidStats()Landroid/util/SparseArray;
-Landroid/os/BatteryStats;->getWifiOnTime(JI)J
-Landroid/os/BatteryStats;->NUM_DATA_CONNECTION_TYPES:I
-Landroid/os/BatteryStats;->NUM_SCREEN_BRIGHTNESS_BINS:I
-Landroid/os/BatteryStats;->startIteratingHistoryLocked()Z
-Landroid/os/BatteryStats;->STATS_CURRENT:I
-Landroid/os/BatteryStats;->WAKE_TYPE_PARTIAL:I
-Landroid/os/Binder;->execTransact(IJJI)Z
-Landroid/os/Binder;->mObject:J
-Landroid/os/Broadcaster;-><init>()V
-Landroid/os/Broadcaster;->broadcast(Landroid/os/Message;)V
-Landroid/os/Broadcaster;->cancelRequest(ILandroid/os/Handler;I)V
-Landroid/os/Broadcaster;->request(ILandroid/os/Handler;I)V
-Landroid/os/Build$VERSION;->ACTIVE_CODENAMES:[Ljava/lang/String;
-Landroid/os/Build;->getLong(Ljava/lang/String;)J
-Landroid/os/Build;->getString(Ljava/lang/String;)Ljava/lang/String;
-Landroid/os/Build;->IS_DEBUGGABLE:Z
-Landroid/os/Build;->IS_EMULATOR:Z
-Landroid/os/Bundle;->filterValues()Landroid/os/Bundle;
-Landroid/os/Bundle;->forPair(Ljava/lang/String;Ljava/lang/String;)Landroid/os/Bundle;
-Landroid/os/Bundle;->getIBinder(Ljava/lang/String;)Landroid/os/IBinder;
-Landroid/os/Bundle;->getSize()I
-Landroid/os/Bundle;->putIBinder(Ljava/lang/String;Landroid/os/IBinder;)V
-Landroid/os/Bundle;->putParcelableList(Ljava/lang/String;Ljava/util/List;)V
-Landroid/os/Bundle;->setDefusable(Landroid/os/Bundle;Z)Landroid/os/Bundle;
-Landroid/os/Debug$MemoryInfo;->dalvikPrivateClean:I
-Landroid/os/Debug$MemoryInfo;->dalvikRss:I
-Landroid/os/Debug$MemoryInfo;->dalvikSharedClean:I
-Landroid/os/Debug$MemoryInfo;->dalvikSwappablePss:I
-Landroid/os/Debug$MemoryInfo;->dalvikSwappedOut:I
-Landroid/os/Debug$MemoryInfo;->dalvikSwappedOutPss:I
-Landroid/os/Debug$MemoryInfo;->getOtherLabel(I)Ljava/lang/String;
-Landroid/os/Debug$MemoryInfo;->getOtherPrivate(I)I
-Landroid/os/Debug$MemoryInfo;->getOtherPrivateDirty(I)I
-Landroid/os/Debug$MemoryInfo;->getOtherPss(I)I
-Landroid/os/Debug$MemoryInfo;->getOtherSharedDirty(I)I
-Landroid/os/Debug$MemoryInfo;->getSummaryCode()I
-Landroid/os/Debug$MemoryInfo;->getSummaryGraphics()I
-Landroid/os/Debug$MemoryInfo;->getSummaryJavaHeap()I
-Landroid/os/Debug$MemoryInfo;->getSummaryNativeHeap()I
-Landroid/os/Debug$MemoryInfo;->getSummaryPrivateOther()I
-Landroid/os/Debug$MemoryInfo;->getSummaryStack()I
-Landroid/os/Debug$MemoryInfo;->getSummarySystem()I
-Landroid/os/Debug$MemoryInfo;->getTotalUss()I
-Landroid/os/Debug$MemoryInfo;->hasSwappedOutPss:Z
-Landroid/os/Debug$MemoryInfo;->nativePrivateClean:I
-Landroid/os/Debug$MemoryInfo;->nativeRss:I
-Landroid/os/Debug$MemoryInfo;->nativeSharedClean:I
-Landroid/os/Debug$MemoryInfo;->nativeSwappablePss:I
-Landroid/os/Debug$MemoryInfo;->nativeSwappedOut:I
-Landroid/os/Debug$MemoryInfo;->nativeSwappedOutPss:I
-Landroid/os/Debug$MemoryInfo;->NUM_DVK_STATS:I
-Landroid/os/Debug$MemoryInfo;->NUM_OTHER_STATS:I
-Landroid/os/Debug$MemoryInfo;->otherPrivateClean:I
-Landroid/os/Debug$MemoryInfo;->otherRss:I
-Landroid/os/Debug$MemoryInfo;->otherSharedClean:I
-Landroid/os/Debug$MemoryInfo;->otherStats:[I
-Landroid/os/Debug$MemoryInfo;->otherSwappablePss:I
-Landroid/os/Debug$MemoryInfo;->otherSwappedOut:I
-Landroid/os/Debug$MemoryInfo;->otherSwappedOutPss:I
-Landroid/os/Debug;-><init>()V
-Landroid/os/Debug;->countInstancesOfClass(Ljava/lang/Class;)J
-Landroid/os/Debug;->dumpNativeHeap(Ljava/io/FileDescriptor;)V
-Landroid/os/Debug;->dumpReferenceTables()V
-Landroid/os/Debug;->getCaller()Ljava/lang/String;
-Landroid/os/Debug;->getCallers(I)Ljava/lang/String;
-Landroid/os/Debug;->getMemInfo([J)V
-Landroid/os/Debug;->getMemoryInfo(ILandroid/os/Debug$MemoryInfo;)V
-Landroid/os/DropBoxManager;->mService:Lcom/android/internal/os/IDropBoxManagerService;
-Landroid/os/Environment$UserEnvironment;-><init>(I)V
-Landroid/os/Environment$UserEnvironment;->getExternalDirs()[Ljava/io/File;
-Landroid/os/Environment$UserEnvironment;->getExternalStorageDirectory()Ljava/io/File;
-Landroid/os/Environment$UserEnvironment;->getExternalStoragePublicDirectory(Ljava/lang/String;)Ljava/io/File;
-Landroid/os/Environment;->buildExternalStorageAndroidDataDirs()[Ljava/io/File;
-Landroid/os/Environment;->buildExternalStorageAppCacheDirs(Ljava/lang/String;)[Ljava/io/File;
-Landroid/os/Environment;->buildExternalStorageAppDataDirs(Ljava/lang/String;)[Ljava/io/File;
-Landroid/os/Environment;->buildExternalStorageAppFilesDirs(Ljava/lang/String;)[Ljava/io/File;
-Landroid/os/Environment;->buildExternalStorageAppMediaDirs(Ljava/lang/String;)[Ljava/io/File;
-Landroid/os/Environment;->buildExternalStorageAppObbDirs(Ljava/lang/String;)[Ljava/io/File;
-Landroid/os/Environment;->buildPaths([Ljava/io/File;[Ljava/lang/String;)[Ljava/io/File;
-Landroid/os/Environment;->getDataSystemDirectory()Ljava/io/File;
-Landroid/os/Environment;->getLegacyExternalStorageDirectory()Ljava/io/File;
-Landroid/os/Environment;->getLegacyExternalStorageObbDirectory()Ljava/io/File;
-Landroid/os/Environment;->getOemDirectory()Ljava/io/File;
-Landroid/os/Environment;->getStorageDirectory()Ljava/io/File;
-Landroid/os/Environment;->getVendorDirectory()Ljava/io/File;
-Landroid/os/Environment;->initForCurrentUser()V
-Landroid/os/Environment;->maybeTranslateEmulatedPathToInternal(Ljava/io/File;)Ljava/io/File;
-Landroid/os/Environment;->sCurrentUser:Landroid/os/Environment$UserEnvironment;
-Landroid/os/FileObserver$ObserverThread;->onEvent(IILjava/lang/String;)V
-Landroid/os/FileObserver;->s_observerThread:Landroid/os/FileObserver$ObserverThread;
Landroid/os/FileUtils;-><init>()V
-Landroid/os/FileUtils;->checksumCrc32(Ljava/io/File;)J
-Landroid/os/FileUtils;->copyFile(Ljava/io/File;Ljava/io/File;)Z
-Landroid/os/FileUtils;->copyToFile(Ljava/io/InputStream;Ljava/io/File;)Z
-Landroid/os/FileUtils;->deleteContents(Ljava/io/File;)Z
-Landroid/os/FileUtils;->deleteOlderFiles(Ljava/io/File;IJ)Z
-Landroid/os/FileUtils;->isFilenameSafe(Ljava/io/File;)Z
-Landroid/os/FileUtils;->readTextFile(Ljava/io/File;ILjava/lang/String;)Ljava/lang/String;
-Landroid/os/FileUtils;->setPermissions(Ljava/io/File;III)I
-Landroid/os/FileUtils;->setPermissions(Ljava/io/FileDescriptor;III)I
-Landroid/os/FileUtils;->setPermissions(Ljava/lang/String;III)I
-Landroid/os/FileUtils;->stringToFile(Ljava/io/File;Ljava/lang/String;)V
-Landroid/os/FileUtils;->stringToFile(Ljava/lang/String;Ljava/lang/String;)V
-Landroid/os/FileUtils;->sync(Ljava/io/FileOutputStream;)Z
-Landroid/os/Handler;-><init>(Landroid/os/Looper;Landroid/os/Handler$Callback;Z)V
-Landroid/os/Handler;-><init>(Z)V
-Landroid/os/Handler;->getIMessenger()Landroid/os/IMessenger;
-Landroid/os/Handler;->getMain()Landroid/os/Handler;
-Landroid/os/Handler;->getPostMessage(Ljava/lang/Runnable;Ljava/lang/Object;)Landroid/os/Message;
-Landroid/os/Handler;->hasCallbacks(Ljava/lang/Runnable;)Z
-Landroid/os/Handler;->mCallback:Landroid/os/Handler$Callback;
-Landroid/os/Handler;->mLooper:Landroid/os/Looper;
-Landroid/os/Handler;->mMessenger:Landroid/os/IMessenger;
-Landroid/os/HwBinder;->reportSyspropChanged()V
-Landroid/os/HwParcel;-><init>(Z)V
-Landroid/os/HwRemoteBinder;-><init>()V
Landroid/os/IBatteryPropertiesRegistrar$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
-Landroid/os/IBinder;->SYSPROPS_TRANSACTION:I
Landroid/os/IDeviceIdentifiersPolicyService$Stub;->asInterface(Landroid/os/IBinder;)Landroid/os/IDeviceIdentifiersPolicyService;
Landroid/os/IDeviceIdleController$Stub;->asInterface(Landroid/os/IBinder;)Landroid/os/IDeviceIdleController;
-Landroid/os/IDeviceIdleController;->addPowerSaveTempWhitelistApp(Ljava/lang/String;JILjava/lang/String;)V
Landroid/os/IDeviceIdleController;->getAppIdTempWhitelist()[I
Landroid/os/IDeviceIdleController;->getFullPowerWhitelistExceptIdle()[Ljava/lang/String;
Landroid/os/INetworkManagementService$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
Landroid/os/INetworkManagementService$Stub;->asInterface(Landroid/os/IBinder;)Landroid/os/INetworkManagementService;
-Landroid/os/INetworkManagementService;->clearInterfaceAddresses(Ljava/lang/String;)V
-Landroid/os/INetworkManagementService;->disableIpv6(Ljava/lang/String;)V
-Landroid/os/INetworkManagementService;->disableNat(Ljava/lang/String;Ljava/lang/String;)V
-Landroid/os/INetworkManagementService;->enableIpv6(Ljava/lang/String;)V
-Landroid/os/INetworkManagementService;->enableNat(Ljava/lang/String;Ljava/lang/String;)V
-Landroid/os/INetworkManagementService;->getInterfaceConfig(Ljava/lang/String;)Landroid/net/InterfaceConfiguration;
-Landroid/os/INetworkManagementService;->getIpForwardingEnabled()Z
-Landroid/os/INetworkManagementService;->isBandwidthControlEnabled()Z
-Landroid/os/INetworkManagementService;->isTetheringStarted()Z
Landroid/os/INetworkManagementService;->listTetheredInterfaces()[Ljava/lang/String;
-Landroid/os/INetworkManagementService;->registerObserver(Landroid/net/INetworkManagementEventObserver;)V
-Landroid/os/INetworkManagementService;->setInterfaceConfig(Ljava/lang/String;Landroid/net/InterfaceConfiguration;)V
-Landroid/os/INetworkManagementService;->setInterfaceIpv6PrivacyExtensions(Ljava/lang/String;Z)V
-Landroid/os/INetworkManagementService;->setIpForwardingEnabled(Z)V
-Landroid/os/INetworkManagementService;->setIPv6AddrGenMode(Ljava/lang/String;I)V
-Landroid/os/INetworkManagementService;->startTethering([Ljava/lang/String;)V
-Landroid/os/INetworkManagementService;->stopTethering()V
-Landroid/os/INetworkManagementService;->tetherInterface(Ljava/lang/String;)V
-Landroid/os/INetworkManagementService;->unregisterObserver(Landroid/net/INetworkManagementEventObserver;)V
-Landroid/os/INetworkManagementService;->untetherInterface(Ljava/lang/String;)V
Landroid/os/IPermissionController$Stub$Proxy;->checkPermission(Ljava/lang/String;II)Z
Landroid/os/IPermissionController$Stub;->asInterface(Landroid/os/IBinder;)Landroid/os/IPermissionController;
Landroid/os/IPowerManager$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
@@ -611,313 +396,21 @@
Landroid/os/IPowerManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/os/IPowerManager;
Landroid/os/IPowerManager$Stub;->TRANSACTION_acquireWakeLock:I
Landroid/os/IPowerManager$Stub;->TRANSACTION_goToSleep:I
-Landroid/os/IPowerManager;->goToSleep(JII)V
-Landroid/os/IPowerManager;->isInteractive()Z
-Landroid/os/IPowerManager;->reboot(ZLjava/lang/String;Z)V
Landroid/os/IPowerManager;->releaseWakeLock(Landroid/os/IBinder;I)V
-Landroid/os/IPowerManager;->userActivity(JII)V
-Landroid/os/IPowerManager;->wakeUp(JLjava/lang/String;Ljava/lang/String;)V
Landroid/os/IRecoverySystem$Stub;->asInterface(Landroid/os/IBinder;)Landroid/os/IRecoverySystem;
Landroid/os/IRemoteCallback$Stub;-><init>()V
-Landroid/os/IRemoteCallback;->sendResult(Landroid/os/Bundle;)V
-Landroid/os/IServiceManager;->checkService(Ljava/lang/String;)Landroid/os/IBinder;
-Landroid/os/IServiceManager;->getService(Ljava/lang/String;)Landroid/os/IBinder;
Landroid/os/IUpdateEngine$Stub;-><init>()V
Landroid/os/IUpdateEngineCallback;->onStatusUpdate(IF)V
Landroid/os/IUserManager$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
Landroid/os/IUserManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/os/IUserManager;
-Landroid/os/IUserManager;->getUserInfo(I)Landroid/content/pm/UserInfo;
Landroid/os/IVibratorService$Stub;->asInterface(Landroid/os/IBinder;)Landroid/os/IVibratorService;
-Landroid/os/LocaleList;->setDefault(Landroid/os/LocaleList;I)V
-Landroid/os/Looper;->mLogging:Landroid/util/Printer;
-Landroid/os/Looper;->mQueue:Landroid/os/MessageQueue;
-Landroid/os/Looper;->setTraceTag(J)V
-Landroid/os/Looper;->sMainLooper:Landroid/os/Looper;
-Landroid/os/Looper;->sThreadLocal:Ljava/lang/ThreadLocal;
-Landroid/os/MemoryFile;->deactivate()V
-Landroid/os/MemoryFile;->getFileDescriptor()Ljava/io/FileDescriptor;
-Landroid/os/MemoryFile;->getSize(Ljava/io/FileDescriptor;)I
-Landroid/os/MemoryFile;->native_get_size(Ljava/io/FileDescriptor;)I
-Landroid/os/MemoryFile;->native_pin(Ljava/io/FileDescriptor;Z)Z
-Landroid/os/Message;->callback:Ljava/lang/Runnable;
-Landroid/os/Message;->flags:I
-Landroid/os/Message;->markInUse()V
-Landroid/os/Message;->next:Landroid/os/Message;
-Landroid/os/Message;->recycleUnchecked()V
-Landroid/os/Message;->setCallback(Ljava/lang/Runnable;)Landroid/os/Message;
-Landroid/os/Message;->target:Landroid/os/Handler;
-Landroid/os/Message;->toString(J)Ljava/lang/String;
-Landroid/os/Message;->when:J
-Landroid/os/MessageQueue;->dispatchEvents(II)I
-Landroid/os/MessageQueue;->hasMessages(Landroid/os/Handler;Ljava/lang/Runnable;Ljava/lang/Object;)Z
-Landroid/os/MessageQueue;->mIdleHandlers:Ljava/util/ArrayList;
-Landroid/os/MessageQueue;->mMessages:Landroid/os/Message;
-Landroid/os/MessageQueue;->mNextBarrierToken:I
-Landroid/os/MessageQueue;->mPtr:J
-Landroid/os/MessageQueue;->mQuitAllowed:Z
-Landroid/os/MessageQueue;->nativePollOnce(JI)V
-Landroid/os/MessageQueue;->next()Landroid/os/Message;
-Landroid/os/MessageQueue;->postSyncBarrier()I
-Landroid/os/MessageQueue;->removeSyncBarrier(I)V
Landroid/os/Parcel$ReadWriteHelper;-><init>()V
-Landroid/os/Parcel;->getGlobalAllocCount()J
-Landroid/os/Parcel;->getGlobalAllocSize()J
-Landroid/os/Parcel;->mNativePtr:J
-Landroid/os/Parcel;->readArrayMap(Landroid/util/ArrayMap;Ljava/lang/ClassLoader;)V
-Landroid/os/Parcel;->readArraySet(Ljava/lang/ClassLoader;)Landroid/util/ArraySet;
-Landroid/os/Parcel;->readBlob()[B
-Landroid/os/Parcel;->readCharSequence()Ljava/lang/CharSequence;
-Landroid/os/Parcel;->readCreator(Landroid/os/Parcelable$Creator;Ljava/lang/ClassLoader;)Landroid/os/Parcelable;
-Landroid/os/Parcel;->readExceptionCode()I
-Landroid/os/Parcel;->readParcelableCreator(Ljava/lang/ClassLoader;)Landroid/os/Parcelable$Creator;
-Landroid/os/Parcel;->readParcelableList(Ljava/util/List;Ljava/lang/ClassLoader;)Ljava/util/List;
-Landroid/os/Parcel;->readRawFileDescriptor()Ljava/io/FileDescriptor;
-Landroid/os/Parcel;->readStringArray()[Ljava/lang/String;
-Landroid/os/Parcel;->writeArrayMap(Landroid/util/ArrayMap;)V
-Landroid/os/Parcel;->writeArraySet(Landroid/util/ArraySet;)V
-Landroid/os/Parcel;->writeBlob([B)V
-Landroid/os/Parcel;->writeCharSequence(Ljava/lang/CharSequence;)V
-Landroid/os/Parcel;->writeParcelableCreator(Landroid/os/Parcelable;)V
-Landroid/os/Parcel;->writeParcelableList(Ljava/util/List;I)V
-Landroid/os/ParcelableParcel;-><init>(Ljava/lang/ClassLoader;)V
-Landroid/os/ParcelableParcel;->CREATOR:Landroid/os/Parcelable$ClassLoaderCreator;
-Landroid/os/ParcelableParcel;->getClassLoader()Ljava/lang/ClassLoader;
-Landroid/os/ParcelableParcel;->getParcel()Landroid/os/Parcel;
-Landroid/os/ParcelFileDescriptor;-><init>(Ljava/io/FileDescriptor;)V
-Landroid/os/ParcelFileDescriptor;->fromData([BLjava/lang/String;)Landroid/os/ParcelFileDescriptor;
-Landroid/os/ParcelFileDescriptor;->getFile(Ljava/io/FileDescriptor;)Ljava/io/File;
-Landroid/os/ParcelFileDescriptor;->seekTo(J)J
-Landroid/os/PerformanceCollector;-><init>()V
-Landroid/os/PerformanceCollector;->beginSnapshot(Ljava/lang/String;)V
-Landroid/os/PerformanceCollector;->endSnapshot()Landroid/os/Bundle;
-Landroid/os/PerformanceCollector;->startTiming(Ljava/lang/String;)V
-Landroid/os/PerformanceCollector;->stopTiming(Ljava/lang/String;)Landroid/os/Bundle;
-Landroid/os/PowerManager$WakeLock;->mFlags:I
-Landroid/os/PowerManager$WakeLock;->mTag:Ljava/lang/String;
-Landroid/os/PowerManager;->ACTION_LIGHT_DEVICE_IDLE_MODE_CHANGED:Ljava/lang/String;
-Landroid/os/PowerManager;->ACTION_POWER_SAVE_MODE_CHANGING:Ljava/lang/String;
-Landroid/os/PowerManager;->BRIGHTNESS_ON:I
-Landroid/os/PowerManager;->EXTRA_POWER_SAVE_MODE:Ljava/lang/String;
-Landroid/os/PowerManager;->getDefaultScreenBrightnessSetting()I
-Landroid/os/PowerManager;->getMaximumScreenBrightnessSetting()I
-Landroid/os/PowerManager;->getMinimumScreenBrightnessSetting()I
-Landroid/os/PowerManager;->goToSleep(JII)V
-Landroid/os/PowerManager;->GO_TO_SLEEP_REASON_TIMEOUT:I
-Landroid/os/PowerManager;->isLightDeviceIdleMode()Z
-Landroid/os/PowerManager;->mService:Landroid/os/IPowerManager;
-Landroid/os/PowerManager;->setPowerSaveMode(Z)Z
-Landroid/os/PowerManager;->validateWakeLockParameters(ILjava/lang/String;)V
-Landroid/os/PowerManager;->wakeUp(JLjava/lang/String;)V
-Landroid/os/Process;->DRM_UID:I
-Landroid/os/Process;->getFreeMemory()J
-Landroid/os/Process;->getParentPid(I)I
-Landroid/os/Process;->getPids(Ljava/lang/String;[I)[I
-Landroid/os/Process;->getPidsForCommands([Ljava/lang/String;)[I
-Landroid/os/Process;->getPss(I)J
-Landroid/os/Process;->getTotalMemory()J
-Landroid/os/Process;->getUidForPid(I)I
-Landroid/os/Process;->isIsolated(I)Z
-Landroid/os/Process;->LOG_UID:I
-Landroid/os/Process;->MEDIA_UID:I
-Landroid/os/Process;->myPpid()I
-Landroid/os/Process;->NFC_UID:I
-Landroid/os/Process;->parseProcLine([BII[I[Ljava/lang/String;[J[F)Z
-Landroid/os/Process;->PROC_COMBINE:I
-Landroid/os/Process;->PROC_OUT_FLOAT:I
-Landroid/os/Process;->PROC_OUT_LONG:I
-Landroid/os/Process;->PROC_OUT_STRING:I
-Landroid/os/Process;->PROC_PARENS:I
-Landroid/os/Process;->PROC_QUOTES:I
-Landroid/os/Process;->PROC_SPACE_TERM:I
-Landroid/os/Process;->PROC_TAB_TERM:I
-Landroid/os/Process;->PROC_TERM_MASK:I
-Landroid/os/Process;->PROC_ZERO_TERM:I
-Landroid/os/Process;->readProcFile(Ljava/lang/String;[I[Ljava/lang/String;[J[F)Z
-Landroid/os/Process;->readProcLines(Ljava/lang/String;[Ljava/lang/String;[J)V
-Landroid/os/Process;->setArgV0(Ljava/lang/String;)V
-Landroid/os/Process;->setProcessGroup(II)V
-Landroid/os/Process;->VPN_UID:I
-Landroid/os/Process;->WIFI_UID:I
-Landroid/os/RecoverySystem;->verifyPackageCompatibility(Ljava/io/InputStream;)Z
-Landroid/os/Registrant;-><init>(Landroid/os/Handler;ILjava/lang/Object;)V
-Landroid/os/Registrant;->clear()V
-Landroid/os/Registrant;->messageForRegistrant()Landroid/os/Message;
-Landroid/os/Registrant;->notifyRegistrant()V
-Landroid/os/Registrant;->notifyRegistrant(Landroid/os/AsyncResult;)V
-Landroid/os/Registrant;->notifyResult(Ljava/lang/Object;)V
Landroid/os/RegistrantList;-><init>()V
-Landroid/os/RegistrantList;->add(Landroid/os/Handler;ILjava/lang/Object;)V
-Landroid/os/RegistrantList;->add(Landroid/os/Registrant;)V
-Landroid/os/RegistrantList;->addUnique(Landroid/os/Handler;ILjava/lang/Object;)V
-Landroid/os/RegistrantList;->notifyRegistrants()V
-Landroid/os/RegistrantList;->notifyRegistrants(Landroid/os/AsyncResult;)V
-Landroid/os/RegistrantList;->notifyResult(Ljava/lang/Object;)V
-Landroid/os/RegistrantList;->remove(Landroid/os/Handler;)V
-Landroid/os/RegistrantList;->removeCleared()V
-Landroid/os/RegistrantList;->size()I
-Landroid/os/RemoteCallbackList;->mCallbacks:Landroid/util/ArrayMap;
-Landroid/os/RemoteException;->rethrowFromSystemServer()Ljava/lang/RuntimeException;
-Landroid/os/SELinux;->checkSELinuxAccess(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Z
-Landroid/os/SELinux;->getContext()Ljava/lang/String;
-Landroid/os/SELinux;->getFileContext(Ljava/lang/String;)Ljava/lang/String;
-Landroid/os/SELinux;->getPidContext(I)Ljava/lang/String;
-Landroid/os/SELinux;->isSELinuxEnabled()Z
-Landroid/os/SELinux;->isSELinuxEnforced()Z
-Landroid/os/SELinux;->restoreconRecursive(Ljava/io/File;)Z
Landroid/os/ServiceManager;-><init>()V
-Landroid/os/ServiceManager;->addService(Ljava/lang/String;Landroid/os/IBinder;)V
-Landroid/os/ServiceManager;->addService(Ljava/lang/String;Landroid/os/IBinder;Z)V
-Landroid/os/ServiceManager;->addService(Ljava/lang/String;Landroid/os/IBinder;ZI)V
-Landroid/os/ServiceManager;->checkService(Ljava/lang/String;)Landroid/os/IBinder;
-Landroid/os/ServiceManager;->getIServiceManager()Landroid/os/IServiceManager;
-Landroid/os/ServiceManager;->getService(Ljava/lang/String;)Landroid/os/IBinder;
-Landroid/os/ServiceManager;->listServices()[Ljava/lang/String;
-Landroid/os/ServiceManager;->sCache:Ljava/util/HashMap;
-Landroid/os/ServiceManager;->sServiceManager:Landroid/os/IServiceManager;
-Landroid/os/ServiceManagerNative;->asInterface(Landroid/os/IBinder;)Landroid/os/IServiceManager;
-Landroid/os/ServiceManagerProxy;->getService(Ljava/lang/String;)Landroid/os/IBinder;
-Landroid/os/ServiceManagerProxy;->mRemote:Landroid/os/IBinder;
-Landroid/os/SharedMemory;->getFd()I
-Landroid/os/ShellCommand;->peekNextArg()Ljava/lang/String;
-Landroid/os/StatFs;->mStat:Landroid/system/StructStatVfs;
Landroid/os/storage/IObbActionListener$Stub;-><init>()V
Landroid/os/storage/IStorageManager$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
Landroid/os/storage/IStorageManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/os/storage/IStorageManager;
Landroid/os/storage/StorageEventListener;-><init>()V
-Landroid/os/StrictMode$Span;->finish()V
-Landroid/os/StrictMode$ThreadPolicy;->mask:I
-Landroid/os/StrictMode$VmPolicy$Builder;->mMask:I
-Landroid/os/StrictMode$VmPolicy;->mask:I
-Landroid/os/StrictMode;->conditionallyCheckInstanceCounts()V
-Landroid/os/StrictMode;->disableDeathOnFileUriExposure()V
-Landroid/os/StrictMode;->enableDeathOnFileUriExposure()V
-Landroid/os/StrictMode;->enterCriticalSpan(Ljava/lang/String;)Landroid/os/StrictMode$Span;
-Landroid/os/StrictMode;->getThreadPolicyMask()I
-Landroid/os/StrictMode;->incrementExpectedActivityCount(Ljava/lang/Class;)V
-Landroid/os/StrictMode;->onBinderStrictModePolicyChange(I)V
-Landroid/os/StrictMode;->onWebViewMethodCalledOnWrongThread(Ljava/lang/Throwable;)V
-Landroid/os/StrictMode;->sLastVmViolationTime:Ljava/util/HashMap;
-Landroid/os/StrictMode;->sWindowManager:Landroid/util/Singleton;
-Landroid/os/StrictMode;->violationsBeingTimed:Ljava/lang/ThreadLocal;
-Landroid/os/SystemClock;-><init>()V
-Landroid/os/SystemClock;->currentThreadTimeMicro()J
-Landroid/os/SystemClock;->currentTimeMicro()J
-Landroid/os/SystemProperties;-><init>()V
-Landroid/os/SystemProperties;->addChangeCallback(Ljava/lang/Runnable;)V
-Landroid/os/SystemProperties;->native_get(Ljava/lang/String;)Ljava/lang/String;
-Landroid/os/SystemProperties;->native_get_long(Ljava/lang/String;J)J
-Landroid/os/SystemProperties;->PROP_NAME_MAX:I
-Landroid/os/SystemProperties;->reportSyspropChanged()V
-Landroid/os/SystemProperties;->sChangeCallbacks:Ljava/util/ArrayList;
-Landroid/os/SystemProperties;->set(Ljava/lang/String;Ljava/lang/String;)V
-Landroid/os/SystemService;->start(Ljava/lang/String;)V
-Landroid/os/SystemService;->stop(Ljava/lang/String;)V
-Landroid/os/SystemVibrator;-><init>()V
-Landroid/os/SystemVibrator;-><init>(Landroid/content/Context;)V
-Landroid/os/Trace;->asyncTraceBegin(JLjava/lang/String;I)V
-Landroid/os/Trace;->asyncTraceEnd(JLjava/lang/String;I)V
-Landroid/os/Trace;->isTagEnabled(J)Z
-Landroid/os/Trace;->nativeGetEnabledTags()J
-Landroid/os/Trace;->sEnabledTags:J
-Landroid/os/Trace;->setAppTracingAllowed(Z)V
-Landroid/os/Trace;->traceBegin(JLjava/lang/String;)V
-Landroid/os/Trace;->traceCounter(JLjava/lang/String;I)V
-Landroid/os/Trace;->traceEnd(J)V
-Landroid/os/Trace;->TRACE_TAG_APP:J
-Landroid/os/Trace;->TRACE_TAG_VIEW:J
-Landroid/os/UEventObserver$UEvent;->get(Ljava/lang/String;)Ljava/lang/String;
-Landroid/os/UEventObserver$UEvent;->get(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
-Landroid/os/UEventObserver;-><init>()V
-Landroid/os/UEventObserver;->onUEvent(Landroid/os/UEventObserver$UEvent;)V
-Landroid/os/UEventObserver;->startObserving(Ljava/lang/String;)V
-Landroid/os/UEventObserver;->stopObserving()V
-Landroid/os/UpdateLock;->acquire()V
-Landroid/os/UpdateLock;->isHeld()Z
-Landroid/os/UpdateLock;->NOW_IS_CONVENIENT:Ljava/lang/String;
-Landroid/os/UpdateLock;->release()V
-Landroid/os/UpdateLock;->TIMESTAMP:Ljava/lang/String;
-Landroid/os/UpdateLock;->UPDATE_LOCK_CHANGED:Ljava/lang/String;
-Landroid/os/UserHandle;-><init>(I)V
-Landroid/os/UserHandle;->AID_APP_END:I
-Landroid/os/UserHandle;->AID_APP_START:I
-Landroid/os/UserHandle;->AID_CACHE_GID_START:I
-Landroid/os/UserHandle;->AID_ROOT:I
-Landroid/os/UserHandle;->AID_SHARED_GID_START:I
-Landroid/os/UserHandle;->CURRENT_OR_SELF:Landroid/os/UserHandle;
-Landroid/os/UserHandle;->ERR_GID:I
-Landroid/os/UserHandle;->getAppIdFromSharedAppGid(I)I
-Landroid/os/UserHandle;->getCallingUserId()I
-Landroid/os/UserHandle;->getUid(II)I
-Landroid/os/UserHandle;->getUserId(I)I
-Landroid/os/UserHandle;->isApp(I)Z
-Landroid/os/UserHandle;->isIsolated(I)Z
-Landroid/os/UserHandle;->isSameApp(II)Z
-Landroid/os/UserHandle;->mHandle:I
-Landroid/os/UserHandle;->MU_ENABLED:Z
-Landroid/os/UserHandle;->OWNER:Landroid/os/UserHandle;
-Landroid/os/UserHandle;->PER_USER_RANGE:I
-Landroid/os/UserHandle;->USER_ALL:I
-Landroid/os/UserHandle;->USER_CURRENT:I
-Landroid/os/UserHandle;->USER_CURRENT_OR_SELF:I
-Landroid/os/UserHandle;->USER_NULL:I
-Landroid/os/UserHandle;->USER_OWNER:I
-Landroid/os/UserHandle;->USER_SERIAL_SYSTEM:I
-Landroid/os/UserHandle;->USER_SYSTEM:I
-Landroid/os/UserManager;->createProfileForUser(Ljava/lang/String;II)Landroid/content/pm/UserInfo;
-Landroid/os/UserManager;->createUser(Ljava/lang/String;I)Landroid/content/pm/UserInfo;
-Landroid/os/UserManager;->DISALLOW_RECORD_AUDIO:Ljava/lang/String;
-Landroid/os/UserManager;->get(Landroid/content/Context;)Landroid/os/UserManager;
-Landroid/os/UserManager;->getEnabledProfiles(I)Ljava/util/List;
-Landroid/os/UserManager;->getMaxSupportedUsers()I
-Landroid/os/UserManager;->getProfileIdsWithDisabled(I)[I
-Landroid/os/UserManager;->getProfileParent(I)Landroid/content/pm/UserInfo;
-Landroid/os/UserManager;->getProfiles(I)Ljava/util/List;
-Landroid/os/UserManager;->getUserHandle()I
-Landroid/os/UserManager;->getUserHandle(I)I
-Landroid/os/UserManager;->getUserIcon(I)Landroid/graphics/Bitmap;
-Landroid/os/UserManager;->getUserInfo(I)Landroid/content/pm/UserInfo;
-Landroid/os/UserManager;->getUsers()Ljava/util/List;
-Landroid/os/UserManager;->getUsers(Z)Ljava/util/List;
-Landroid/os/UserManager;->getUserSerialNumber(I)I
-Landroid/os/UserManager;->getUserStartRealtime()J
-Landroid/os/UserManager;->getUserUnlockRealtime()J
-Landroid/os/UserManager;->hasBaseUserRestriction(Ljava/lang/String;Landroid/os/UserHandle;)Z
-Landroid/os/UserManager;->hasUserRestriction(Ljava/lang/String;Landroid/os/UserHandle;)Z
-Landroid/os/UserManager;->isAdminUser()Z
-Landroid/os/UserManager;->isDeviceInDemoMode(Landroid/content/Context;)Z
-Landroid/os/UserManager;->isGuestUser(I)Z
-Landroid/os/UserManager;->isLinkedUser()Z
-Landroid/os/UserManager;->isUserAdmin(I)Z
-Landroid/os/UserManager;->isUserUnlocked(I)Z
-Landroid/os/UserManager;->mService:Landroid/os/IUserManager;
-Landroid/os/UserManager;->removeUser(I)Z
-Landroid/os/Vibrator;-><init>()V
-Landroid/os/VintfObject;->getHalNamesAndVersions()[Ljava/lang/String;
-Landroid/os/VintfObject;->getSepolicyVersion()Ljava/lang/String;
-Landroid/os/VintfObject;->getTargetFrameworkCompatibilityMatrixVersion()Ljava/lang/Long;
-Landroid/os/VintfObject;->getVndkSnapshots()Ljava/util/Map;
-Landroid/os/VintfObject;->report()[Ljava/lang/String;
-Landroid/os/VintfRuntimeInfo;->getCpuInfo()Ljava/lang/String;
-Landroid/os/VintfRuntimeInfo;->getHardwareId()Ljava/lang/String;
-Landroid/os/VintfRuntimeInfo;->getKernelVersion()Ljava/lang/String;
-Landroid/os/VintfRuntimeInfo;->getNodeName()Ljava/lang/String;
-Landroid/os/VintfRuntimeInfo;->getOsName()Ljava/lang/String;
-Landroid/os/VintfRuntimeInfo;->getOsRelease()Ljava/lang/String;
-Landroid/os/VintfRuntimeInfo;->getOsVersion()Ljava/lang/String;
-Landroid/os/WorkSource;-><init>(I)V
-Landroid/os/WorkSource;-><init>(Landroid/os/Parcel;)V
-Landroid/os/WorkSource;->add(I)Z
-Landroid/os/WorkSource;->add(ILjava/lang/String;)Z
-Landroid/os/WorkSource;->addReturningNewbs(Landroid/os/WorkSource;)Landroid/os/WorkSource;
-Landroid/os/WorkSource;->get(I)I
-Landroid/os/WorkSource;->getName(I)Ljava/lang/String;
-Landroid/os/WorkSource;->mNames:[Ljava/lang/String;
-Landroid/os/WorkSource;->mNum:I
-Landroid/os/WorkSource;->mUids:[I
-Landroid/os/WorkSource;->setReturningDiffs(Landroid/os/WorkSource;)[Landroid/os/WorkSource;
-Landroid/os/WorkSource;->size()I
-Landroid/os/ZygoteStartFailedEx;-><init>(Ljava/lang/String;)V
-Landroid/os/ZygoteStartFailedEx;-><init>(Ljava/lang/Throwable;)V
Landroid/preference/PreferenceGroupAdapter;->getItem(I)Landroid/preference/Preference;
Landroid/R$styleable;->ActionBar:[I
Landroid/R$styleable;->ActionBar_background:I
@@ -1901,48 +1394,6 @@
Lcom/android/internal/statusbar/IStatusBarService$Stub;-><init>()V
Lcom/android/internal/statusbar/IStatusBarService$Stub;->asInterface(Landroid/os/IBinder;)Lcom/android/internal/statusbar/IStatusBarService;
Lcom/android/internal/telecom/ITelecomService$Stub;->asInterface(Landroid/os/IBinder;)Lcom/android/internal/telecom/ITelecomService;
-Lcom/android/internal/telephony/BaseCommands;->mCallStateRegistrants:Landroid/os/RegistrantList;
-Lcom/android/internal/telephony/BaseCommands;->mCallWaitingInfoRegistrants:Landroid/os/RegistrantList;
-Lcom/android/internal/telephony/BaseCommands;->mCatCallSetUpRegistrant:Landroid/os/Registrant;
-Lcom/android/internal/telephony/BaseCommands;->mCatCcAlphaRegistrant:Landroid/os/Registrant;
-Lcom/android/internal/telephony/BaseCommands;->mCatEventRegistrant:Landroid/os/Registrant;
-Lcom/android/internal/telephony/BaseCommands;->mCatProCmdRegistrant:Landroid/os/Registrant;
-Lcom/android/internal/telephony/BaseCommands;->mCatSessionEndRegistrant:Landroid/os/Registrant;
-Lcom/android/internal/telephony/BaseCommands;->mCdmaPrlChangedRegistrants:Landroid/os/RegistrantList;
-Lcom/android/internal/telephony/BaseCommands;->mCdmaSmsRegistrant:Landroid/os/Registrant;
-Lcom/android/internal/telephony/BaseCommands;->mCdmaSubscriptionChangedRegistrants:Landroid/os/RegistrantList;
-Lcom/android/internal/telephony/BaseCommands;->mContext:Landroid/content/Context;
-Lcom/android/internal/telephony/BaseCommands;->mEmergencyCallbackModeRegistrant:Landroid/os/Registrant;
-Lcom/android/internal/telephony/BaseCommands;->mExitEmergencyCallbackModeRegistrants:Landroid/os/RegistrantList;
-Lcom/android/internal/telephony/BaseCommands;->mGsmBroadcastSmsRegistrant:Landroid/os/Registrant;
-Lcom/android/internal/telephony/BaseCommands;->mGsmSmsRegistrant:Landroid/os/Registrant;
-Lcom/android/internal/telephony/BaseCommands;->mHardwareConfigChangeRegistrants:Landroid/os/RegistrantList;
-Lcom/android/internal/telephony/BaseCommands;->mIccRefreshRegistrants:Landroid/os/RegistrantList;
-Lcom/android/internal/telephony/BaseCommands;->mIccSmsFullRegistrant:Landroid/os/Registrant;
-Lcom/android/internal/telephony/BaseCommands;->mIccStatusChangedRegistrants:Landroid/os/RegistrantList;
-Lcom/android/internal/telephony/BaseCommands;->mImsNetworkStateChangedRegistrants:Landroid/os/RegistrantList;
-Lcom/android/internal/telephony/BaseCommands;->mNITZTimeRegistrant:Landroid/os/Registrant;
-Lcom/android/internal/telephony/BaseCommands;->mOtaProvisionRegistrants:Landroid/os/RegistrantList;
-Lcom/android/internal/telephony/BaseCommands;->mPhoneRadioCapabilityChangedRegistrants:Landroid/os/RegistrantList;
-Lcom/android/internal/telephony/BaseCommands;->mPhoneType:I
-Lcom/android/internal/telephony/BaseCommands;->mPreferredNetworkType:I
-Lcom/android/internal/telephony/BaseCommands;->mResendIncallMuteRegistrants:Landroid/os/RegistrantList;
-Lcom/android/internal/telephony/BaseCommands;->mRestrictedStateRegistrant:Landroid/os/Registrant;
-Lcom/android/internal/telephony/BaseCommands;->mRilCellInfoListRegistrants:Landroid/os/RegistrantList;
-Lcom/android/internal/telephony/BaseCommands;->mRingbackToneRegistrants:Landroid/os/RegistrantList;
-Lcom/android/internal/telephony/BaseCommands;->mRingRegistrant:Landroid/os/Registrant;
-Lcom/android/internal/telephony/BaseCommands;->mSignalStrengthRegistrant:Landroid/os/Registrant;
-Lcom/android/internal/telephony/BaseCommands;->mSmsOnSimRegistrant:Landroid/os/Registrant;
-Lcom/android/internal/telephony/BaseCommands;->mSmsStatusRegistrant:Landroid/os/Registrant;
-Lcom/android/internal/telephony/BaseCommands;->mSrvccStateRegistrants:Landroid/os/RegistrantList;
-Lcom/android/internal/telephony/BaseCommands;->mSsnRegistrant:Landroid/os/Registrant;
-Lcom/android/internal/telephony/BaseCommands;->mSsRegistrant:Landroid/os/Registrant;
-Lcom/android/internal/telephony/BaseCommands;->mStateMonitor:Ljava/lang/Object;
-Lcom/android/internal/telephony/BaseCommands;->mSubscriptionStatusRegistrants:Landroid/os/RegistrantList;
-Lcom/android/internal/telephony/BaseCommands;->mUnsolOemHookRawRegistrant:Landroid/os/Registrant;
-Lcom/android/internal/telephony/BaseCommands;->mUSSDRegistrant:Landroid/os/Registrant;
-Lcom/android/internal/telephony/BaseCommands;->mVoiceRadioTechChangedRegistrants:Landroid/os/RegistrantList;
-Lcom/android/internal/telephony/Call$State;->ACTIVE:Lcom/android/internal/telephony/Call$State;
Lcom/android/internal/telephony/Call$State;->ALERTING:Lcom/android/internal/telephony/Call$State;
Lcom/android/internal/telephony/Call$State;->DIALING:Lcom/android/internal/telephony/Call$State;
Lcom/android/internal/telephony/Call$State;->DISCONNECTED:Lcom/android/internal/telephony/Call$State;
@@ -1950,232 +1401,22 @@
Lcom/android/internal/telephony/Call$State;->HOLDING:Lcom/android/internal/telephony/Call$State;
Lcom/android/internal/telephony/Call$State;->IDLE:Lcom/android/internal/telephony/Call$State;
Lcom/android/internal/telephony/Call$State;->INCOMING:Lcom/android/internal/telephony/Call$State;
-Lcom/android/internal/telephony/Call$State;->isAlive()Z
-Lcom/android/internal/telephony/Call$State;->isRinging()Z
Lcom/android/internal/telephony/Call$State;->values()[Lcom/android/internal/telephony/Call$State;
Lcom/android/internal/telephony/Call$State;->WAITING:Lcom/android/internal/telephony/Call$State;
Lcom/android/internal/telephony/Call;-><init>()V
-Lcom/android/internal/telephony/Call;->getConnections()Ljava/util/List;
-Lcom/android/internal/telephony/Call;->getEarliestConnection()Lcom/android/internal/telephony/Connection;
-Lcom/android/internal/telephony/Call;->getLatestConnection()Lcom/android/internal/telephony/Connection;
-Lcom/android/internal/telephony/Call;->getPhone()Lcom/android/internal/telephony/Phone;
-Lcom/android/internal/telephony/Call;->getState()Lcom/android/internal/telephony/Call$State;
-Lcom/android/internal/telephony/Call;->hangup()V
-Lcom/android/internal/telephony/Call;->isIdle()Z
-Lcom/android/internal/telephony/Call;->isMultiparty()Z
-Lcom/android/internal/telephony/Call;->mConnections:Ljava/util/ArrayList;
-Lcom/android/internal/telephony/Call;->mState:Lcom/android/internal/telephony/Call$State;
Lcom/android/internal/telephony/CallerInfoAsyncQuery$CallerInfoAsyncQueryHandler;-><init>(Lcom/android/internal/telephony/CallerInfoAsyncQuery;Landroid/content/Context;)V
Lcom/android/internal/telephony/CallerInfoAsyncQuery$CookieWrapper;-><init>()V
Lcom/android/internal/telephony/CallerInfoAsyncQuery;->release()V
Lcom/android/internal/telephony/CallForwardInfo;-><init>()V
-Lcom/android/internal/telephony/CallForwardInfo;->number:Ljava/lang/String;
-Lcom/android/internal/telephony/CallForwardInfo;->reason:I
-Lcom/android/internal/telephony/CallForwardInfo;->serviceClass:I
-Lcom/android/internal/telephony/CallForwardInfo;->status:I
-Lcom/android/internal/telephony/CallForwardInfo;->timeSeconds:I
-Lcom/android/internal/telephony/CallForwardInfo;->toa:I
-Lcom/android/internal/telephony/CallManager;->canConference(Lcom/android/internal/telephony/Call;I)Z
-Lcom/android/internal/telephony/CallManager;->canDial(Lcom/android/internal/telephony/Phone;)Z
-Lcom/android/internal/telephony/CallManager;->conference(Lcom/android/internal/telephony/Call;)V
-Lcom/android/internal/telephony/CallManager;->getActiveFgCall(I)Lcom/android/internal/telephony/Call;
-Lcom/android/internal/telephony/CallManager;->getActiveFgCallState(I)Lcom/android/internal/telephony/Call$State;
-Lcom/android/internal/telephony/CallManager;->getBackgroundCalls()Ljava/util/List;
-Lcom/android/internal/telephony/CallManager;->getBgCallConnections()Ljava/util/List;
-Lcom/android/internal/telephony/CallManager;->getBgPhone()Lcom/android/internal/telephony/Phone;
-Lcom/android/internal/telephony/CallManager;->getContext()Landroid/content/Context;
-Lcom/android/internal/telephony/CallManager;->getDefaultPhone()Lcom/android/internal/telephony/Phone;
-Lcom/android/internal/telephony/CallManager;->getFgCallConnections()Ljava/util/List;
-Lcom/android/internal/telephony/CallManager;->getFgPhone()Lcom/android/internal/telephony/Phone;
-Lcom/android/internal/telephony/CallManager;->getFgPhone(I)Lcom/android/internal/telephony/Phone;
-Lcom/android/internal/telephony/CallManager;->getFirstActiveBgCall()Lcom/android/internal/telephony/Call;
-Lcom/android/internal/telephony/CallManager;->getFirstActiveBgCall(I)Lcom/android/internal/telephony/Call;
-Lcom/android/internal/telephony/CallManager;->getFirstActiveRingingCall()Lcom/android/internal/telephony/Call;
-Lcom/android/internal/telephony/CallManager;->getFirstActiveRingingCall(I)Lcom/android/internal/telephony/Call;
-Lcom/android/internal/telephony/CallManager;->getInstance()Lcom/android/internal/telephony/CallManager;
-Lcom/android/internal/telephony/CallManager;->getPhoneInCall()Lcom/android/internal/telephony/Phone;
-Lcom/android/internal/telephony/CallManager;->getRingingCalls()Ljava/util/List;
-Lcom/android/internal/telephony/CallManager;->getRingingPhone()Lcom/android/internal/telephony/Phone;
-Lcom/android/internal/telephony/CallManager;->getState()Lcom/android/internal/telephony/PhoneConstants$State;
-Lcom/android/internal/telephony/CallManager;->getState(I)Lcom/android/internal/telephony/PhoneConstants$State;
-Lcom/android/internal/telephony/CallManager;->hasActiveBgCall()Z
-Lcom/android/internal/telephony/CallManager;->hasActiveBgCall(I)Z
-Lcom/android/internal/telephony/CallManager;->hasActiveFgCall()Z
-Lcom/android/internal/telephony/CallManager;->hasActiveFgCall(I)Z
-Lcom/android/internal/telephony/CallManager;->hasActiveRingingCall(I)Z
-Lcom/android/internal/telephony/CallManager;->hasMoreThanOneRingingCall()Z
-Lcom/android/internal/telephony/CallManager;->hasMoreThanOneRingingCall(I)Z
-Lcom/android/internal/telephony/CallManager;->mBackgroundCalls:Ljava/util/ArrayList;
-Lcom/android/internal/telephony/CallManager;->mEmptyConnections:Ljava/util/ArrayList;
-Lcom/android/internal/telephony/CallManager;->mForegroundCalls:Ljava/util/ArrayList;
-Lcom/android/internal/telephony/CallManager;->mPhones:Ljava/util/ArrayList;
-Lcom/android/internal/telephony/CallManager;->mRingingCalls:Ljava/util/ArrayList;
-Lcom/android/internal/telephony/CallManager;->registerForDisconnect(Landroid/os/Handler;ILjava/lang/Object;)V
-Lcom/android/internal/telephony/CallManager;->registerForNewRingingConnection(Landroid/os/Handler;ILjava/lang/Object;)V
-Lcom/android/internal/telephony/CallManager;->registerForPreciseCallStateChanged(Landroid/os/Handler;ILjava/lang/Object;)V
-Lcom/android/internal/telephony/CallManager;->registerPhone(Lcom/android/internal/telephony/Phone;)Z
-Lcom/android/internal/telephony/CallManager;->unregisterForDisconnect(Landroid/os/Handler;)V
-Lcom/android/internal/telephony/CallManager;->unregisterForNewRingingConnection(Landroid/os/Handler;)V
-Lcom/android/internal/telephony/CallManager;->unregisterForPreciseCallStateChanged(Landroid/os/Handler;)V
-Lcom/android/internal/telephony/CallManager;->unregisterPhone(Lcom/android/internal/telephony/Phone;)V
-Lcom/android/internal/telephony/CallStateException;-><init>(Ljava/lang/String;)V
Lcom/android/internal/telephony/CallTracker;-><init>()V
-Lcom/android/internal/telephony/CallTracker;->getState()Lcom/android/internal/telephony/PhoneConstants$State;
-Lcom/android/internal/telephony/CallTracker;->log(Ljava/lang/String;)V
-Lcom/android/internal/telephony/CallTracker;->mCi:Lcom/android/internal/telephony/CommandsInterface;
-Lcom/android/internal/telephony/CallTracker;->mNeedsPoll:Z
-Lcom/android/internal/telephony/CallTracker;->mNumberConverted:Z
-Lcom/android/internal/telephony/CallTracker;->mPendingOperations:I
-Lcom/android/internal/telephony/CallTracker;->registerForVoiceCallEnded(Landroid/os/Handler;ILjava/lang/Object;)V
-Lcom/android/internal/telephony/CarrierServiceBindHelper;->mContext:Landroid/content/Context;
-Lcom/android/internal/telephony/CarrierServiceBindHelper;->mHandler:Landroid/os/Handler;
-Lcom/android/internal/telephony/cat/AppInterface$CommandType;->CLOSE_CHANNEL:Lcom/android/internal/telephony/cat/AppInterface$CommandType;
-Lcom/android/internal/telephony/cat/AppInterface$CommandType;->DISPLAY_TEXT:Lcom/android/internal/telephony/cat/AppInterface$CommandType;
-Lcom/android/internal/telephony/cat/AppInterface$CommandType;->fromInt(I)Lcom/android/internal/telephony/cat/AppInterface$CommandType;
-Lcom/android/internal/telephony/cat/AppInterface$CommandType;->GET_CHANNEL_STATUS:Lcom/android/internal/telephony/cat/AppInterface$CommandType;
-Lcom/android/internal/telephony/cat/AppInterface$CommandType;->GET_INKEY:Lcom/android/internal/telephony/cat/AppInterface$CommandType;
-Lcom/android/internal/telephony/cat/AppInterface$CommandType;->GET_INPUT:Lcom/android/internal/telephony/cat/AppInterface$CommandType;
-Lcom/android/internal/telephony/cat/AppInterface$CommandType;->LANGUAGE_NOTIFICATION:Lcom/android/internal/telephony/cat/AppInterface$CommandType;
-Lcom/android/internal/telephony/cat/AppInterface$CommandType;->LAUNCH_BROWSER:Lcom/android/internal/telephony/cat/AppInterface$CommandType;
-Lcom/android/internal/telephony/cat/AppInterface$CommandType;->OPEN_CHANNEL:Lcom/android/internal/telephony/cat/AppInterface$CommandType;
-Lcom/android/internal/telephony/cat/AppInterface$CommandType;->PLAY_TONE:Lcom/android/internal/telephony/cat/AppInterface$CommandType;
-Lcom/android/internal/telephony/cat/AppInterface$CommandType;->PROVIDE_LOCAL_INFORMATION:Lcom/android/internal/telephony/cat/AppInterface$CommandType;
-Lcom/android/internal/telephony/cat/AppInterface$CommandType;->RECEIVE_DATA:Lcom/android/internal/telephony/cat/AppInterface$CommandType;
-Lcom/android/internal/telephony/cat/AppInterface$CommandType;->REFRESH:Lcom/android/internal/telephony/cat/AppInterface$CommandType;
-Lcom/android/internal/telephony/cat/AppInterface$CommandType;->SELECT_ITEM:Lcom/android/internal/telephony/cat/AppInterface$CommandType;
-Lcom/android/internal/telephony/cat/AppInterface$CommandType;->SEND_DATA:Lcom/android/internal/telephony/cat/AppInterface$CommandType;
-Lcom/android/internal/telephony/cat/AppInterface$CommandType;->SEND_DTMF:Lcom/android/internal/telephony/cat/AppInterface$CommandType;
-Lcom/android/internal/telephony/cat/AppInterface$CommandType;->SEND_SMS:Lcom/android/internal/telephony/cat/AppInterface$CommandType;
-Lcom/android/internal/telephony/cat/AppInterface$CommandType;->SEND_SS:Lcom/android/internal/telephony/cat/AppInterface$CommandType;
-Lcom/android/internal/telephony/cat/AppInterface$CommandType;->SEND_USSD:Lcom/android/internal/telephony/cat/AppInterface$CommandType;
-Lcom/android/internal/telephony/cat/AppInterface$CommandType;->SET_UP_CALL:Lcom/android/internal/telephony/cat/AppInterface$CommandType;
-Lcom/android/internal/telephony/cat/AppInterface$CommandType;->SET_UP_EVENT_LIST:Lcom/android/internal/telephony/cat/AppInterface$CommandType;
-Lcom/android/internal/telephony/cat/AppInterface$CommandType;->SET_UP_IDLE_MODE_TEXT:Lcom/android/internal/telephony/cat/AppInterface$CommandType;
-Lcom/android/internal/telephony/cat/AppInterface$CommandType;->SET_UP_MENU:Lcom/android/internal/telephony/cat/AppInterface$CommandType;
Lcom/android/internal/telephony/cat/AppInterface$CommandType;->values()[Lcom/android/internal/telephony/cat/AppInterface$CommandType;
-Lcom/android/internal/telephony/cat/CatCmdMessage$CallSettings;->callMsg:Lcom/android/internal/telephony/cat/TextMessage;
-Lcom/android/internal/telephony/cat/CatCmdMessage$CallSettings;->confirmMsg:Lcom/android/internal/telephony/cat/TextMessage;
-Lcom/android/internal/telephony/cat/CatCmdMessage$SetupEventListSettings;->eventList:[I
-Lcom/android/internal/telephony/cat/CatCmdMessage;->getCallSettings()Lcom/android/internal/telephony/cat/CatCmdMessage$CallSettings;
-Lcom/android/internal/telephony/cat/CatCmdMessage;->getCmdType()Lcom/android/internal/telephony/cat/AppInterface$CommandType;
-Lcom/android/internal/telephony/cat/CatCmdMessage;->geTextMessage()Lcom/android/internal/telephony/cat/TextMessage;
-Lcom/android/internal/telephony/cat/CatCmdMessage;->getSetEventList()Lcom/android/internal/telephony/cat/CatCmdMessage$SetupEventListSettings;
-Lcom/android/internal/telephony/cat/CatCmdMessage;->hasIconLoadFailed()Z
-Lcom/android/internal/telephony/cat/CatCmdMessage;->mCallSettings:Lcom/android/internal/telephony/cat/CatCmdMessage$CallSettings;
-Lcom/android/internal/telephony/cat/CatCmdMessage;->mCmdDet:Lcom/android/internal/telephony/cat/CommandDetails;
-Lcom/android/internal/telephony/cat/CatCmdMessage;->mInput:Lcom/android/internal/telephony/cat/Input;
-Lcom/android/internal/telephony/cat/CatCmdMessage;->mMenu:Lcom/android/internal/telephony/cat/Menu;
-Lcom/android/internal/telephony/cat/CatCmdMessage;->mTextMsg:Lcom/android/internal/telephony/cat/TextMessage;
-Lcom/android/internal/telephony/cat/CatLog;->d(Ljava/lang/Object;Ljava/lang/String;)V
-Lcom/android/internal/telephony/cat/CatLog;->d(Ljava/lang/String;Ljava/lang/String;)V
-Lcom/android/internal/telephony/cat/CatLog;->e(Ljava/lang/Object;Ljava/lang/String;)V
-Lcom/android/internal/telephony/cat/CatResponseMessage;->setEventDownload(I[B)V
-Lcom/android/internal/telephony/cat/CatService;->dispose()V
-Lcom/android/internal/telephony/cat/CatService;->isStkAppInstalled()Z
-Lcom/android/internal/telephony/cat/CatService;->mCmdIf:Lcom/android/internal/telephony/CommandsInterface;
-Lcom/android/internal/telephony/cat/CatService;->mContext:Landroid/content/Context;
-Lcom/android/internal/telephony/cat/CatService;->mCurrntCmd:Lcom/android/internal/telephony/cat/CatCmdMessage;
-Lcom/android/internal/telephony/cat/CatService;->mMenuCmd:Lcom/android/internal/telephony/cat/CatCmdMessage;
-Lcom/android/internal/telephony/cat/CatService;->mMsgDecoder:Lcom/android/internal/telephony/cat/RilMessageDecoder;
-Lcom/android/internal/telephony/cat/CatService;->mSlotId:I
-Lcom/android/internal/telephony/cat/CatService;->mStkAppInstalled:Z
-Lcom/android/internal/telephony/cat/CatService;->mUiccController:Lcom/android/internal/telephony/uicc/UiccController;
-Lcom/android/internal/telephony/cat/CatService;->sendTerminalResponse(Lcom/android/internal/telephony/cat/CommandDetails;Lcom/android/internal/telephony/cat/ResultCode;ZILcom/android/internal/telephony/cat/ResponseData;)V
-Lcom/android/internal/telephony/cat/CatService;->sInstance:[Lcom/android/internal/telephony/cat/CatService;
-Lcom/android/internal/telephony/cat/CatService;->sInstanceLock:Ljava/lang/Object;
-Lcom/android/internal/telephony/cat/CommandDetails;->commandNumber:I
-Lcom/android/internal/telephony/cat/CommandDetails;->commandQualifier:I
-Lcom/android/internal/telephony/cat/CommandDetails;->compRequired:Z
-Lcom/android/internal/telephony/cat/CommandDetails;->typeOfCommand:I
-Lcom/android/internal/telephony/cat/CommandParams;-><init>(Lcom/android/internal/telephony/cat/CommandDetails;)V
-Lcom/android/internal/telephony/cat/CommandParams;->getCommandType()Lcom/android/internal/telephony/cat/AppInterface$CommandType;
-Lcom/android/internal/telephony/cat/CommandParams;->mCmdDet:Lcom/android/internal/telephony/cat/CommandDetails;
-Lcom/android/internal/telephony/cat/CommandParamsFactory;->dispose()V
-Lcom/android/internal/telephony/cat/CommandParamsFactory;->mIconLoader:Lcom/android/internal/telephony/cat/IconLoader;
-Lcom/android/internal/telephony/cat/CommandParamsFactory;->searchForNextTag(Lcom/android/internal/telephony/cat/ComprehensionTlvTag;Ljava/util/Iterator;)Lcom/android/internal/telephony/cat/ComprehensionTlv;
-Lcom/android/internal/telephony/cat/CommandParamsFactory;->searchForTag(Lcom/android/internal/telephony/cat/ComprehensionTlvTag;Ljava/util/List;)Lcom/android/internal/telephony/cat/ComprehensionTlv;
-Lcom/android/internal/telephony/cat/ComprehensionTlv;->getLength()I
-Lcom/android/internal/telephony/cat/ComprehensionTlv;->getRawValue()[B
-Lcom/android/internal/telephony/cat/ComprehensionTlv;->getTag()I
-Lcom/android/internal/telephony/cat/ComprehensionTlv;->getValueIndex()I
-Lcom/android/internal/telephony/cat/ComprehensionTlvTag;->ADDRESS:Lcom/android/internal/telephony/cat/ComprehensionTlvTag;
-Lcom/android/internal/telephony/cat/ComprehensionTlvTag;->ALPHA_ID:Lcom/android/internal/telephony/cat/ComprehensionTlvTag;
-Lcom/android/internal/telephony/cat/ComprehensionTlvTag;->COMMAND_DETAILS:Lcom/android/internal/telephony/cat/ComprehensionTlvTag;
-Lcom/android/internal/telephony/cat/ComprehensionTlvTag;->DEVICE_IDENTITIES:Lcom/android/internal/telephony/cat/ComprehensionTlvTag;
-Lcom/android/internal/telephony/cat/ComprehensionTlvTag;->ICON_ID:Lcom/android/internal/telephony/cat/ComprehensionTlvTag;
-Lcom/android/internal/telephony/cat/ComprehensionTlvTag;->RESULT:Lcom/android/internal/telephony/cat/ComprehensionTlvTag;
-Lcom/android/internal/telephony/cat/ComprehensionTlvTag;->SMS_TPDU:Lcom/android/internal/telephony/cat/ComprehensionTlvTag;
-Lcom/android/internal/telephony/cat/ComprehensionTlvTag;->TEXT_ATTRIBUTE:Lcom/android/internal/telephony/cat/ComprehensionTlvTag;
-Lcom/android/internal/telephony/cat/ComprehensionTlvTag;->TEXT_STRING:Lcom/android/internal/telephony/cat/ComprehensionTlvTag;
-Lcom/android/internal/telephony/cat/ComprehensionTlvTag;->USSD_STRING:Lcom/android/internal/telephony/cat/ComprehensionTlvTag;
-Lcom/android/internal/telephony/cat/ComprehensionTlvTag;->value()I
-Lcom/android/internal/telephony/cat/DeviceIdentities;->destinationId:I
-Lcom/android/internal/telephony/cat/DisplayTextParams;-><init>(Lcom/android/internal/telephony/cat/CommandDetails;Lcom/android/internal/telephony/cat/TextMessage;)V
-Lcom/android/internal/telephony/cat/DisplayTextParams;->mTextMsg:Lcom/android/internal/telephony/cat/TextMessage;
-Lcom/android/internal/telephony/cat/Duration$TimeUnit;->value()I
-Lcom/android/internal/telephony/cat/Duration;->timeInterval:I
-Lcom/android/internal/telephony/cat/Duration;->timeUnit:Lcom/android/internal/telephony/cat/Duration$TimeUnit;
-Lcom/android/internal/telephony/cat/GetInputParams;-><init>(Lcom/android/internal/telephony/cat/CommandDetails;Lcom/android/internal/telephony/cat/Input;)V
-Lcom/android/internal/telephony/cat/IconId;->recordNumber:I
-Lcom/android/internal/telephony/cat/IconLoader;->loadIcon(ILandroid/os/Message;)V
-Lcom/android/internal/telephony/cat/Menu;->titleAttrs:Ljava/util/List;
-Lcom/android/internal/telephony/cat/PlayToneParams;-><init>(Lcom/android/internal/telephony/cat/CommandDetails;Lcom/android/internal/telephony/cat/TextMessage;Lcom/android/internal/telephony/cat/Tone;Lcom/android/internal/telephony/cat/Duration;Z)V
Lcom/android/internal/telephony/cat/ResponseData;-><init>()V
-Lcom/android/internal/telephony/cat/ResponseData;->format(Ljava/io/ByteArrayOutputStream;)V
-Lcom/android/internal/telephony/cat/ResultCode;->BACKWARD_MOVE_BY_USER:Lcom/android/internal/telephony/cat/ResultCode;
-Lcom/android/internal/telephony/cat/ResultCode;->BEYOND_TERMINAL_CAPABILITY:Lcom/android/internal/telephony/cat/ResultCode;
-Lcom/android/internal/telephony/cat/ResultCode;->BIP_ERROR:Lcom/android/internal/telephony/cat/ResultCode;
-Lcom/android/internal/telephony/cat/ResultCode;->CMD_DATA_NOT_UNDERSTOOD:Lcom/android/internal/telephony/cat/ResultCode;
-Lcom/android/internal/telephony/cat/ResultCode;->HELP_INFO_REQUIRED:Lcom/android/internal/telephony/cat/ResultCode;
-Lcom/android/internal/telephony/cat/ResultCode;->LAUNCH_BROWSER_ERROR:Lcom/android/internal/telephony/cat/ResultCode;
-Lcom/android/internal/telephony/cat/ResultCode;->NETWORK_CRNTLY_UNABLE_TO_PROCESS:Lcom/android/internal/telephony/cat/ResultCode;
-Lcom/android/internal/telephony/cat/ResultCode;->NO_RESPONSE_FROM_USER:Lcom/android/internal/telephony/cat/ResultCode;
-Lcom/android/internal/telephony/cat/ResultCode;->OK:Lcom/android/internal/telephony/cat/ResultCode;
-Lcom/android/internal/telephony/cat/ResultCode;->PRFRMD_ICON_NOT_DISPLAYED:Lcom/android/internal/telephony/cat/ResultCode;
-Lcom/android/internal/telephony/cat/ResultCode;->PRFRMD_LIMITED_SERVICE:Lcom/android/internal/telephony/cat/ResultCode;
-Lcom/android/internal/telephony/cat/ResultCode;->PRFRMD_MODIFIED_BY_NAA:Lcom/android/internal/telephony/cat/ResultCode;
-Lcom/android/internal/telephony/cat/ResultCode;->PRFRMD_NAA_NOT_ACTIVE:Lcom/android/internal/telephony/cat/ResultCode;
-Lcom/android/internal/telephony/cat/ResultCode;->PRFRMD_TONE_NOT_PLAYED:Lcom/android/internal/telephony/cat/ResultCode;
-Lcom/android/internal/telephony/cat/ResultCode;->PRFRMD_WITH_ADDITIONAL_EFS_READ:Lcom/android/internal/telephony/cat/ResultCode;
-Lcom/android/internal/telephony/cat/ResultCode;->PRFRMD_WITH_MISSING_INFO:Lcom/android/internal/telephony/cat/ResultCode;
-Lcom/android/internal/telephony/cat/ResultCode;->PRFRMD_WITH_MODIFICATION:Lcom/android/internal/telephony/cat/ResultCode;
-Lcom/android/internal/telephony/cat/ResultCode;->PRFRMD_WITH_PARTIAL_COMPREHENSION:Lcom/android/internal/telephony/cat/ResultCode;
-Lcom/android/internal/telephony/cat/ResultCode;->REQUIRED_VALUES_MISSING:Lcom/android/internal/telephony/cat/ResultCode;
-Lcom/android/internal/telephony/cat/ResultCode;->TERMINAL_CRNTLY_UNABLE_TO_PROCESS:Lcom/android/internal/telephony/cat/ResultCode;
-Lcom/android/internal/telephony/cat/ResultCode;->UICC_SESSION_TERM_BY_USER:Lcom/android/internal/telephony/cat/ResultCode;
-Lcom/android/internal/telephony/cat/ResultCode;->USER_NOT_ACCEPT:Lcom/android/internal/telephony/cat/ResultCode;
-Lcom/android/internal/telephony/cat/ResultCode;->USIM_CALL_CONTROL_PERMANENT:Lcom/android/internal/telephony/cat/ResultCode;
-Lcom/android/internal/telephony/cat/ResultCode;->value()I
Lcom/android/internal/telephony/cat/ResultCode;->values()[Lcom/android/internal/telephony/cat/ResultCode;
-Lcom/android/internal/telephony/cat/ResultException;-><init>(Lcom/android/internal/telephony/cat/ResultCode;)V
-Lcom/android/internal/telephony/cat/RilMessage;-><init>(ILjava/lang/String;)V
-Lcom/android/internal/telephony/cat/RilMessage;->mData:Ljava/lang/Object;
-Lcom/android/internal/telephony/cat/RilMessage;->mId:I
-Lcom/android/internal/telephony/cat/RilMessageDecoder;->getInstance(Landroid/os/Handler;Lcom/android/internal/telephony/uicc/IccFileHandler;I)Lcom/android/internal/telephony/cat/RilMessageDecoder;
-Lcom/android/internal/telephony/cat/RilMessageDecoder;->mCmdParamsFactory:Lcom/android/internal/telephony/cat/CommandParamsFactory;
Lcom/android/internal/telephony/cat/RilMessageDecoder;->mCurrentRilMessage:Lcom/android/internal/telephony/cat/RilMessage;
-Lcom/android/internal/telephony/cat/RilMessageDecoder;->mInstance:[Lcom/android/internal/telephony/cat/RilMessageDecoder;
-Lcom/android/internal/telephony/cat/RilMessageDecoder;->mStateStart:Lcom/android/internal/telephony/cat/RilMessageDecoder$StateStart;
Lcom/android/internal/telephony/cat/RilMessageDecoder;->sendCmdForExecution(Lcom/android/internal/telephony/cat/RilMessage;)V
Lcom/android/internal/telephony/cat/RilMessageDecoder;->sendStartDecodingMessageParams(Lcom/android/internal/telephony/cat/RilMessage;)V
-Lcom/android/internal/telephony/cat/SelectItemParams;-><init>(Lcom/android/internal/telephony/cat/CommandDetails;Lcom/android/internal/telephony/cat/Menu;Z)V
-Lcom/android/internal/telephony/cat/TextMessage;-><init>()V
-Lcom/android/internal/telephony/cat/TextMessage;->iconSelfExplanatory:Z
-Lcom/android/internal/telephony/cat/TextMessage;->text:Ljava/lang/String;
Lcom/android/internal/telephony/cat/ValueObject;-><init>()V
-Lcom/android/internal/telephony/cat/ValueParser;->retrieveAlphaId(Lcom/android/internal/telephony/cat/ComprehensionTlv;)Ljava/lang/String;
Lcom/android/internal/telephony/cat/ValueParser;->retrieveDeviceIdentities(Lcom/android/internal/telephony/cat/ComprehensionTlv;)Lcom/android/internal/telephony/cat/DeviceIdentities;
-Lcom/android/internal/telephony/cat/ValueParser;->retrieveTextAttribute(Lcom/android/internal/telephony/cat/ComprehensionTlv;)Ljava/util/List;
-Lcom/android/internal/telephony/cat/ValueParser;->retrieveTextString(Lcom/android/internal/telephony/cat/ComprehensionTlv;)Ljava/lang/String;
-Lcom/android/internal/telephony/cdma/CdmaCallWaitingNotification;->number:Ljava/lang/String;
-Lcom/android/internal/telephony/cdma/CdmaMmiCode;->makeEmptyNull(Ljava/lang/String;)Ljava/lang/String;
-Lcom/android/internal/telephony/cdma/CdmaMmiCode;->mSc:Ljava/lang/String;
-Lcom/android/internal/telephony/cdma/CdmaSMSDispatcher;->getFormat()Ljava/lang/String;
-Lcom/android/internal/telephony/cdma/CdmaSMSDispatcher;->handleCdmaStatusReport(Lcom/android/internal/telephony/cdma/SmsMessage;)V
-Lcom/android/internal/telephony/cdma/CdmaSubscriptionSourceManager;->getCdmaSubscriptionSource()I
-Lcom/android/internal/telephony/cdma/CdmaSubscriptionSourceManager;->getInstance(Landroid/content/Context;Lcom/android/internal/telephony/CommandsInterface;Landroid/os/Handler;ILjava/lang/Object;)Lcom/android/internal/telephony/cdma/CdmaSubscriptionSourceManager;
-Lcom/android/internal/telephony/cdma/EriManager$EriDisplayInformation;->mEriIconText:Ljava/lang/String;
-Lcom/android/internal/telephony/cdma/EriManager;->getEriDisplayInformation(II)Lcom/android/internal/telephony/cdma/EriManager$EriDisplayInformation;
Lcom/android/internal/telephony/cdma/sms/BearerData$CodingException;-><init>(Ljava/lang/String;)V
Lcom/android/internal/telephony/cdma/sms/BearerData$TimeStamp;-><init>()V
Lcom/android/internal/telephony/cdma/sms/BearerData;-><init>()V
@@ -2229,130 +1470,6 @@
Lcom/android/internal/telephony/cdma/SmsMessage;->mEnvelope:Lcom/android/internal/telephony/cdma/sms/SmsEnvelope;
Lcom/android/internal/telephony/cdma/SmsMessage;->parseSms()V
Lcom/android/internal/telephony/cdma/SmsMessage;->privateGetSubmitPdu(Ljava/lang/String;ZLcom/android/internal/telephony/cdma/sms/UserData;)Lcom/android/internal/telephony/cdma/SmsMessage$SubmitPdu;
-Lcom/android/internal/telephony/CommandException$Error;->GENERIC_FAILURE:Lcom/android/internal/telephony/CommandException$Error;
-Lcom/android/internal/telephony/CommandException$Error;->PASSWORD_INCORRECT:Lcom/android/internal/telephony/CommandException$Error;
-Lcom/android/internal/telephony/CommandException$Error;->RADIO_NOT_AVAILABLE:Lcom/android/internal/telephony/CommandException$Error;
-Lcom/android/internal/telephony/CommandException$Error;->REQUEST_NOT_SUPPORTED:Lcom/android/internal/telephony/CommandException$Error;
-Lcom/android/internal/telephony/CommandException$Error;->SIM_PUK2:Lcom/android/internal/telephony/CommandException$Error;
-Lcom/android/internal/telephony/CommandException$Error;->SMS_FAIL_RETRY:Lcom/android/internal/telephony/CommandException$Error;
-Lcom/android/internal/telephony/CommandException;-><init>(Lcom/android/internal/telephony/CommandException$Error;)V
-Lcom/android/internal/telephony/CommandException;->fromRilErrno(I)Lcom/android/internal/telephony/CommandException;
-Lcom/android/internal/telephony/CommandException;->getCommandError()Lcom/android/internal/telephony/CommandException$Error;
-Lcom/android/internal/telephony/CommandException;->mError:Lcom/android/internal/telephony/CommandException$Error;
-Lcom/android/internal/telephony/CommandsInterface;->acceptCall(Landroid/os/Message;)V
-Lcom/android/internal/telephony/CommandsInterface;->acknowledgeLastIncomingCdmaSms(ZILandroid/os/Message;)V
-Lcom/android/internal/telephony/CommandsInterface;->acknowledgeLastIncomingGsmSms(ZILandroid/os/Message;)V
-Lcom/android/internal/telephony/CommandsInterface;->changeBarringPassword(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Landroid/os/Message;)V
-Lcom/android/internal/telephony/CommandsInterface;->deleteSmsOnRuim(ILandroid/os/Message;)V
-Lcom/android/internal/telephony/CommandsInterface;->deleteSmsOnSim(ILandroid/os/Message;)V
-Lcom/android/internal/telephony/CommandsInterface;->exitEmergencyCallbackMode(Landroid/os/Message;)V
-Lcom/android/internal/telephony/CommandsInterface;->getBasebandVersion(Landroid/os/Message;)V
-Lcom/android/internal/telephony/CommandsInterface;->getCdmaBroadcastConfig(Landroid/os/Message;)V
-Lcom/android/internal/telephony/CommandsInterface;->getCDMASubscription(Landroid/os/Message;)V
-Lcom/android/internal/telephony/CommandsInterface;->getDataCallList(Landroid/os/Message;)V
-Lcom/android/internal/telephony/CommandsInterface;->getIccCardStatus(Landroid/os/Message;)V
-Lcom/android/internal/telephony/CommandsInterface;->getIMEISV(Landroid/os/Message;)V
-Lcom/android/internal/telephony/CommandsInterface;->getIMSI(Landroid/os/Message;)V
-Lcom/android/internal/telephony/CommandsInterface;->getLastDataCallFailCause(Landroid/os/Message;)V
-Lcom/android/internal/telephony/CommandsInterface;->getLastPdpFailCause(Landroid/os/Message;)V
-Lcom/android/internal/telephony/CommandsInterface;->getNetworkSelectionMode(Landroid/os/Message;)V
-Lcom/android/internal/telephony/CommandsInterface;->getOperator(Landroid/os/Message;)V
-Lcom/android/internal/telephony/CommandsInterface;->getPDPContextList(Landroid/os/Message;)V
-Lcom/android/internal/telephony/CommandsInterface;->getPreferredNetworkType(Landroid/os/Message;)V
-Lcom/android/internal/telephony/CommandsInterface;->getSignalStrength(Landroid/os/Message;)V
-Lcom/android/internal/telephony/CommandsInterface;->getSmscAddress(Landroid/os/Message;)V
-Lcom/android/internal/telephony/CommandsInterface;->getVoiceRegistrationState(Landroid/os/Message;)V
-Lcom/android/internal/telephony/CommandsInterface;->handleCallSetupRequestFromSim(ZLandroid/os/Message;)V
-Lcom/android/internal/telephony/CommandsInterface;->iccIO(IILjava/lang/String;IIILjava/lang/String;Ljava/lang/String;Landroid/os/Message;)V
-Lcom/android/internal/telephony/CommandsInterface;->iccIOForApp(IILjava/lang/String;IIILjava/lang/String;Ljava/lang/String;Ljava/lang/String;Landroid/os/Message;)V
-Lcom/android/internal/telephony/CommandsInterface;->invokeOemRilRequestRaw([BLandroid/os/Message;)V
-Lcom/android/internal/telephony/CommandsInterface;->queryCallForwardStatus(IILjava/lang/String;Landroid/os/Message;)V
-Lcom/android/internal/telephony/CommandsInterface;->queryCallWaiting(ILandroid/os/Message;)V
-Lcom/android/internal/telephony/CommandsInterface;->queryFacilityLock(Ljava/lang/String;Ljava/lang/String;ILandroid/os/Message;)V
-Lcom/android/internal/telephony/CommandsInterface;->queryTTYMode(Landroid/os/Message;)V
-Lcom/android/internal/telephony/CommandsInterface;->registerForAvailable(Landroid/os/Handler;ILjava/lang/Object;)V
-Lcom/android/internal/telephony/CommandsInterface;->registerForCdmaOtaProvision(Landroid/os/Handler;ILjava/lang/Object;)V
-Lcom/android/internal/telephony/CommandsInterface;->registerForCellInfoList(Landroid/os/Handler;ILjava/lang/Object;)V
-Lcom/android/internal/telephony/CommandsInterface;->registerForIccRefresh(Landroid/os/Handler;ILjava/lang/Object;)V
-Lcom/android/internal/telephony/CommandsInterface;->registerForImsNetworkStateChanged(Landroid/os/Handler;ILjava/lang/Object;)V
-Lcom/android/internal/telephony/CommandsInterface;->registerForNotAvailable(Landroid/os/Handler;ILjava/lang/Object;)V
-Lcom/android/internal/telephony/CommandsInterface;->registerForOffOrNotAvailable(Landroid/os/Handler;ILjava/lang/Object;)V
-Lcom/android/internal/telephony/CommandsInterface;->registerForOn(Landroid/os/Handler;ILjava/lang/Object;)V
-Lcom/android/internal/telephony/CommandsInterface;->registerForRadioStateChanged(Landroid/os/Handler;ILjava/lang/Object;)V
-Lcom/android/internal/telephony/CommandsInterface;->registerForRilConnected(Landroid/os/Handler;ILjava/lang/Object;)V
-Lcom/android/internal/telephony/CommandsInterface;->reportSmsMemoryStatus(ZLandroid/os/Message;)V
-Lcom/android/internal/telephony/CommandsInterface;->reportStkServiceIsRunning(Landroid/os/Message;)V
-Lcom/android/internal/telephony/CommandsInterface;->requestIccSimAuthentication(ILjava/lang/String;Ljava/lang/String;Landroid/os/Message;)V
-Lcom/android/internal/telephony/CommandsInterface;->requestShutdown(Landroid/os/Message;)V
-Lcom/android/internal/telephony/CommandsInterface;->sendDtmf(CLandroid/os/Message;)V
-Lcom/android/internal/telephony/CommandsInterface;->sendEnvelope(Ljava/lang/String;Landroid/os/Message;)V
-Lcom/android/internal/telephony/CommandsInterface;->sendTerminalResponse(Ljava/lang/String;Landroid/os/Message;)V
-Lcom/android/internal/telephony/CommandsInterface;->setCallForward(IIILjava/lang/String;ILandroid/os/Message;)V
-Lcom/android/internal/telephony/CommandsInterface;->setCallWaiting(ZILandroid/os/Message;)V
-Lcom/android/internal/telephony/CommandsInterface;->setCdmaBroadcastActivation(ZLandroid/os/Message;)V
-Lcom/android/internal/telephony/CommandsInterface;->setDataAllowed(ZLandroid/os/Message;)V
-Lcom/android/internal/telephony/CommandsInterface;->setEmergencyCallbackMode(Landroid/os/Handler;ILjava/lang/Object;)V
-Lcom/android/internal/telephony/CommandsInterface;->setFacilityLock(Ljava/lang/String;ZLjava/lang/String;ILandroid/os/Message;)V
-Lcom/android/internal/telephony/CommandsInterface;->setNetworkSelectionModeAutomatic(Landroid/os/Message;)V
-Lcom/android/internal/telephony/CommandsInterface;->setNetworkSelectionModeManual(Ljava/lang/String;Landroid/os/Message;)V
-Lcom/android/internal/telephony/CommandsInterface;->setOnCallRing(Landroid/os/Handler;ILjava/lang/Object;)V
-Lcom/android/internal/telephony/CommandsInterface;->setOnCatCallSetUp(Landroid/os/Handler;ILjava/lang/Object;)V
-Lcom/android/internal/telephony/CommandsInterface;->setOnCatCcAlphaNotify(Landroid/os/Handler;ILjava/lang/Object;)V
-Lcom/android/internal/telephony/CommandsInterface;->setOnCatEvent(Landroid/os/Handler;ILjava/lang/Object;)V
-Lcom/android/internal/telephony/CommandsInterface;->setOnCatProactiveCmd(Landroid/os/Handler;ILjava/lang/Object;)V
-Lcom/android/internal/telephony/CommandsInterface;->setOnCatSessionEnd(Landroid/os/Handler;ILjava/lang/Object;)V
-Lcom/android/internal/telephony/CommandsInterface;->setOnIccRefresh(Landroid/os/Handler;ILjava/lang/Object;)V
-Lcom/android/internal/telephony/CommandsInterface;->setOnIccSmsFull(Landroid/os/Handler;ILjava/lang/Object;)V
-Lcom/android/internal/telephony/CommandsInterface;->setOnNewGsmBroadcastSms(Landroid/os/Handler;ILjava/lang/Object;)V
-Lcom/android/internal/telephony/CommandsInterface;->setOnNITZTime(Landroid/os/Handler;ILjava/lang/Object;)V
-Lcom/android/internal/telephony/CommandsInterface;->setOnSignalStrengthUpdate(Landroid/os/Handler;ILjava/lang/Object;)V
-Lcom/android/internal/telephony/CommandsInterface;->setOnSmsOnSim(Landroid/os/Handler;ILjava/lang/Object;)V
-Lcom/android/internal/telephony/CommandsInterface;->setOnSmsStatus(Landroid/os/Handler;ILjava/lang/Object;)V
-Lcom/android/internal/telephony/CommandsInterface;->setOnSuppServiceNotification(Landroid/os/Handler;ILjava/lang/Object;)V
-Lcom/android/internal/telephony/CommandsInterface;->setPhoneType(I)V
-Lcom/android/internal/telephony/CommandsInterface;->setPreferredNetworkType(ILandroid/os/Message;)V
-Lcom/android/internal/telephony/CommandsInterface;->setRadioPower(ZLandroid/os/Message;)V
-Lcom/android/internal/telephony/CommandsInterface;->setSmscAddress(Ljava/lang/String;Landroid/os/Message;)V
-Lcom/android/internal/telephony/CommandsInterface;->setTTYMode(ILandroid/os/Message;)V
-Lcom/android/internal/telephony/CommandsInterface;->setUiccSubscription(IIIILandroid/os/Message;)V
-Lcom/android/internal/telephony/CommandsInterface;->supplyIccPin(Ljava/lang/String;Landroid/os/Message;)V
-Lcom/android/internal/telephony/CommandsInterface;->switchWaitingOrHoldingAndActive(Landroid/os/Message;)V
-Lcom/android/internal/telephony/CommandsInterface;->unregisterForAvailable(Landroid/os/Handler;)V
-Lcom/android/internal/telephony/CommandsInterface;->unregisterForCdmaOtaProvision(Landroid/os/Handler;)V
-Lcom/android/internal/telephony/CommandsInterface;->unregisterForOffOrNotAvailable(Landroid/os/Handler;)V
-Lcom/android/internal/telephony/CommandsInterface;->unregisterForOn(Landroid/os/Handler;)V
-Lcom/android/internal/telephony/CommandsInterface;->unregisterForRilConnected(Landroid/os/Handler;)V
-Lcom/android/internal/telephony/CommandsInterface;->unregisterForVoiceRadioTechChanged(Landroid/os/Handler;)V
-Lcom/android/internal/telephony/CommandsInterface;->writeSmsToRuim(ILjava/lang/String;Landroid/os/Message;)V
-Lcom/android/internal/telephony/CommandsInterface;->writeSmsToSim(ILjava/lang/String;Ljava/lang/String;Landroid/os/Message;)V
-Lcom/android/internal/telephony/Connection$PostDialState;->CANCELLED:Lcom/android/internal/telephony/Connection$PostDialState;
-Lcom/android/internal/telephony/Connection$PostDialState;->COMPLETE:Lcom/android/internal/telephony/Connection$PostDialState;
-Lcom/android/internal/telephony/Connection$PostDialState;->NOT_STARTED:Lcom/android/internal/telephony/Connection$PostDialState;
-Lcom/android/internal/telephony/Connection$PostDialState;->STARTED:Lcom/android/internal/telephony/Connection$PostDialState;
-Lcom/android/internal/telephony/Connection$PostDialState;->WAIT:Lcom/android/internal/telephony/Connection$PostDialState;
-Lcom/android/internal/telephony/Connection$PostDialState;->WILD:Lcom/android/internal/telephony/Connection$PostDialState;
-Lcom/android/internal/telephony/Connection;-><init>(I)V
-Lcom/android/internal/telephony/Connection;->getAddress()Ljava/lang/String;
-Lcom/android/internal/telephony/Connection;->getCall()Lcom/android/internal/telephony/Call;
-Lcom/android/internal/telephony/Connection;->getConnectTime()J
-Lcom/android/internal/telephony/Connection;->getCreateTime()J
-Lcom/android/internal/telephony/Connection;->getDisconnectCause()I
-Lcom/android/internal/telephony/Connection;->getDisconnectTime()J
-Lcom/android/internal/telephony/Connection;->getDurationMillis()J
-Lcom/android/internal/telephony/Connection;->getState()Lcom/android/internal/telephony/Call$State;
-Lcom/android/internal/telephony/Connection;->getUserData()Ljava/lang/Object;
-Lcom/android/internal/telephony/Connection;->hangup()V
-Lcom/android/internal/telephony/Connection;->isAlive()Z
-Lcom/android/internal/telephony/Connection;->isIncoming()Z
-Lcom/android/internal/telephony/Connection;->LOG_TAG:Ljava/lang/String;
-Lcom/android/internal/telephony/Connection;->mAddress:Ljava/lang/String;
-Lcom/android/internal/telephony/Connection;->mCnapName:Ljava/lang/String;
-Lcom/android/internal/telephony/Connection;->mCnapNamePresentation:I
-Lcom/android/internal/telephony/Connection;->mDialString:Ljava/lang/String;
-Lcom/android/internal/telephony/Connection;->mDuration:J
-Lcom/android/internal/telephony/Connection;->mIsIncoming:Z
-Lcom/android/internal/telephony/Connection;->mNumberPresentation:I
-Lcom/android/internal/telephony/Connection;->setVideoState(I)V
Lcom/android/internal/telephony/DctConstants$Activity;->DATAIN:Lcom/android/internal/telephony/DctConstants$Activity;
Lcom/android/internal/telephony/DctConstants$Activity;->DATAINANDOUT:Lcom/android/internal/telephony/DctConstants$Activity;
Lcom/android/internal/telephony/DctConstants$Activity;->DATAOUT:Lcom/android/internal/telephony/DctConstants$Activity;
@@ -2365,22 +1482,7 @@
Lcom/android/internal/telephony/DctConstants$State;->IDLE:Lcom/android/internal/telephony/DctConstants$State;
Lcom/android/internal/telephony/DctConstants$State;->RETRYING:Lcom/android/internal/telephony/DctConstants$State;
Lcom/android/internal/telephony/DctConstants$State;->values()[Lcom/android/internal/telephony/DctConstants$State;
-Lcom/android/internal/telephony/DefaultPhoneNotifier;->mRegistry:Lcom/android/internal/telephony/ITelephonyRegistry;
-Lcom/android/internal/telephony/DriverCall$State;->ACTIVE:Lcom/android/internal/telephony/DriverCall$State;
-Lcom/android/internal/telephony/DriverCall$State;->ALERTING:Lcom/android/internal/telephony/DriverCall$State;
-Lcom/android/internal/telephony/DriverCall$State;->DIALING:Lcom/android/internal/telephony/DriverCall$State;
-Lcom/android/internal/telephony/DriverCall$State;->HOLDING:Lcom/android/internal/telephony/DriverCall$State;
-Lcom/android/internal/telephony/DriverCall$State;->INCOMING:Lcom/android/internal/telephony/DriverCall$State;
Lcom/android/internal/telephony/DriverCall$State;->values()[Lcom/android/internal/telephony/DriverCall$State;
-Lcom/android/internal/telephony/DriverCall$State;->WAITING:Lcom/android/internal/telephony/DriverCall$State;
-Lcom/android/internal/telephony/DriverCall;-><init>()V
-Lcom/android/internal/telephony/DriverCall;->index:I
-Lcom/android/internal/telephony/DriverCall;->isMT:Z
-Lcom/android/internal/telephony/DriverCall;->isVoice:Z
-Lcom/android/internal/telephony/DriverCall;->name:Ljava/lang/String;
-Lcom/android/internal/telephony/DriverCall;->number:Ljava/lang/String;
-Lcom/android/internal/telephony/DriverCall;->numberPresentation:I
-Lcom/android/internal/telephony/DriverCall;->state:Lcom/android/internal/telephony/DriverCall$State;
Lcom/android/internal/telephony/gsm/GsmCellBroadcastHandler$SmsCbConcatInfo;-><init>(Lcom/android/internal/telephony/gsm/SmsCbHeader;Landroid/telephony/SmsCbLocation;)V
Lcom/android/internal/telephony/gsm/GsmCellBroadcastHandler$SmsCbConcatInfo;->matchesLocation(Ljava/lang/String;II)Z
Lcom/android/internal/telephony/gsm/GsmCellBroadcastHandler;->mSmsCbPageMap:Ljava/util/HashMap;
@@ -2459,79 +1561,7 @@
Lcom/android/internal/telephony/gsm/UsimPhoneBookManager;->mPhoneBookRecords:Ljava/util/ArrayList;
Lcom/android/internal/telephony/gsm/UsimPhoneBookManager;->reset()V
Lcom/android/internal/telephony/GsmAlphabet$TextEncodingDetails;-><init>()V
-Lcom/android/internal/telephony/GsmCdmaCall;->attachFake(Lcom/android/internal/telephony/Connection;Lcom/android/internal/telephony/Call$State;)V
-Lcom/android/internal/telephony/GsmCdmaCallTracker;->clearDisconnected()V
-Lcom/android/internal/telephony/GsmCdmaCallTracker;->disableDataCallInEmergencyCall(Ljava/lang/String;)V
-Lcom/android/internal/telephony/GsmCdmaCallTracker;->fakeHoldForegroundBeforeDial()V
-Lcom/android/internal/telephony/GsmCdmaCallTracker;->getPhone()Lcom/android/internal/telephony/GsmCdmaPhone;
-Lcom/android/internal/telephony/GsmCdmaCallTracker;->handleEcmTimer(I)V
-Lcom/android/internal/telephony/GsmCdmaCallTracker;->isPhoneTypeGsm()Z
-Lcom/android/internal/telephony/GsmCdmaCallTracker;->log(Ljava/lang/String;)V
-Lcom/android/internal/telephony/GsmCdmaCallTracker;->mBackgroundCall:Lcom/android/internal/telephony/GsmCdmaCall;
-Lcom/android/internal/telephony/GsmCdmaCallTracker;->mForegroundCall:Lcom/android/internal/telephony/GsmCdmaCall;
-Lcom/android/internal/telephony/GsmCdmaCallTracker;->mPendingMO:Lcom/android/internal/telephony/GsmCdmaConnection;
-Lcom/android/internal/telephony/GsmCdmaCallTracker;->mPhone:Lcom/android/internal/telephony/GsmCdmaPhone;
-Lcom/android/internal/telephony/GsmCdmaCallTracker;->mRingingCall:Lcom/android/internal/telephony/GsmCdmaCall;
-Lcom/android/internal/telephony/GsmCdmaCallTracker;->mState:Lcom/android/internal/telephony/PhoneConstants$State;
-Lcom/android/internal/telephony/GsmCdmaCallTracker;->obtainCompleteMessage()Landroid/os/Message;
-Lcom/android/internal/telephony/GsmCdmaCallTracker;->obtainCompleteMessage(I)Landroid/os/Message;
-Lcom/android/internal/telephony/GsmCdmaCallTracker;->setMute(Z)V
-Lcom/android/internal/telephony/GsmCdmaCallTracker;->switchWaitingOrHoldingAndActive()V
-Lcom/android/internal/telephony/GsmCdmaCallTracker;->updatePhoneState()V
Lcom/android/internal/telephony/GsmCdmaConnection$MyHandler;-><init>(Lcom/android/internal/telephony/GsmCdmaConnection;Landroid/os/Looper;)V
-Lcom/android/internal/telephony/GsmCdmaConnection;->acquireWakeLock()V
-Lcom/android/internal/telephony/GsmCdmaConnection;->createWakeLock(Landroid/content/Context;)V
-Lcom/android/internal/telephony/GsmCdmaConnection;->disconnectCauseFromCode(I)I
-Lcom/android/internal/telephony/GsmCdmaConnection;->fetchDtmfToneDelay(Lcom/android/internal/telephony/GsmCdmaPhone;)V
-Lcom/android/internal/telephony/GsmCdmaConnection;->findNextPCharOrNonPOrNonWCharIndex(Ljava/lang/String;I)I
-Lcom/android/internal/telephony/GsmCdmaConnection;->findPOrWCharToAppend(Ljava/lang/String;II)C
-Lcom/android/internal/telephony/GsmCdmaConnection;->formatDialString(Ljava/lang/String;)Ljava/lang/String;
-Lcom/android/internal/telephony/GsmCdmaConnection;->getState()Lcom/android/internal/telephony/Call$State;
-Lcom/android/internal/telephony/GsmCdmaConnection;->isPause(C)Z
-Lcom/android/internal/telephony/GsmCdmaConnection;->isPhoneTypeGsm()Z
-Lcom/android/internal/telephony/GsmCdmaConnection;->isWait(C)Z
-Lcom/android/internal/telephony/GsmCdmaConnection;->log(Ljava/lang/String;)V
-Lcom/android/internal/telephony/GsmCdmaConnection;->maskDialString(Ljava/lang/String;)Ljava/lang/String;
-Lcom/android/internal/telephony/GsmCdmaConnection;->mIndex:I
-Lcom/android/internal/telephony/GsmCdmaConnection;->mOwner:Lcom/android/internal/telephony/GsmCdmaCallTracker;
-Lcom/android/internal/telephony/GsmCdmaConnection;->onConnectedInOrOut()V
-Lcom/android/internal/telephony/GsmCdmaConnection;->updateParent(Lcom/android/internal/telephony/GsmCdmaCall;Lcom/android/internal/telephony/GsmCdmaCall;)V
-Lcom/android/internal/telephony/GsmCdmaPhone$Cfu;-><init>(Ljava/lang/String;Landroid/os/Message;)V
-Lcom/android/internal/telephony/GsmCdmaPhone;->exitEmergencyCallbackMode()V
-Lcom/android/internal/telephony/GsmCdmaPhone;->getCallTracker()Lcom/android/internal/telephony/CallTracker;
-Lcom/android/internal/telephony/GsmCdmaPhone;->getCdmaEriText()Ljava/lang/String;
-Lcom/android/internal/telephony/GsmCdmaPhone;->getEsn()Ljava/lang/String;
-Lcom/android/internal/telephony/GsmCdmaPhone;->getLine1Number()Ljava/lang/String;
-Lcom/android/internal/telephony/GsmCdmaPhone;->getPhoneType()I
-Lcom/android/internal/telephony/GsmCdmaPhone;->getServiceState()Landroid/telephony/ServiceState;
-Lcom/android/internal/telephony/GsmCdmaPhone;->getState()Lcom/android/internal/telephony/PhoneConstants$State;
-Lcom/android/internal/telephony/GsmCdmaPhone;->getSystemProperty(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
-Lcom/android/internal/telephony/GsmCdmaPhone;->handleInCallMmiCommands(Ljava/lang/String;)Z
-Lcom/android/internal/telephony/GsmCdmaPhone;->isCfEnable(I)Z
-Lcom/android/internal/telephony/GsmCdmaPhone;->isEriFileLoaded()Z
-Lcom/android/internal/telephony/GsmCdmaPhone;->isInCall()Z
-Lcom/android/internal/telephony/GsmCdmaPhone;->isManualSelProhibitedInGlobalMode()Z
-Lcom/android/internal/telephony/GsmCdmaPhone;->isPhoneTypeGsm()Z
-Lcom/android/internal/telephony/GsmCdmaPhone;->isValidCommandInterfaceCFAction(I)Z
-Lcom/android/internal/telephony/GsmCdmaPhone;->isValidCommandInterfaceCFReason(I)Z
-Lcom/android/internal/telephony/GsmCdmaPhone;->logd(Ljava/lang/String;)V
-Lcom/android/internal/telephony/GsmCdmaPhone;->loge(Ljava/lang/String;)V
-Lcom/android/internal/telephony/GsmCdmaPhone;->mCT:Lcom/android/internal/telephony/GsmCdmaCallTracker;
-Lcom/android/internal/telephony/GsmCdmaPhone;->mEcmExitRespRegistrant:Landroid/os/Registrant;
-Lcom/android/internal/telephony/GsmCdmaPhone;->mEriManager:Lcom/android/internal/telephony/cdma/EriManager;
-Lcom/android/internal/telephony/GsmCdmaPhone;->mIccSmsInterfaceManager:Lcom/android/internal/telephony/IccSmsInterfaceManager;
-Lcom/android/internal/telephony/GsmCdmaPhone;->mIsimUiccRecords:Lcom/android/internal/telephony/uicc/IsimUiccRecords;
-Lcom/android/internal/telephony/GsmCdmaPhone;->mPendingMMIs:Ljava/util/ArrayList;
-Lcom/android/internal/telephony/GsmCdmaPhone;->mSST:Lcom/android/internal/telephony/ServiceStateTracker;
-Lcom/android/internal/telephony/GsmCdmaPhone;->notifyPreciseCallStateChanged()V
-Lcom/android/internal/telephony/GsmCdmaPhone;->notifyServiceStateChanged(Landroid/telephony/ServiceState;)V
-Lcom/android/internal/telephony/GsmCdmaPhone;->setOnEcbModeExitResponse(Landroid/os/Handler;ILjava/lang/Object;)V
-Lcom/android/internal/telephony/GsmCdmaPhone;->syncClirSetting()V
-Lcom/android/internal/telephony/IccCard;->getState()Lcom/android/internal/telephony/IccCardConstants$State;
-Lcom/android/internal/telephony/IccCard;->registerForNetworkLocked(Landroid/os/Handler;ILjava/lang/Object;)V
-Lcom/android/internal/telephony/IccCard;->supplyNetworkDepersonalization(Ljava/lang/String;Landroid/os/Message;)V
-Lcom/android/internal/telephony/IccCard;->supplyPin(Ljava/lang/String;Landroid/os/Message;)V
-Lcom/android/internal/telephony/IccCard;->supplyPuk(Ljava/lang/String;Ljava/lang/String;Landroid/os/Message;)V
Lcom/android/internal/telephony/IccCardConstants$State;->ABSENT:Lcom/android/internal/telephony/IccCardConstants$State;
Lcom/android/internal/telephony/IccCardConstants$State;->CARD_IO_ERROR:Lcom/android/internal/telephony/IccCardConstants$State;
Lcom/android/internal/telephony/IccCardConstants$State;->NETWORK_LOCKED:Lcom/android/internal/telephony/IccCardConstants$State;
@@ -2542,47 +1572,7 @@
Lcom/android/internal/telephony/IccCardConstants$State;->READY:Lcom/android/internal/telephony/IccCardConstants$State;
Lcom/android/internal/telephony/IccCardConstants$State;->UNKNOWN:Lcom/android/internal/telephony/IccCardConstants$State;
Lcom/android/internal/telephony/IccCardConstants$State;->values()[Lcom/android/internal/telephony/IccCardConstants$State;
-Lcom/android/internal/telephony/IccPhoneBookInterfaceManager;->checkThread()V
-Lcom/android/internal/telephony/IccPhoneBookInterfaceManager;->DBG:Z
-Lcom/android/internal/telephony/IccPhoneBookInterfaceManager;->logd(Ljava/lang/String;)V
-Lcom/android/internal/telephony/IccPhoneBookInterfaceManager;->loge(Ljava/lang/String;)V
-Lcom/android/internal/telephony/IccPhoneBookInterfaceManager;->mAdnCache:Lcom/android/internal/telephony/uicc/AdnRecordCache;
-Lcom/android/internal/telephony/IccPhoneBookInterfaceManager;->mBaseHandler:Landroid/os/Handler;
-Lcom/android/internal/telephony/IccPhoneBookInterfaceManager;->mPhone:Lcom/android/internal/telephony/Phone;
-Lcom/android/internal/telephony/IccPhoneBookInterfaceManager;->updateEfForIccType(I)I
Lcom/android/internal/telephony/IccProvider;-><init>()V
-Lcom/android/internal/telephony/IccProvider;->ADDRESS_BOOK_COLUMN_NAMES:[Ljava/lang/String;
-Lcom/android/internal/telephony/IccProvider;->DBG:Z
-Lcom/android/internal/telephony/IccProvider;->loadRecord(Lcom/android/internal/telephony/uicc/AdnRecord;Landroid/database/MatrixCursor;I)V
-Lcom/android/internal/telephony/IccProvider;->log(Ljava/lang/String;)V
-Lcom/android/internal/telephony/IccSmsInterfaceManager;->copyMessageToIccEf(Ljava/lang/String;I[B[B)Z
-Lcom/android/internal/telephony/IccSmsInterfaceManager;->disableCdmaBroadcastRange(II)Z
-Lcom/android/internal/telephony/IccSmsInterfaceManager;->disableGsmBroadcastRange(II)Z
-Lcom/android/internal/telephony/IccSmsInterfaceManager;->enableCdmaBroadcastRange(II)Z
-Lcom/android/internal/telephony/IccSmsInterfaceManager;->enableGsmBroadcastRange(II)Z
-Lcom/android/internal/telephony/IccSmsInterfaceManager;->enforceReceiveAndSend(Ljava/lang/String;)V
-Lcom/android/internal/telephony/IccSmsInterfaceManager;->filterDestAddress(Ljava/lang/String;)Ljava/lang/String;
-Lcom/android/internal/telephony/IccSmsInterfaceManager;->getAllMessagesFromIccEf(Ljava/lang/String;)Ljava/util/List;
-Lcom/android/internal/telephony/IccSmsInterfaceManager;->getImsSmsFormat()Ljava/lang/String;
-Lcom/android/internal/telephony/IccSmsInterfaceManager;->getPremiumSmsPermission(Ljava/lang/String;)I
-Lcom/android/internal/telephony/IccSmsInterfaceManager;->injectSmsPdu([BLjava/lang/String;Landroid/app/PendingIntent;)V
-Lcom/android/internal/telephony/IccSmsInterfaceManager;->isImsSmsSupported()Z
-Lcom/android/internal/telephony/IccSmsInterfaceManager;->log(Ljava/lang/String;)V
-Lcom/android/internal/telephony/IccSmsInterfaceManager;->mAppOps:Landroid/app/AppOpsManager;
-Lcom/android/internal/telephony/IccSmsInterfaceManager;->mCellBroadcastRangeManager:Lcom/android/internal/telephony/IccSmsInterfaceManager$CellBroadcastRangeManager;
-Lcom/android/internal/telephony/IccSmsInterfaceManager;->mContext:Landroid/content/Context;
-Lcom/android/internal/telephony/IccSmsInterfaceManager;->mHandler:Landroid/os/Handler;
-Lcom/android/internal/telephony/IccSmsInterfaceManager;->mLock:Ljava/lang/Object;
-Lcom/android/internal/telephony/IccSmsInterfaceManager;->mPhone:Lcom/android/internal/telephony/Phone;
-Lcom/android/internal/telephony/IccSmsInterfaceManager;->mSms:Ljava/util/List;
-Lcom/android/internal/telephony/IccSmsInterfaceManager;->mSuccess:Z
-Lcom/android/internal/telephony/IccSmsInterfaceManager;->sendData(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;I[BLandroid/app/PendingIntent;Landroid/app/PendingIntent;)V
-Lcom/android/internal/telephony/IccSmsInterfaceManager;->sendStoredMultipartText(Ljava/lang/String;Landroid/net/Uri;Ljava/lang/String;Ljava/util/List;Ljava/util/List;)V
-Lcom/android/internal/telephony/IccSmsInterfaceManager;->sendStoredText(Ljava/lang/String;Landroid/net/Uri;Ljava/lang/String;Landroid/app/PendingIntent;Landroid/app/PendingIntent;)V
-Lcom/android/internal/telephony/IccSmsInterfaceManager;->setCdmaBroadcastConfig([Lcom/android/internal/telephony/cdma/CdmaSmsBroadcastConfigInfo;)Z
-Lcom/android/internal/telephony/IccSmsInterfaceManager;->setCellBroadcastConfig([Lcom/android/internal/telephony/gsm/SmsBroadcastConfigInfo;)Z
-Lcom/android/internal/telephony/IccSmsInterfaceManager;->setPremiumSmsPermission(Ljava/lang/String;I)V
-Lcom/android/internal/telephony/IccSmsInterfaceManager;->updateMessageOnIccEf(Ljava/lang/String;II[B)Z
Lcom/android/internal/telephony/IIccPhoneBook$Stub$Proxy;->mRemote:Landroid/os/IBinder;
Lcom/android/internal/telephony/IIccPhoneBook$Stub;->asInterface(Landroid/os/IBinder;)Lcom/android/internal/telephony/IIccPhoneBook;
Lcom/android/internal/telephony/IIccPhoneBook;->getAdnRecordsInEf(I)Ljava/util/List;
@@ -2591,142 +1581,24 @@
Lcom/android/internal/telephony/IIccPhoneBook;->getAdnRecordsSizeForSubscriber(II)[I
Lcom/android/internal/telephony/IIccPhoneBook;->updateAdnRecordsInEfBySearch(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Z
Lcom/android/internal/telephony/IMms$Stub;->asInterface(Landroid/os/IBinder;)Lcom/android/internal/telephony/IMms;
-Lcom/android/internal/telephony/imsphone/ImsExternalCall;-><init>(Lcom/android/internal/telephony/Phone;Lcom/android/internal/telephony/imsphone/ImsExternalConnection;)V
Lcom/android/internal/telephony/imsphone/ImsExternalCallTracker$ExternalCallStateListener;-><init>(Lcom/android/internal/telephony/imsphone/ImsExternalCallTracker;)V
Lcom/android/internal/telephony/imsphone/ImsExternalCallTracker$ExternalConnectionListener;-><init>(Lcom/android/internal/telephony/imsphone/ImsExternalCallTracker;)V
-Lcom/android/internal/telephony/imsphone/ImsExternalConnection;->rebuildCapabilities()V
-Lcom/android/internal/telephony/imsphone/ImsExternalConnection;->setActive()V
-Lcom/android/internal/telephony/imsphone/ImsPhone$Cf;-><init>(Ljava/lang/String;ZLandroid/os/Message;)V
-Lcom/android/internal/telephony/imsphone/ImsPhone;->getActionFromCFAction(I)I
-Lcom/android/internal/telephony/imsphone/ImsPhone;->getBackgroundCall()Lcom/android/internal/telephony/imsphone/ImsPhoneCall;
-Lcom/android/internal/telephony/imsphone/ImsPhone;->getCallForwardingOption(ILandroid/os/Message;)V
-Lcom/android/internal/telephony/imsphone/ImsPhone;->getCallWaiting(Landroid/os/Message;)V
-Lcom/android/internal/telephony/imsphone/ImsPhone;->getConditionFromCFReason(I)I
-Lcom/android/internal/telephony/imsphone/ImsPhone;->getForegroundCall()Lcom/android/internal/telephony/imsphone/ImsPhoneCall;
-Lcom/android/internal/telephony/imsphone/ImsPhone;->getRingingCall()Lcom/android/internal/telephony/imsphone/ImsPhoneCall;
-Lcom/android/internal/telephony/imsphone/ImsPhone;->getServiceState()Landroid/telephony/ServiceState;
-Lcom/android/internal/telephony/imsphone/ImsPhone;->getState()Lcom/android/internal/telephony/PhoneConstants$State;
-Lcom/android/internal/telephony/imsphone/ImsPhone;->handleEnterEmergencyCallbackMode()V
-Lcom/android/internal/telephony/imsphone/ImsPhone;->handleExitEmergencyCallbackMode()V
-Lcom/android/internal/telephony/imsphone/ImsPhone;->handleInCallMmiCommands(Ljava/lang/String;)Z
-Lcom/android/internal/telephony/imsphone/ImsPhone;->isCfEnable(I)Z
-Lcom/android/internal/telephony/imsphone/ImsPhone;->isUtEnabled()Z
-Lcom/android/internal/telephony/imsphone/ImsPhone;->isValidCommandInterfaceCFAction(I)Z
-Lcom/android/internal/telephony/imsphone/ImsPhone;->isValidCommandInterfaceCFReason(I)Z
-Lcom/android/internal/telephony/imsphone/ImsPhone;->isVolteEnabled()Z
-Lcom/android/internal/telephony/imsphone/ImsPhone;->mCT:Lcom/android/internal/telephony/imsphone/ImsPhoneCallTracker;
-Lcom/android/internal/telephony/imsphone/ImsPhone;->mPendingMMIs:Ljava/util/ArrayList;
-Lcom/android/internal/telephony/imsphone/ImsPhone;->mSS:Landroid/telephony/ServiceState;
Lcom/android/internal/telephony/imsphone/ImsPhone;->notifyCallForwardingIndicator()V
Lcom/android/internal/telephony/imsphone/ImsPhone;->notifyPreciseCallStateChanged()V
-Lcom/android/internal/telephony/imsphone/ImsPhone;->notifyUnknownConnection(Lcom/android/internal/telephony/Connection;)V
-Lcom/android/internal/telephony/imsphone/ImsPhone;->onMMIDone(Lcom/android/internal/telephony/imsphone/ImsPhoneMmiCode;)V
-Lcom/android/internal/telephony/imsphone/ImsPhone;->sendErrorResponse(Landroid/os/Message;)V
-Lcom/android/internal/telephony/imsphone/ImsPhone;->sendErrorResponse(Landroid/os/Message;Ljava/lang/Throwable;)V
-Lcom/android/internal/telephony/imsphone/ImsPhone;->setCallForwardingOption(IILjava/lang/String;IILandroid/os/Message;)V
-Lcom/android/internal/telephony/imsphone/ImsPhone;->setCallWaiting(ZLandroid/os/Message;)V
-Lcom/android/internal/telephony/imsphone/ImsPhone;->setImsRegistered(Z)V
-Lcom/android/internal/telephony/imsphone/ImsPhone;->setOnEcbModeExitResponse(Landroid/os/Handler;ILjava/lang/Object;)V
-Lcom/android/internal/telephony/imsphone/ImsPhone;->setServiceState(I)V
-Lcom/android/internal/telephony/imsphone/ImsPhoneCall;->attach(Lcom/android/internal/telephony/Connection;Lcom/android/internal/telephony/Call$State;)V
-Lcom/android/internal/telephony/imsphone/ImsPhoneCall;->attachFake(Lcom/android/internal/telephony/Connection;Lcom/android/internal/telephony/Call$State;)V
-Lcom/android/internal/telephony/imsphone/ImsPhoneCall;->getConnections()Ljava/util/List;
Lcom/android/internal/telephony/imsphone/ImsPhoneCall;->getImsCall()Lcom/android/ims/ImsCall;
-Lcom/android/internal/telephony/imsphone/ImsPhoneCall;->hangup()V
-Lcom/android/internal/telephony/imsphone/ImsPhoneCall;->merge(Lcom/android/internal/telephony/imsphone/ImsPhoneCall;Lcom/android/internal/telephony/Call$State;)V
-Lcom/android/internal/telephony/imsphone/ImsPhoneCall;->onHangupLocal()V
-Lcom/android/internal/telephony/imsphone/ImsPhoneCallTracker;->addConnection(Lcom/android/internal/telephony/imsphone/ImsPhoneConnection;)V
-Lcom/android/internal/telephony/imsphone/ImsPhoneCallTracker;->clearDisconnected()V
-Lcom/android/internal/telephony/imsphone/ImsPhoneCallTracker;->dial(Ljava/lang/String;ILandroid/os/Bundle;)Lcom/android/internal/telephony/Connection;
-Lcom/android/internal/telephony/imsphone/ImsPhoneCallTracker;->dialPendingMO()V
Lcom/android/internal/telephony/imsphone/ImsPhoneCallTracker;->findConnection(Lcom/android/ims/ImsCall;)Lcom/android/internal/telephony/imsphone/ImsPhoneConnection;
Lcom/android/internal/telephony/imsphone/ImsPhoneCallTracker;->getEcbmInterface()Lcom/android/ims/ImsEcbm;
-Lcom/android/internal/telephony/imsphone/ImsPhoneCallTracker;->getUtInterface()Lcom/android/ims/ImsUtInterface;
-Lcom/android/internal/telephony/imsphone/ImsPhoneCallTracker;->handleEcmTimer(I)V
-Lcom/android/internal/telephony/imsphone/ImsPhoneCallTracker;->log(Ljava/lang/String;)V
-Lcom/android/internal/telephony/imsphone/ImsPhoneCallTracker;->loge(Ljava/lang/String;)V
-Lcom/android/internal/telephony/imsphone/ImsPhoneCallTracker;->mAllowEmergencyVideoCalls:Z
-Lcom/android/internal/telephony/imsphone/ImsPhoneCallTracker;->mBackgroundCall:Lcom/android/internal/telephony/imsphone/ImsPhoneCall;
Lcom/android/internal/telephony/imsphone/ImsPhoneCallTracker;->mCallExpectedToResume:Lcom/android/ims/ImsCall;
-Lcom/android/internal/telephony/imsphone/ImsPhoneCallTracker;->mConnections:Ljava/util/ArrayList;
-Lcom/android/internal/telephony/imsphone/ImsPhoneCallTracker;->mForegroundCall:Lcom/android/internal/telephony/imsphone/ImsPhoneCall;
-Lcom/android/internal/telephony/imsphone/ImsPhoneCallTracker;->mHandoverCall:Lcom/android/internal/telephony/imsphone/ImsPhoneCall;
Lcom/android/internal/telephony/imsphone/ImsPhoneCallTracker;->mImsCallListener:Lcom/android/ims/ImsCall$Listener;
Lcom/android/internal/telephony/imsphone/ImsPhoneCallTracker;->mImsManager:Lcom/android/ims/ImsManager;
-Lcom/android/internal/telephony/imsphone/ImsPhoneCallTracker;->mOnHoldToneId:I
-Lcom/android/internal/telephony/imsphone/ImsPhoneCallTracker;->mOnHoldToneStarted:Z
-Lcom/android/internal/telephony/imsphone/ImsPhoneCallTracker;->mPendingMO:Lcom/android/internal/telephony/imsphone/ImsPhoneConnection;
-Lcom/android/internal/telephony/imsphone/ImsPhoneCallTracker;->mPendingUssd:Landroid/os/Message;
-Lcom/android/internal/telephony/imsphone/ImsPhoneCallTracker;->mPhone:Lcom/android/internal/telephony/imsphone/ImsPhone;
-Lcom/android/internal/telephony/imsphone/ImsPhoneCallTracker;->mRingingCall:Lcom/android/internal/telephony/imsphone/ImsPhoneCall;
-Lcom/android/internal/telephony/imsphone/ImsPhoneCallTracker;->mSwitchingFgAndBgCalls:Z
-Lcom/android/internal/telephony/imsphone/ImsPhoneCallTracker;->mSyncHold:Ljava/lang/Object;
Lcom/android/internal/telephony/imsphone/ImsPhoneCallTracker;->mUssdSession:Lcom/android/ims/ImsCall;
Lcom/android/internal/telephony/imsphone/ImsPhoneCallTracker;->processCallStateChange(Lcom/android/ims/ImsCall;Lcom/android/internal/telephony/Call$State;I)V
Lcom/android/internal/telephony/imsphone/ImsPhoneCallTracker;->processCallStateChange(Lcom/android/ims/ImsCall;Lcom/android/internal/telephony/Call$State;IZ)V
-Lcom/android/internal/telephony/imsphone/ImsPhoneCallTracker;->removeConnection(Lcom/android/internal/telephony/imsphone/ImsPhoneConnection;)V
Lcom/android/internal/telephony/imsphone/ImsPhoneCallTracker;->setVideoCallProvider(Lcom/android/internal/telephony/imsphone/ImsPhoneConnection;Lcom/android/ims/ImsCall;)V
-Lcom/android/internal/telephony/imsphone/ImsPhoneCallTracker;->switchAfterConferenceSuccess()V
-Lcom/android/internal/telephony/imsphone/ImsPhoneCallTracker;->updatePhoneState()V
Lcom/android/internal/telephony/imsphone/ImsPhoneConnection$MyHandler;-><init>(Lcom/android/internal/telephony/imsphone/ImsPhoneConnection;Landroid/os/Looper;)V
-Lcom/android/internal/telephony/imsphone/ImsPhoneConnection;->acquireWakeLock()V
-Lcom/android/internal/telephony/imsphone/ImsPhoneConnection;->createWakeLock(Landroid/content/Context;)V
-Lcom/android/internal/telephony/imsphone/ImsPhoneConnection;->getCall()Lcom/android/internal/telephony/imsphone/ImsPhoneCall;
-Lcom/android/internal/telephony/imsphone/ImsPhoneConnection;->getOwner()Lcom/android/internal/telephony/imsphone/ImsPhoneCallTracker;
-Lcom/android/internal/telephony/imsphone/ImsPhoneConnection;->isMultiparty()Z
-Lcom/android/internal/telephony/imsphone/ImsPhoneConnection;->mDisconnected:Z
Lcom/android/internal/telephony/imsphone/ImsPhoneConnection;->mImsCall:Lcom/android/ims/ImsCall;
-Lcom/android/internal/telephony/imsphone/ImsPhoneConnection;->mOwner:Lcom/android/internal/telephony/imsphone/ImsPhoneCallTracker;
-Lcom/android/internal/telephony/imsphone/ImsPhoneConnection;->mParent:Lcom/android/internal/telephony/imsphone/ImsPhoneCall;
-Lcom/android/internal/telephony/imsphone/ImsPhoneConnection;->onDisconnect()Z
Lcom/android/internal/telephony/imsphone/ImsPhoneConnection;->update(Lcom/android/ims/ImsCall;Lcom/android/internal/telephony/Call$State;)Z
-Lcom/android/internal/telephony/imsphone/ImsPhoneMmiCode;->getCLIRMode()I
-Lcom/android/internal/telephony/imsphone/ImsPhoneMmiCode;->getDialingNumber()Ljava/lang/String;
-Lcom/android/internal/telephony/imsphone/ImsPhoneMmiCode;->getErrorMessage(Landroid/os/AsyncResult;)Ljava/lang/CharSequence;
-Lcom/android/internal/telephony/imsphone/ImsPhoneMmiCode;->getScString()Ljava/lang/CharSequence;
-Lcom/android/internal/telephony/imsphone/ImsPhoneMmiCode;->isActivate()Z
-Lcom/android/internal/telephony/imsphone/ImsPhoneMmiCode;->isDeactivate()Z
-Lcom/android/internal/telephony/imsphone/ImsPhoneMmiCode;->isEmptyOrNull(Ljava/lang/CharSequence;)Z
-Lcom/android/internal/telephony/imsphone/ImsPhoneMmiCode;->isErasure()Z
-Lcom/android/internal/telephony/imsphone/ImsPhoneMmiCode;->isRegister()Z
-Lcom/android/internal/telephony/imsphone/ImsPhoneMmiCode;->isSupportedOverImsPhone()Z
-Lcom/android/internal/telephony/imsphone/ImsPhoneMmiCode;->isTemporaryModeCLIR()Z
-Lcom/android/internal/telephony/imsphone/ImsPhoneMmiCode;->mContext:Landroid/content/Context;
-Lcom/android/internal/telephony/imsphone/ImsPhoneMmiCode;->mPhone:Lcom/android/internal/telephony/imsphone/ImsPhone;
-Lcom/android/internal/telephony/imsphone/ImsPhoneMmiCode;->newFromDialString(Ljava/lang/String;Lcom/android/internal/telephony/imsphone/ImsPhone;)Lcom/android/internal/telephony/imsphone/ImsPhoneMmiCode;
-Lcom/android/internal/telephony/imsphone/ImsPhoneMmiCode;->processCode()V
-Lcom/android/internal/telephony/imsphone/ImsPhoneMmiCode;->serviceClassToCFString(I)Ljava/lang/CharSequence;
Lcom/android/internal/telephony/InboundSmsHandler$SmsBroadcastReceiver;-><init>(Lcom/android/internal/telephony/InboundSmsHandler;Lcom/android/internal/telephony/InboundSmsTracker;)V
-Lcom/android/internal/telephony/InboundSmsHandler$SmsBroadcastReceiver;->mDeleteWhere:Ljava/lang/String;
-Lcom/android/internal/telephony/InboundSmsHandler$SmsBroadcastReceiver;->mDeleteWhereArgs:[Ljava/lang/String;
-Lcom/android/internal/telephony/InboundSmsHandler;->acknowledgeLastIncomingSms(ZILandroid/os/Message;)V
-Lcom/android/internal/telephony/InboundSmsHandler;->deleteFromRawTable(Ljava/lang/String;[Ljava/lang/String;I)V
-Lcom/android/internal/telephony/InboundSmsHandler;->dispatchIntent(Landroid/content/Intent;Ljava/lang/String;ILandroid/os/Bundle;Landroid/content/BroadcastReceiver;Landroid/os/UserHandle;)V
-Lcom/android/internal/telephony/InboundSmsHandler;->dispatchNormalMessage(Lcom/android/internal/telephony/SmsMessageBase;)I
-Lcom/android/internal/telephony/InboundSmsHandler;->getPhone()Lcom/android/internal/telephony/Phone;
-Lcom/android/internal/telephony/InboundSmsHandler;->handleInjectSms(Landroid/os/AsyncResult;)V
-Lcom/android/internal/telephony/InboundSmsHandler;->handleNewSms(Landroid/os/AsyncResult;)V
-Lcom/android/internal/telephony/InboundSmsHandler;->handleSmsWhitelisting(Landroid/content/ComponentName;)Landroid/os/Bundle;
-Lcom/android/internal/telephony/InboundSmsHandler;->isSkipNotifyFlagSet(I)Z
-Lcom/android/internal/telephony/InboundSmsHandler;->log(Ljava/lang/String;)V
-Lcom/android/internal/telephony/InboundSmsHandler;->loge(Ljava/lang/String;)V
-Lcom/android/internal/telephony/InboundSmsHandler;->mCellBroadcastHandler:Lcom/android/internal/telephony/CellBroadcastHandler;
-Lcom/android/internal/telephony/InboundSmsHandler;->mContext:Landroid/content/Context;
-Lcom/android/internal/telephony/InboundSmsHandler;->mDeliveringState:Lcom/android/internal/telephony/InboundSmsHandler$DeliveringState;
-Lcom/android/internal/telephony/InboundSmsHandler;->mDeviceIdleController:Landroid/os/IDeviceIdleController;
-Lcom/android/internal/telephony/InboundSmsHandler;->mIdleState:Lcom/android/internal/telephony/InboundSmsHandler$IdleState;
-Lcom/android/internal/telephony/InboundSmsHandler;->mPhone:Lcom/android/internal/telephony/Phone;
-Lcom/android/internal/telephony/InboundSmsHandler;->mResolver:Landroid/content/ContentResolver;
-Lcom/android/internal/telephony/InboundSmsHandler;->mUserManager:Landroid/os/UserManager;
-Lcom/android/internal/telephony/InboundSmsHandler;->mWaitingState:Lcom/android/internal/telephony/InboundSmsHandler$WaitingState;
-Lcom/android/internal/telephony/InboundSmsHandler;->mWakeLock:Landroid/os/PowerManager$WakeLock;
-Lcom/android/internal/telephony/InboundSmsHandler;->mWapPush:Lcom/android/internal/telephony/WapPushOverSms;
-Lcom/android/internal/telephony/InboundSmsHandler;->processMessagePart(Lcom/android/internal/telephony/InboundSmsTracker;)Z
-Lcom/android/internal/telephony/InboundSmsHandler;->showNewMessageNotification()V
-Lcom/android/internal/telephony/InboundSmsHandler;->writeInboxMessage(Landroid/content/Intent;)Landroid/net/Uri;
-Lcom/android/internal/telephony/InboundSmsTracker;->getFormat()Ljava/lang/String;
-Lcom/android/internal/telephony/InboundSmsTracker;->getIndexOffset()I
-Lcom/android/internal/telephony/IntRangeManager;->mRanges:Ljava/util/ArrayList;
Lcom/android/internal/telephony/IPhoneStateListener$Stub;->asInterface(Landroid/os/IBinder;)Lcom/android/internal/telephony/IPhoneStateListener;
Lcom/android/internal/telephony/IPhoneSubInfo$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
Lcom/android/internal/telephony/IPhoneSubInfo$Stub$Proxy;->getDeviceId(Ljava/lang/String;)Ljava/lang/String;
@@ -2748,91 +1620,6 @@
Lcom/android/internal/telephony/ITelephonyRegistry$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
Lcom/android/internal/telephony/ITelephonyRegistry$Stub;->asInterface(Landroid/os/IBinder;)Lcom/android/internal/telephony/ITelephonyRegistry;
Lcom/android/internal/telephony/IWapPushManager$Stub;->asInterface(Landroid/os/IBinder;)Lcom/android/internal/telephony/IWapPushManager;
-Lcom/android/internal/telephony/MccTable$MccEntry;->mIso:Ljava/lang/String;
-Lcom/android/internal/telephony/MccTable;->countryCodeForMcc(I)Ljava/lang/String;
-Lcom/android/internal/telephony/MccTable;->defaultLanguageForMcc(I)Ljava/lang/String;
-Lcom/android/internal/telephony/MccTable;->defaultTimeZoneForMcc(I)Ljava/lang/String;
-Lcom/android/internal/telephony/MccTable;->entryForMcc(I)Lcom/android/internal/telephony/MccTable$MccEntry;
-Lcom/android/internal/telephony/MccTable;->getLocaleForLanguageCountry(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)Ljava/util/Locale;
-Lcom/android/internal/telephony/MccTable;->smallestDigitsMccForMnc(I)I
-Lcom/android/internal/telephony/MmiCode$State;->CANCELLED:Lcom/android/internal/telephony/MmiCode$State;
-Lcom/android/internal/telephony/MmiCode$State;->COMPLETE:Lcom/android/internal/telephony/MmiCode$State;
-Lcom/android/internal/telephony/MmiCode$State;->FAILED:Lcom/android/internal/telephony/MmiCode$State;
-Lcom/android/internal/telephony/MmiCode$State;->PENDING:Lcom/android/internal/telephony/MmiCode$State;
-Lcom/android/internal/telephony/MmiCode;->getPhone()Lcom/android/internal/telephony/Phone;
-Lcom/android/internal/telephony/Phone;->dispose()V
-Lcom/android/internal/telephony/Phone;->exitEmergencyCallbackMode()V
-Lcom/android/internal/telephony/Phone;->getActiveApnTypes()[Ljava/lang/String;
-Lcom/android/internal/telephony/Phone;->getCallTracker()Lcom/android/internal/telephony/CallTracker;
-Lcom/android/internal/telephony/Phone;->getCellLocation()Landroid/telephony/CellLocation;
-Lcom/android/internal/telephony/Phone;->getContext()Landroid/content/Context;
-Lcom/android/internal/telephony/Phone;->getDataConnectionState()Lcom/android/internal/telephony/PhoneConstants$DataState;
-Lcom/android/internal/telephony/Phone;->getIccCard()Lcom/android/internal/telephony/IccCard;
-Lcom/android/internal/telephony/Phone;->getIccFileHandler()Lcom/android/internal/telephony/uicc/IccFileHandler;
-Lcom/android/internal/telephony/Phone;->getIccSerialNumber()Ljava/lang/String;
-Lcom/android/internal/telephony/Phone;->getIccSmsInterfaceManager()Lcom/android/internal/telephony/IccSmsInterfaceManager;
-Lcom/android/internal/telephony/Phone;->getImsPhone()Lcom/android/internal/telephony/Phone;
-Lcom/android/internal/telephony/Phone;->getIsimRecords()Lcom/android/internal/telephony/uicc/IsimRecords;
-Lcom/android/internal/telephony/Phone;->getMsisdn()Ljava/lang/String;
-Lcom/android/internal/telephony/Phone;->getNai()Ljava/lang/String;
-Lcom/android/internal/telephony/Phone;->getPhoneId()I
-Lcom/android/internal/telephony/Phone;->getPhoneName()Ljava/lang/String;
-Lcom/android/internal/telephony/Phone;->getPhoneType()I
-Lcom/android/internal/telephony/Phone;->getServiceStateTracker()Lcom/android/internal/telephony/ServiceStateTracker;
-Lcom/android/internal/telephony/Phone;->getSmscAddress(Landroid/os/Message;)V
-Lcom/android/internal/telephony/Phone;->getState()Lcom/android/internal/telephony/PhoneConstants$State;
-Lcom/android/internal/telephony/Phone;->getSubId()I
-Lcom/android/internal/telephony/Phone;->getSystemProperty(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
-Lcom/android/internal/telephony/Phone;->getUiccCard()Lcom/android/internal/telephony/uicc/UiccCard;
-Lcom/android/internal/telephony/Phone;->getVideoState(Lcom/android/internal/telephony/Call;)I
-Lcom/android/internal/telephony/Phone;->invokeOemRilRequestRaw([BLandroid/os/Message;)V
-Lcom/android/internal/telephony/Phone;->invokeOemRilRequestStrings([Ljava/lang/String;Landroid/os/Message;)V
-Lcom/android/internal/telephony/Phone;->isCspPlmnEnabled()Z
-Lcom/android/internal/telephony/Phone;->isUtEnabled()Z
-Lcom/android/internal/telephony/Phone;->isVideoEnabled()Z
-Lcom/android/internal/telephony/Phone;->isVolteEnabled()Z
-Lcom/android/internal/telephony/Phone;->isWifiCallingEnabled()Z
-Lcom/android/internal/telephony/Phone;->mCi:Lcom/android/internal/telephony/CommandsInterface;
-Lcom/android/internal/telephony/Phone;->mContext:Landroid/content/Context;
-Lcom/android/internal/telephony/Phone;->mIccRecords:Ljava/util/concurrent/atomic/AtomicReference;
-Lcom/android/internal/telephony/Phone;->mImsPhone:Lcom/android/internal/telephony/Phone;
-Lcom/android/internal/telephony/Phone;->mMmiRegistrants:Landroid/os/RegistrantList;
-Lcom/android/internal/telephony/Phone;->mNotifier:Lcom/android/internal/telephony/PhoneNotifier;
-Lcom/android/internal/telephony/Phone;->mPhoneId:I
-Lcom/android/internal/telephony/Phone;->mSmsStorageMonitor:Lcom/android/internal/telephony/SmsStorageMonitor;
-Lcom/android/internal/telephony/Phone;->mUiccApplication:Ljava/util/concurrent/atomic/AtomicReference;
-Lcom/android/internal/telephony/Phone;->mUiccController:Lcom/android/internal/telephony/uicc/UiccController;
-Lcom/android/internal/telephony/Phone;->needsOtaServiceProvisioning()Z
-Lcom/android/internal/telephony/Phone;->notifyOtaspChanged(I)V
-Lcom/android/internal/telephony/Phone;->registerForDisconnect(Landroid/os/Handler;ILjava/lang/Object;)V
-Lcom/android/internal/telephony/Phone;->registerForEcmTimerReset(Landroid/os/Handler;ILjava/lang/Object;)V
-Lcom/android/internal/telephony/Phone;->registerForIncomingRing(Landroid/os/Handler;ILjava/lang/Object;)V
-Lcom/android/internal/telephony/Phone;->registerForMmiComplete(Landroid/os/Handler;ILjava/lang/Object;)V
-Lcom/android/internal/telephony/Phone;->registerForMmiInitiate(Landroid/os/Handler;ILjava/lang/Object;)V
-Lcom/android/internal/telephony/Phone;->registerForNewRingingConnection(Landroid/os/Handler;ILjava/lang/Object;)V
-Lcom/android/internal/telephony/Phone;->registerForPreciseCallStateChanged(Landroid/os/Handler;ILjava/lang/Object;)V
-Lcom/android/internal/telephony/Phone;->registerForRingbackTone(Landroid/os/Handler;ILjava/lang/Object;)V
-Lcom/android/internal/telephony/Phone;->registerForServiceStateChanged(Landroid/os/Handler;ILjava/lang/Object;)V
-Lcom/android/internal/telephony/Phone;->registerForSimRecordsLoaded(Landroid/os/Handler;ILjava/lang/Object;)V
-Lcom/android/internal/telephony/Phone;->registerForUnknownConnection(Landroid/os/Handler;ILjava/lang/Object;)V
-Lcom/android/internal/telephony/Phone;->selectNetworkManually(Lcom/android/internal/telephony/OperatorInfo;ZLandroid/os/Message;)V
-Lcom/android/internal/telephony/Phone;->setNetworkSelectionModeAutomatic(Landroid/os/Message;)V
-Lcom/android/internal/telephony/Phone;->setOnEcbModeExitResponse(Landroid/os/Handler;ILjava/lang/Object;)V
-Lcom/android/internal/telephony/Phone;->setOnPostDialCharacter(Landroid/os/Handler;ILjava/lang/Object;)V
-Lcom/android/internal/telephony/Phone;->setPreferredNetworkType(ILandroid/os/Message;)V
-Lcom/android/internal/telephony/Phone;->setSmscAddress(Ljava/lang/String;Landroid/os/Message;)V
-Lcom/android/internal/telephony/Phone;->unregisterForDisconnect(Landroid/os/Handler;)V
-Lcom/android/internal/telephony/Phone;->unregisterForEcmTimerReset(Landroid/os/Handler;)V
-Lcom/android/internal/telephony/Phone;->unregisterForIncomingRing(Landroid/os/Handler;)V
-Lcom/android/internal/telephony/Phone;->unregisterForMmiComplete(Landroid/os/Handler;)V
-Lcom/android/internal/telephony/Phone;->unregisterForMmiInitiate(Landroid/os/Handler;)V
-Lcom/android/internal/telephony/Phone;->unregisterForNewRingingConnection(Landroid/os/Handler;)V
-Lcom/android/internal/telephony/Phone;->unregisterForPreciseCallStateChanged(Landroid/os/Handler;)V
-Lcom/android/internal/telephony/Phone;->unregisterForRingbackTone(Landroid/os/Handler;)V
-Lcom/android/internal/telephony/Phone;->unregisterForServiceStateChanged(Landroid/os/Handler;)V
-Lcom/android/internal/telephony/Phone;->unregisterForSimRecordsLoaded(Landroid/os/Handler;)V
-Lcom/android/internal/telephony/Phone;->unregisterForUnknownConnection(Landroid/os/Handler;)V
-Lcom/android/internal/telephony/Phone;->unsetOnEcbModeExitResponse(Landroid/os/Handler;)V
Lcom/android/internal/telephony/PhoneConstants$DataState;->CONNECTED:Lcom/android/internal/telephony/PhoneConstants$DataState;
Lcom/android/internal/telephony/PhoneConstants$DataState;->CONNECTING:Lcom/android/internal/telephony/PhoneConstants$DataState;
Lcom/android/internal/telephony/PhoneConstants$DataState;->DISCONNECTED:Lcom/android/internal/telephony/PhoneConstants$DataState;
@@ -2846,152 +1633,7 @@
Lcom/android/internal/telephony/PhoneConstants;->PRESENTATION_PAYPHONE:I
Lcom/android/internal/telephony/PhoneConstants;->PRESENTATION_RESTRICTED:I
Lcom/android/internal/telephony/PhoneConstants;->PRESENTATION_UNKNOWN:I
-Lcom/android/internal/telephony/PhoneFactory;->calculatePreferredNetworkType(Landroid/content/Context;I)I
-Lcom/android/internal/telephony/PhoneFactory;->getDefaultPhone()Lcom/android/internal/telephony/Phone;
-Lcom/android/internal/telephony/PhoneFactory;->getDefaultSubscription()I
-Lcom/android/internal/telephony/PhoneFactory;->getPhone(I)Lcom/android/internal/telephony/Phone;
-Lcom/android/internal/telephony/PhoneFactory;->getPhones()[Lcom/android/internal/telephony/Phone;
-Lcom/android/internal/telephony/PhoneFactory;->makeDefaultPhone(Landroid/content/Context;)V
-Lcom/android/internal/telephony/PhoneFactory;->sCommandsInterface:Lcom/android/internal/telephony/CommandsInterface;
-Lcom/android/internal/telephony/PhoneFactory;->sContext:Landroid/content/Context;
-Lcom/android/internal/telephony/PhoneFactory;->sMadeDefaults:Z
-Lcom/android/internal/telephony/PhoneFactory;->sPhoneNotifier:Lcom/android/internal/telephony/PhoneNotifier;
-Lcom/android/internal/telephony/PhoneInternalInterface$DataActivityState;->NONE:Lcom/android/internal/telephony/PhoneInternalInterface$DataActivityState;
-Lcom/android/internal/telephony/PhoneInternalInterface;->PREFERRED_NT_MODE:I
-Lcom/android/internal/telephony/PhoneNotifier;->notifyMessageWaitingChanged(Lcom/android/internal/telephony/Phone;)V
-Lcom/android/internal/telephony/PhoneNotifier;->notifySignalStrength(Lcom/android/internal/telephony/Phone;)V
-Lcom/android/internal/telephony/PhoneStateIntentReceiver;-><init>(Landroid/content/Context;Landroid/os/Handler;)V
-Lcom/android/internal/telephony/PhoneStateIntentReceiver;->getSignalStrengthDbm()I
-Lcom/android/internal/telephony/PhoneStateIntentReceiver;->mSignalStrength:Landroid/telephony/SignalStrength;
-Lcom/android/internal/telephony/PhoneStateIntentReceiver;->mWants:I
-Lcom/android/internal/telephony/PhoneStateIntentReceiver;->notifyServiceState(I)V
-Lcom/android/internal/telephony/PhoneStateIntentReceiver;->notifySignalStrength(I)V
-Lcom/android/internal/telephony/PhoneStateIntentReceiver;->registerIntent()V
-Lcom/android/internal/telephony/PhoneStateIntentReceiver;->unregisterIntent()V
-Lcom/android/internal/telephony/PhoneSubInfoController;->getDefaultSubscription()I
-Lcom/android/internal/telephony/PhoneSubInfoController;->getPhone(I)Lcom/android/internal/telephony/Phone;
-Lcom/android/internal/telephony/PhoneSubInfoController;->loge(Ljava/lang/String;)V
-Lcom/android/internal/telephony/PhoneSubInfoController;->mContext:Landroid/content/Context;
-Lcom/android/internal/telephony/PhoneSubInfoController;->mPhone:[Lcom/android/internal/telephony/Phone;
-Lcom/android/internal/telephony/PhoneSwitcher;->activate(I)V
-Lcom/android/internal/telephony/PhoneSwitcher;->deactivate(I)V
-Lcom/android/internal/telephony/PhoneSwitcher;->log(Ljava/lang/String;)V
-Lcom/android/internal/telephony/PhoneSwitcher;->mMaxActivePhones:I
-Lcom/android/internal/telephony/PhoneSwitcher;->mNumPhones:I
-Lcom/android/internal/telephony/PhoneSwitcher;->mPhones:[Lcom/android/internal/telephony/Phone;
-Lcom/android/internal/telephony/ProxyController;->completeRadioCapabilityTransaction()V
-Lcom/android/internal/telephony/ProxyController;->getInstance()Lcom/android/internal/telephony/ProxyController;
-Lcom/android/internal/telephony/ProxyController;->logd(Ljava/lang/String;)V
-Lcom/android/internal/telephony/ProxyController;->mOldRadioAccessFamily:[I
-Lcom/android/internal/telephony/ProxyController;->mRadioCapabilitySessionId:I
-Lcom/android/internal/telephony/ProxyController;->mSetRadioAccessFamilyStatus:[I
-Lcom/android/internal/telephony/ProxyController;->mUniqueIdGenerator:Ljava/util/concurrent/atomic/AtomicInteger;
-Lcom/android/internal/telephony/ProxyController;->sendRadioCapabilityRequest(IIIILjava/lang/String;II)V
-Lcom/android/internal/telephony/ProxyController;->sProxyController:Lcom/android/internal/telephony/ProxyController;
-Lcom/android/internal/telephony/RadioCapability;->getRadioAccessFamily()I
-Lcom/android/internal/telephony/RetryManager;->configure(Ljava/lang/String;)Z
-Lcom/android/internal/telephony/RetryManager;->getRetryTimer()I
-Lcom/android/internal/telephony/RetryManager;->log(Ljava/lang/String;)V
-Lcom/android/internal/telephony/RetryManager;->mApnType:Ljava/lang/String;
-Lcom/android/internal/telephony/RetryManager;->mFailFastInterApnDelay:J
-Lcom/android/internal/telephony/RetryManager;->mInterApnDelay:J
-Lcom/android/internal/telephony/RetryManager;->mPhone:Lcom/android/internal/telephony/Phone;
-Lcom/android/internal/telephony/RIL;-><init>(Landroid/content/Context;II)V
-Lcom/android/internal/telephony/RIL;-><init>(Landroid/content/Context;IILjava/lang/Integer;)V
-Lcom/android/internal/telephony/RIL;->acquireWakeLock(Lcom/android/internal/telephony/RILRequest;I)V
-Lcom/android/internal/telephony/RIL;->clearRequestList(IZ)V
-Lcom/android/internal/telephony/RIL;->clearWakeLock(I)Z
-Lcom/android/internal/telephony/RIL;->decrementWakeLock(Lcom/android/internal/telephony/RILRequest;)V
-Lcom/android/internal/telephony/RIL;->findAndRemoveRequestFromList(I)Lcom/android/internal/telephony/RILRequest;
-Lcom/android/internal/telephony/RIL;->getResponseForTimedOutRILRequest(Lcom/android/internal/telephony/RILRequest;)Ljava/lang/Object;
-Lcom/android/internal/telephony/RIL;->hangupForegroundResumeBackground(Landroid/os/Message;)V
-Lcom/android/internal/telephony/RIL;->hangupWaitingOrBackground(Landroid/os/Message;)V
-Lcom/android/internal/telephony/RIL;->invokeOemRilRequestRaw([BLandroid/os/Message;)V
-Lcom/android/internal/telephony/RIL;->makeStaticRadioCapability()Lcom/android/internal/telephony/RadioCapability;
-Lcom/android/internal/telephony/RIL;->mRequestList:Landroid/util/SparseArray;
-Lcom/android/internal/telephony/RIL;->mTestingEmergencyCall:Ljava/util/concurrent/atomic/AtomicBoolean;
-Lcom/android/internal/telephony/RIL;->mWakeLock:Landroid/os/PowerManager$WakeLock;
-Lcom/android/internal/telephony/RIL;->notifyRegistrantsCdmaInfoRec(Lcom/android/internal/telephony/cdma/CdmaInformationRecords;)V
-Lcom/android/internal/telephony/RIL;->notifyRegistrantsRilConnectionChanged(I)V
-Lcom/android/internal/telephony/RIL;->requestToString(I)Ljava/lang/String;
-Lcom/android/internal/telephony/RIL;->responseToString(I)Ljava/lang/String;
-Lcom/android/internal/telephony/RIL;->retToString(ILjava/lang/Object;)Ljava/lang/String;
-Lcom/android/internal/telephony/RIL;->riljLog(Ljava/lang/String;)V
-Lcom/android/internal/telephony/RIL;->setRadioPower(ZLandroid/os/Message;)V
-Lcom/android/internal/telephony/RIL;->unsljLog(I)V
-Lcom/android/internal/telephony/RIL;->unsljLogMore(ILjava/lang/String;)V
-Lcom/android/internal/telephony/RIL;->unsljLogRet(ILjava/lang/Object;)V
-Lcom/android/internal/telephony/RIL;->unsljLogvRet(ILjava/lang/Object;)V
Lcom/android/internal/telephony/RILConstants;->PREFERRED_NETWORK_MODE:I
-Lcom/android/internal/telephony/RILRequest;->mRequest:I
-Lcom/android/internal/telephony/RILRequest;->mResult:Landroid/os/Message;
-Lcom/android/internal/telephony/RILRequest;->mSerial:I
-Lcom/android/internal/telephony/RILRequest;->obtain(ILandroid/os/Message;)Lcom/android/internal/telephony/RILRequest;
-Lcom/android/internal/telephony/RILRequest;->onError(ILjava/lang/Object;)V
-Lcom/android/internal/telephony/RILRequest;->release()V
-Lcom/android/internal/telephony/RILRequest;->serialString()Ljava/lang/String;
-Lcom/android/internal/telephony/ServiceStateTracker;->fixUnknownMcc(Ljava/lang/String;I)Ljava/lang/String;
-Lcom/android/internal/telephony/ServiceStateTracker;->getCurrentDataConnectionState()I
-Lcom/android/internal/telephony/ServiceStateTracker;->getDesiredPowerState()Z
-Lcom/android/internal/telephony/ServiceStateTracker;->getPhoneId()I
-Lcom/android/internal/telephony/ServiceStateTracker;->getSystemProperty(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
-Lcom/android/internal/telephony/ServiceStateTracker;->isConcurrentVoiceAndDataAllowed()Z
-Lcom/android/internal/telephony/ServiceStateTracker;->isGprsConsistent(II)Z
-Lcom/android/internal/telephony/ServiceStateTracker;->isImsRegistered()Z
-Lcom/android/internal/telephony/ServiceStateTracker;->isInHomeSidNid(II)Z
-Lcom/android/internal/telephony/ServiceStateTracker;->isInvalidOperatorNumeric(Ljava/lang/String;)Z
-Lcom/android/internal/telephony/ServiceStateTracker;->log(Ljava/lang/String;)V
-Lcom/android/internal/telephony/ServiceStateTracker;->loge(Ljava/lang/String;)V
-Lcom/android/internal/telephony/ServiceStateTracker;->mCi:Lcom/android/internal/telephony/CommandsInterface;
-Lcom/android/internal/telephony/ServiceStateTracker;->mCr:Landroid/content/ContentResolver;
-Lcom/android/internal/telephony/ServiceStateTracker;->mCurDataSpn:Ljava/lang/String;
-Lcom/android/internal/telephony/ServiceStateTracker;->mCurPlmn:Ljava/lang/String;
-Lcom/android/internal/telephony/ServiceStateTracker;->mCurShowPlmn:Z
-Lcom/android/internal/telephony/ServiceStateTracker;->mCurShowSpn:Z
-Lcom/android/internal/telephony/ServiceStateTracker;->mCurSpn:Ljava/lang/String;
-Lcom/android/internal/telephony/ServiceStateTracker;->mDataRoamingOffRegistrants:Landroid/os/RegistrantList;
-Lcom/android/internal/telephony/ServiceStateTracker;->mDataRoamingOnRegistrants:Landroid/os/RegistrantList;
-Lcom/android/internal/telephony/ServiceStateTracker;->mDefaultRoamingIndicator:I
-Lcom/android/internal/telephony/ServiceStateTracker;->mDesiredPowerState:Z
-Lcom/android/internal/telephony/ServiceStateTracker;->mDeviceShuttingDown:Z
-Lcom/android/internal/telephony/ServiceStateTracker;->mEmergencyOnly:Z
-Lcom/android/internal/telephony/ServiceStateTracker;->mIccRecords:Lcom/android/internal/telephony/uicc/IccRecords;
-Lcom/android/internal/telephony/ServiceStateTracker;->mIntentReceiver:Landroid/content/BroadcastReceiver;
-Lcom/android/internal/telephony/ServiceStateTracker;->mIsSubscriptionFromRuim:Z
-Lcom/android/internal/telephony/ServiceStateTracker;->mMaxDataCalls:I
-Lcom/android/internal/telephony/ServiceStateTracker;->mNetworkAttachedRegistrants:Landroid/os/RegistrantList;
-Lcom/android/internal/telephony/ServiceStateTracker;->mNewMaxDataCalls:I
-Lcom/android/internal/telephony/ServiceStateTracker;->mNewReasonDataDenied:I
-Lcom/android/internal/telephony/ServiceStateTracker;->mNewSS:Landroid/telephony/ServiceState;
-Lcom/android/internal/telephony/ServiceStateTracker;->mOnSubscriptionsChangedListener:Lcom/android/internal/telephony/ServiceStateTracker$SstSubscriptionsChangedListener;
-Lcom/android/internal/telephony/ServiceStateTracker;->mPhone:Lcom/android/internal/telephony/GsmCdmaPhone;
-Lcom/android/internal/telephony/ServiceStateTracker;->mPreferredNetworkType:I
-Lcom/android/internal/telephony/ServiceStateTracker;->mReasonDataDenied:I
-Lcom/android/internal/telephony/ServiceStateTracker;->mReportedGprsNoReg:Z
-Lcom/android/internal/telephony/ServiceStateTracker;->mRoamingIndicator:I
-Lcom/android/internal/telephony/ServiceStateTracker;->mSignalStrength:Landroid/telephony/SignalStrength;
-Lcom/android/internal/telephony/ServiceStateTracker;->mSpnUpdatePending:Z
-Lcom/android/internal/telephony/ServiceStateTracker;->mSS:Landroid/telephony/ServiceState;
-Lcom/android/internal/telephony/ServiceStateTracker;->mStartedGprsRegCheck:Z
-Lcom/android/internal/telephony/ServiceStateTracker;->mSubId:I
-Lcom/android/internal/telephony/ServiceStateTracker;->mSubscriptionController:Lcom/android/internal/telephony/SubscriptionController;
-Lcom/android/internal/telephony/ServiceStateTracker;->mSubscriptionManager:Landroid/telephony/SubscriptionManager;
-Lcom/android/internal/telephony/ServiceStateTracker;->mUiccApplcation:Lcom/android/internal/telephony/uicc/UiccCardApplication;
-Lcom/android/internal/telephony/ServiceStateTracker;->mUiccController:Lcom/android/internal/telephony/uicc/UiccController;
-Lcom/android/internal/telephony/ServiceStateTracker;->mVoiceRoamingOffRegistrants:Landroid/os/RegistrantList;
-Lcom/android/internal/telephony/ServiceStateTracker;->mVoiceRoamingOnRegistrants:Landroid/os/RegistrantList;
-Lcom/android/internal/telephony/ServiceStateTracker;->notifySignalStrength()Z
-Lcom/android/internal/telephony/ServiceStateTracker;->pollState()V
-Lcom/android/internal/telephony/ServiceStateTracker;->reRegisterNetwork(Landroid/os/Message;)V
-Lcom/android/internal/telephony/ServiceStateTracker;->resetServiceStateInIwlanMode()V
-Lcom/android/internal/telephony/ServiceStateTracker;->setOperatorIdd(Ljava/lang/String;)V
-Lcom/android/internal/telephony/ServiceStateTracker;->setRoamingType(Landroid/telephony/ServiceState;)V
-Lcom/android/internal/telephony/ServiceStateTracker;->setSignalStrengthDefaultValues()V
-Lcom/android/internal/telephony/ServiceStateTracker;->updateOtaspState()V
-Lcom/android/internal/telephony/ServiceStateTracker;->updatePhoneObject()V
-Lcom/android/internal/telephony/ServiceStateTracker;->updateRoamingState()V
-Lcom/android/internal/telephony/ServiceStateTracker;->updateSpnDisplay()V
-Lcom/android/internal/telephony/ServiceStateTracker;->useDataRegStateForDataOnlyDevices()V
Lcom/android/internal/telephony/sip/SipPhone$SipCall;->hold()V
Lcom/android/internal/telephony/sip/SipPhone$SipCall;->switchWith(Lcom/android/internal/telephony/sip/SipPhone$SipCall;)V
Lcom/android/internal/telephony/sip/SipPhone$SipCall;->unhold()V
@@ -3015,99 +1657,14 @@
Lcom/android/internal/telephony/SmsApplication;->isDefaultSmsApplication(Landroid/content/Context;Ljava/lang/String;)Z
Lcom/android/internal/telephony/SmsApplication;->setDefaultApplication(Ljava/lang/String;Landroid/content/Context;)V
Lcom/android/internal/telephony/SmsApplication;->shouldWriteMessageForPackage(Ljava/lang/String;Landroid/content/Context;)Z
-Lcom/android/internal/telephony/SmsBroadcastUndelivered;-><init>(Landroid/content/Context;Lcom/android/internal/telephony/gsm/GsmInboundSmsHandler;Lcom/android/internal/telephony/cdma/CdmaInboundSmsHandler;)V
-Lcom/android/internal/telephony/SMSDispatcher$ConfirmDialogListener;->mNegativeButton:Landroid/widget/Button;
-Lcom/android/internal/telephony/SMSDispatcher$ConfirmDialogListener;->mPositiveButton:Landroid/widget/Button;
-Lcom/android/internal/telephony/SMSDispatcher$ConfirmDialogListener;->mRememberUndoInstruction:Landroid/widget/TextView;
Lcom/android/internal/telephony/SMSDispatcher$DataSmsSender;-><init>(Lcom/android/internal/telephony/SMSDispatcher;Lcom/android/internal/telephony/SMSDispatcher$SmsTracker;)V
Lcom/android/internal/telephony/SMSDispatcher$MultipartSmsSender;-><init>(Lcom/android/internal/telephony/SMSDispatcher;Ljava/util/ArrayList;[Lcom/android/internal/telephony/SMSDispatcher$SmsTracker;)V
-Lcom/android/internal/telephony/SMSDispatcher$MultipartSmsSender;->sendSmsByCarrierApp(Ljava/lang/String;Lcom/android/internal/telephony/SMSDispatcher$MultipartSmsSenderCallback;)V
Lcom/android/internal/telephony/SMSDispatcher$MultipartSmsSenderCallback;-><init>(Lcom/android/internal/telephony/SMSDispatcher;Lcom/android/internal/telephony/SMSDispatcher$MultipartSmsSender;)V
Lcom/android/internal/telephony/SMSDispatcher$SmsSenderCallback;-><init>(Lcom/android/internal/telephony/SMSDispatcher;Lcom/android/internal/telephony/SMSDispatcher$SmsSender;)V
-Lcom/android/internal/telephony/SMSDispatcher$SmsTracker;->isMultipart()Z
-Lcom/android/internal/telephony/SMSDispatcher$SmsTracker;->mAppInfo:Landroid/content/pm/PackageInfo;
-Lcom/android/internal/telephony/SMSDispatcher$SmsTracker;->mData:Ljava/util/HashMap;
-Lcom/android/internal/telephony/SMSDispatcher$SmsTracker;->mDeliveryIntent:Landroid/app/PendingIntent;
-Lcom/android/internal/telephony/SMSDispatcher$SmsTracker;->mDestAddress:Ljava/lang/String;
-Lcom/android/internal/telephony/SMSDispatcher$SmsTracker;->mMessageRef:I
-Lcom/android/internal/telephony/SMSDispatcher$SmsTracker;->mMessageUri:Landroid/net/Uri;
-Lcom/android/internal/telephony/SMSDispatcher$SmsTracker;->mPersistMessage:Z
-Lcom/android/internal/telephony/SMSDispatcher$SmsTracker;->mSentIntent:Landroid/app/PendingIntent;
-Lcom/android/internal/telephony/SMSDispatcher$SmsTracker;->mTimestamp:J
-Lcom/android/internal/telephony/SMSDispatcher$SmsTracker;->onFailed(Landroid/content/Context;II)V
-Lcom/android/internal/telephony/SMSDispatcher$SmsTracker;->onSent(Landroid/content/Context;)V
-Lcom/android/internal/telephony/SMSDispatcher$SmsTracker;->updateSentMessageStatus(Landroid/content/Context;I)V
Lcom/android/internal/telephony/SMSDispatcher$TextSmsSender;-><init>(Lcom/android/internal/telephony/SMSDispatcher;Lcom/android/internal/telephony/SMSDispatcher$SmsTracker;)V
-Lcom/android/internal/telephony/SMSDispatcher;->calculateLength(Ljava/lang/CharSequence;Z)Lcom/android/internal/telephony/GsmAlphabet$TextEncodingDetails;
-Lcom/android/internal/telephony/SMSDispatcher;->checkCallerIsPhoneOrCarrierApp()V
-Lcom/android/internal/telephony/SMSDispatcher;->deliveryPendingList:Ljava/util/ArrayList;
-Lcom/android/internal/telephony/SMSDispatcher;->dispose()V
-Lcom/android/internal/telephony/SMSDispatcher;->getCarrierAppPackageName()Ljava/lang/String;
-Lcom/android/internal/telephony/SMSDispatcher;->getMultipartMessageText(Ljava/util/ArrayList;)Ljava/lang/String;
-Lcom/android/internal/telephony/SMSDispatcher;->getNextConcatenatedRef()I
-Lcom/android/internal/telephony/SMSDispatcher;->getSubId()I
-Lcom/android/internal/telephony/SMSDispatcher;->handleConfirmShortCode(ZLcom/android/internal/telephony/SMSDispatcher$SmsTracker;)V
-Lcom/android/internal/telephony/SMSDispatcher;->mCi:Lcom/android/internal/telephony/CommandsInterface;
-Lcom/android/internal/telephony/SMSDispatcher;->mContext:Landroid/content/Context;
-Lcom/android/internal/telephony/SMSDispatcher;->mPhone:Lcom/android/internal/telephony/Phone;
-Lcom/android/internal/telephony/SMSDispatcher;->mResolver:Landroid/content/ContentResolver;
-Lcom/android/internal/telephony/SMSDispatcher;->mTelephonyManager:Landroid/telephony/TelephonyManager;
-Lcom/android/internal/telephony/SMSDispatcher;->processSendSmsResponse(Lcom/android/internal/telephony/SMSDispatcher$SmsTracker;II)V
-Lcom/android/internal/telephony/SMSDispatcher;->sendMultipartSms(Lcom/android/internal/telephony/SMSDispatcher$SmsTracker;)V
-Lcom/android/internal/telephony/SMSDispatcher;->sendSms(Lcom/android/internal/telephony/SMSDispatcher$SmsTracker;)V
-Lcom/android/internal/telephony/SMSDispatcher;->sendSubmitPdu(Lcom/android/internal/telephony/SMSDispatcher$SmsTracker;)V
Lcom/android/internal/telephony/SmsHeader$ConcatRef;-><init>()V
Lcom/android/internal/telephony/SmsHeader$PortAddrs;-><init>()V
Lcom/android/internal/telephony/SmsMessageBase;-><init>()V
-Lcom/android/internal/telephony/SmsResponse;-><init>(ILjava/lang/String;I)V
-Lcom/android/internal/telephony/SmsResponse;->mAckPdu:Ljava/lang/String;
-Lcom/android/internal/telephony/SmsResponse;->mErrorCode:I
-Lcom/android/internal/telephony/SmsResponse;->mMessageRef:I
-Lcom/android/internal/telephony/SmsStorageMonitor;->mCi:Lcom/android/internal/telephony/CommandsInterface;
-Lcom/android/internal/telephony/SmsUsageMonitor;-><init>(Landroid/content/Context;)V
-Lcom/android/internal/telephony/SmsUsageMonitor;->check(Ljava/lang/String;I)Z
-Lcom/android/internal/telephony/SubscriptionController;->broadcastDefaultDataSubIdChanged(I)V
-Lcom/android/internal/telephony/SubscriptionController;->colorArr:[I
-Lcom/android/internal/telephony/SubscriptionController;->enforceModifyPhoneState(Ljava/lang/String;)V
-Lcom/android/internal/telephony/SubscriptionController;->getActiveSubInfoCount(Ljava/lang/String;)I
-Lcom/android/internal/telephony/SubscriptionController;->getActiveSubscriptionInfo(ILjava/lang/String;)Landroid/telephony/SubscriptionInfo;
-Lcom/android/internal/telephony/SubscriptionController;->getActiveSubscriptionInfoList(Ljava/lang/String;)Ljava/util/List;
-Lcom/android/internal/telephony/SubscriptionController;->getDefaultDataSubId()I
-Lcom/android/internal/telephony/SubscriptionController;->getDefaultSmsSubId()I
-Lcom/android/internal/telephony/SubscriptionController;->getDefaultSubId()I
-Lcom/android/internal/telephony/SubscriptionController;->getDefaultVoiceSubId()I
-Lcom/android/internal/telephony/SubscriptionController;->getInstance()Lcom/android/internal/telephony/SubscriptionController;
-Lcom/android/internal/telephony/SubscriptionController;->getPhoneId(I)I
-Lcom/android/internal/telephony/SubscriptionController;->getSubId(I)[I
-Lcom/android/internal/telephony/SubscriptionController;->getSubIdUsingPhoneId(I)I
-Lcom/android/internal/telephony/SubscriptionController;->getSubInfo(Ljava/lang/String;Ljava/lang/Object;)Ljava/util/List;
-Lcom/android/internal/telephony/SubscriptionController;->getSubInfoRecord(Landroid/database/Cursor;)Landroid/telephony/SubscriptionInfo;
-Lcom/android/internal/telephony/SubscriptionController;->isActiveSubId(I)Z
-Lcom/android/internal/telephony/SubscriptionController;->isSubInfoReady()Z
-Lcom/android/internal/telephony/SubscriptionController;->logd(Ljava/lang/String;)V
-Lcom/android/internal/telephony/SubscriptionController;->logdl(Ljava/lang/String;)V
-Lcom/android/internal/telephony/SubscriptionController;->loge(Ljava/lang/String;)V
-Lcom/android/internal/telephony/SubscriptionController;->mContext:Landroid/content/Context;
-Lcom/android/internal/telephony/SubscriptionController;->mDefaultPhoneId:I
-Lcom/android/internal/telephony/SubscriptionController;->mLock:Ljava/lang/Object;
-Lcom/android/internal/telephony/SubscriptionController;->notifySubscriptionInfoChanged()V
-Lcom/android/internal/telephony/SubscriptionController;->setDefaultDataSubId(I)V
-Lcom/android/internal/telephony/SubscriptionController;->setDefaultFallbackSubId(II)V
-Lcom/android/internal/telephony/SubscriptionController;->setDefaultSmsSubId(I)V
-Lcom/android/internal/telephony/SubscriptionController;->setDefaultVoiceSubId(I)V
-Lcom/android/internal/telephony/SubscriptionController;->setPlmnSpn(IZLjava/lang/String;ZLjava/lang/String;)Z
-Lcom/android/internal/telephony/SubscriptionController;->updateAllDataConnectionTrackers()V
-Lcom/android/internal/telephony/SubscriptionController;->validateSubId(I)V
-Lcom/android/internal/telephony/SubscriptionInfoUpdater;->broadcastSimStateChanged(ILjava/lang/String;Ljava/lang/String;)V
-Lcom/android/internal/telephony/SubscriptionInfoUpdater;->isAllIccIdQueryDone()Z
-Lcom/android/internal/telephony/SubscriptionInfoUpdater;->logd(Ljava/lang/String;)V
-Lcom/android/internal/telephony/SubscriptionInfoUpdater;->mContext:Landroid/content/Context;
-Lcom/android/internal/telephony/SubscriptionInfoUpdater;->mCurrentlyActiveUserId:I
-Lcom/android/internal/telephony/SubscriptionInfoUpdater;->mIccId:[Ljava/lang/String;
-Lcom/android/internal/telephony/SubscriptionInfoUpdater;->mPackageManager:Landroid/content/pm/IPackageManager;
-Lcom/android/internal/telephony/SubscriptionInfoUpdater;->mPhone:[Lcom/android/internal/telephony/Phone;
-Lcom/android/internal/telephony/SubscriptionInfoUpdater;->PROJECT_SIM_NUM:I
-Lcom/android/internal/telephony/TelephonyCapabilities;->supportsAdn(I)Z
Lcom/android/internal/telephony/TelephonyProperties;->PROPERTY_ICC_OPERATOR_NUMERIC:Ljava/lang/String;
Lcom/android/internal/telephony/test/InterpreterEx;-><init>(Ljava/lang/String;)V
Lcom/android/internal/telephony/test/SimulatedCommands;->acceptCall(Landroid/os/Message;)V
@@ -3124,143 +1681,11 @@
Lcom/android/internal/telephony/test/SimulatedGsmCallState;->releaseHeldOrUDUB()Z
Lcom/android/internal/telephony/test/SimulatedGsmCallState;->separateCall(I)Z
Lcom/android/internal/telephony/test/SimulatedGsmCallState;->switchActiveAndHeldOrWaiting()Z
-Lcom/android/internal/telephony/uicc/AdnRecord;-><init>(IILjava/lang/String;Ljava/lang/String;)V
-Lcom/android/internal/telephony/uicc/AdnRecord;-><init>(IILjava/lang/String;Ljava/lang/String;[Ljava/lang/String;)V
-Lcom/android/internal/telephony/uicc/AdnRecord;-><init>(II[B)V
-Lcom/android/internal/telephony/uicc/AdnRecord;-><init>(Ljava/lang/String;Ljava/lang/String;)V
-Lcom/android/internal/telephony/uicc/AdnRecord;-><init>(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;)V
-Lcom/android/internal/telephony/uicc/AdnRecord;-><init>([B)V
-Lcom/android/internal/telephony/uicc/AdnRecord;->buildAdnString(I)[B
-Lcom/android/internal/telephony/uicc/AdnRecord;->CREATOR:Landroid/os/Parcelable$Creator;
-Lcom/android/internal/telephony/uicc/AdnRecord;->getEmails()[Ljava/lang/String;
-Lcom/android/internal/telephony/uicc/AdnRecord;->getNumber()Ljava/lang/String;
-Lcom/android/internal/telephony/uicc/AdnRecord;->isEmpty()Z
-Lcom/android/internal/telephony/uicc/AdnRecord;->mAlphaTag:Ljava/lang/String;
-Lcom/android/internal/telephony/uicc/AdnRecord;->mEfid:I
-Lcom/android/internal/telephony/uicc/AdnRecord;->mEmails:[Ljava/lang/String;
-Lcom/android/internal/telephony/uicc/AdnRecord;->mExtRecord:I
-Lcom/android/internal/telephony/uicc/AdnRecord;->mNumber:Ljava/lang/String;
-Lcom/android/internal/telephony/uicc/AdnRecord;->mRecordNumber:I
-Lcom/android/internal/telephony/uicc/AdnRecord;->setEmails([Ljava/lang/String;)V
-Lcom/android/internal/telephony/uicc/AdnRecordCache;->extensionEfForEf(I)I
-Lcom/android/internal/telephony/uicc/AdnRecordCache;->getRecordsIfLoaded(I)Ljava/util/ArrayList;
-Lcom/android/internal/telephony/uicc/AdnRecordCache;->mAdnLikeWaiters:Landroid/util/SparseArray;
-Lcom/android/internal/telephony/uicc/AdnRecordCache;->mFh:Lcom/android/internal/telephony/uicc/IccFileHandler;
-Lcom/android/internal/telephony/uicc/AdnRecordCache;->mUserWriteResponse:Landroid/util/SparseArray;
-Lcom/android/internal/telephony/uicc/AdnRecordCache;->mUsimPhoneBookManager:Lcom/android/internal/telephony/gsm/UsimPhoneBookManager;
-Lcom/android/internal/telephony/uicc/AdnRecordCache;->reset()V
-Lcom/android/internal/telephony/uicc/AdnRecordCache;->sendErrorResponse(Landroid/os/Message;Ljava/lang/String;)V
-Lcom/android/internal/telephony/uicc/AdnRecordCache;->updateAdnByIndex(ILcom/android/internal/telephony/uicc/AdnRecord;ILjava/lang/String;Landroid/os/Message;)V
-Lcom/android/internal/telephony/uicc/AdnRecordLoader;-><init>(Lcom/android/internal/telephony/uicc/IccFileHandler;)V
-Lcom/android/internal/telephony/uicc/AdnRecordLoader;->getEFPath(I)Ljava/lang/String;
-Lcom/android/internal/telephony/uicc/AdnRecordLoader;->loadFromEF(IIILandroid/os/Message;)V
-Lcom/android/internal/telephony/uicc/AdnRecordLoader;->mFh:Lcom/android/internal/telephony/uicc/IccFileHandler;
-Lcom/android/internal/telephony/uicc/AdnRecordLoader;->updateEF(Lcom/android/internal/telephony/uicc/AdnRecord;IIILjava/lang/String;Landroid/os/Message;)V
-Lcom/android/internal/telephony/uicc/IccCardApplicationStatus$AppState;->APPSTATE_DETECTED:Lcom/android/internal/telephony/uicc/IccCardApplicationStatus$AppState;
-Lcom/android/internal/telephony/uicc/IccCardApplicationStatus$AppState;->APPSTATE_PIN:Lcom/android/internal/telephony/uicc/IccCardApplicationStatus$AppState;
-Lcom/android/internal/telephony/uicc/IccCardApplicationStatus$AppState;->APPSTATE_PUK:Lcom/android/internal/telephony/uicc/IccCardApplicationStatus$AppState;
-Lcom/android/internal/telephony/uicc/IccCardApplicationStatus$AppState;->APPSTATE_READY:Lcom/android/internal/telephony/uicc/IccCardApplicationStatus$AppState;
-Lcom/android/internal/telephony/uicc/IccCardApplicationStatus$AppState;->APPSTATE_SUBSCRIPTION_PERSO:Lcom/android/internal/telephony/uicc/IccCardApplicationStatus$AppState;
-Lcom/android/internal/telephony/uicc/IccCardApplicationStatus$AppState;->APPSTATE_UNKNOWN:Lcom/android/internal/telephony/uicc/IccCardApplicationStatus$AppState;
Lcom/android/internal/telephony/uicc/IccCardApplicationStatus$AppState;->values()[Lcom/android/internal/telephony/uicc/IccCardApplicationStatus$AppState;
-Lcom/android/internal/telephony/uicc/IccCardApplicationStatus$AppType;->APPTYPE_CSIM:Lcom/android/internal/telephony/uicc/IccCardApplicationStatus$AppType;
-Lcom/android/internal/telephony/uicc/IccCardApplicationStatus$AppType;->APPTYPE_ISIM:Lcom/android/internal/telephony/uicc/IccCardApplicationStatus$AppType;
-Lcom/android/internal/telephony/uicc/IccCardApplicationStatus$AppType;->APPTYPE_RUIM:Lcom/android/internal/telephony/uicc/IccCardApplicationStatus$AppType;
-Lcom/android/internal/telephony/uicc/IccCardApplicationStatus$AppType;->APPTYPE_SIM:Lcom/android/internal/telephony/uicc/IccCardApplicationStatus$AppType;
-Lcom/android/internal/telephony/uicc/IccCardApplicationStatus$AppType;->APPTYPE_UNKNOWN:Lcom/android/internal/telephony/uicc/IccCardApplicationStatus$AppType;
-Lcom/android/internal/telephony/uicc/IccCardApplicationStatus$AppType;->APPTYPE_USIM:Lcom/android/internal/telephony/uicc/IccCardApplicationStatus$AppType;
Lcom/android/internal/telephony/uicc/IccCardApplicationStatus$AppType;->values()[Lcom/android/internal/telephony/uicc/IccCardApplicationStatus$AppType;
-Lcom/android/internal/telephony/uicc/IccCardApplicationStatus$PersoSubState;->PERSOSUBSTATE_SIM_NETWORK:Lcom/android/internal/telephony/uicc/IccCardApplicationStatus$PersoSubState;
-Lcom/android/internal/telephony/uicc/IccCardApplicationStatus$PersoSubState;->PERSOSUBSTATE_SIM_NETWORK_SUBSET:Lcom/android/internal/telephony/uicc/IccCardApplicationStatus$PersoSubState;
-Lcom/android/internal/telephony/uicc/IccCardApplicationStatus$PersoSubState;->PERSOSUBSTATE_SIM_NETWORK_SUBSET_PUK:Lcom/android/internal/telephony/uicc/IccCardApplicationStatus$PersoSubState;
-Lcom/android/internal/telephony/uicc/IccCardApplicationStatus$PersoSubState;->PERSOSUBSTATE_SIM_SERVICE_PROVIDER:Lcom/android/internal/telephony/uicc/IccCardApplicationStatus$PersoSubState;
-Lcom/android/internal/telephony/uicc/IccCardApplicationStatus$PersoSubState;->PERSOSUBSTATE_SIM_SERVICE_PROVIDER_PUK:Lcom/android/internal/telephony/uicc/IccCardApplicationStatus$PersoSubState;
-Lcom/android/internal/telephony/uicc/IccCardApplicationStatus$PersoSubState;->PERSOSUBSTATE_UNKNOWN:Lcom/android/internal/telephony/uicc/IccCardApplicationStatus$PersoSubState;
Lcom/android/internal/telephony/uicc/IccCardApplicationStatus$PersoSubState;->values()[Lcom/android/internal/telephony/uicc/IccCardApplicationStatus$PersoSubState;
Lcom/android/internal/telephony/uicc/IccCardApplicationStatus;-><init>()V
-Lcom/android/internal/telephony/uicc/IccCardApplicationStatus;->AppTypeFromRILInt(I)Lcom/android/internal/telephony/uicc/IccCardApplicationStatus$AppType;
-Lcom/android/internal/telephony/uicc/IccCardApplicationStatus;->app_type:Lcom/android/internal/telephony/uicc/IccCardApplicationStatus$AppType;
-Lcom/android/internal/telephony/uicc/IccCardStatus$CardState;->CARDSTATE_ABSENT:Lcom/android/internal/telephony/uicc/IccCardStatus$CardState;
-Lcom/android/internal/telephony/uicc/IccCardStatus$CardState;->CARDSTATE_ERROR:Lcom/android/internal/telephony/uicc/IccCardStatus$CardState;
-Lcom/android/internal/telephony/uicc/IccCardStatus$CardState;->CARDSTATE_PRESENT:Lcom/android/internal/telephony/uicc/IccCardStatus$CardState;
-Lcom/android/internal/telephony/uicc/IccCardStatus$CardState;->isCardPresent()Z
-Lcom/android/internal/telephony/uicc/IccCardStatus$PinState;->PINSTATE_DISABLED:Lcom/android/internal/telephony/uicc/IccCardStatus$PinState;
-Lcom/android/internal/telephony/uicc/IccCardStatus$PinState;->PINSTATE_ENABLED_BLOCKED:Lcom/android/internal/telephony/uicc/IccCardStatus$PinState;
-Lcom/android/internal/telephony/uicc/IccCardStatus$PinState;->PINSTATE_ENABLED_PERM_BLOCKED:Lcom/android/internal/telephony/uicc/IccCardStatus$PinState;
-Lcom/android/internal/telephony/uicc/IccCardStatus;->mApplications:[Lcom/android/internal/telephony/uicc/IccCardApplicationStatus;
-Lcom/android/internal/telephony/uicc/IccCardStatus;->mCardState:Lcom/android/internal/telephony/uicc/IccCardStatus$CardState;
-Lcom/android/internal/telephony/uicc/IccCardStatus;->mCdmaSubscriptionAppIndex:I
-Lcom/android/internal/telephony/uicc/IccCardStatus;->mGsmUmtsSubscriptionAppIndex:I
-Lcom/android/internal/telephony/uicc/IccCardStatus;->mImsSubscriptionAppIndex:I
-Lcom/android/internal/telephony/uicc/IccCardStatus;->mUniversalPinState:Lcom/android/internal/telephony/uicc/IccCardStatus$PinState;
-Lcom/android/internal/telephony/uicc/IccFileHandler$LoadLinearFixedContext;-><init>(IILandroid/os/Message;)V
-Lcom/android/internal/telephony/uicc/IccFileHandler$LoadLinearFixedContext;->mRecordSize:I
-Lcom/android/internal/telephony/uicc/IccFileHandler$LoadLinearFixedContext;->results:Ljava/util/ArrayList;
-Lcom/android/internal/telephony/uicc/IccFileHandler;->getEFLinearRecordSize(ILandroid/os/Message;)V
-Lcom/android/internal/telephony/uicc/IccFileHandler;->getEFLinearRecordSize(ILjava/lang/String;Landroid/os/Message;)V
-Lcom/android/internal/telephony/uicc/IccFileHandler;->getEFPath(I)Ljava/lang/String;
-Lcom/android/internal/telephony/uicc/IccFileHandler;->loadEFLinearFixed(IILandroid/os/Message;)V
-Lcom/android/internal/telephony/uicc/IccFileHandler;->loadEFLinearFixed(ILjava/lang/String;ILandroid/os/Message;)V
-Lcom/android/internal/telephony/uicc/IccFileHandler;->loadEFLinearFixedAll(ILandroid/os/Message;)V
-Lcom/android/internal/telephony/uicc/IccFileHandler;->loadEFLinearFixedAll(ILjava/lang/String;Landroid/os/Message;)V
-Lcom/android/internal/telephony/uicc/IccFileHandler;->loadEFTransparent(ILandroid/os/Message;)V
-Lcom/android/internal/telephony/uicc/IccFileHandler;->mAid:Ljava/lang/String;
-Lcom/android/internal/telephony/uicc/IccFileHandler;->mCi:Lcom/android/internal/telephony/CommandsInterface;
-Lcom/android/internal/telephony/uicc/IccFileHandler;->mParentApp:Lcom/android/internal/telephony/uicc/UiccCardApplication;
-Lcom/android/internal/telephony/uicc/IccFileHandler;->updateEFLinearFixed(II[BLjava/lang/String;Landroid/os/Message;)V
-Lcom/android/internal/telephony/uicc/IccFileHandler;->updateEFLinearFixed(ILjava/lang/String;I[BLjava/lang/String;Landroid/os/Message;)V
-Lcom/android/internal/telephony/uicc/IccFileHandler;->updateEFTransparent(I[BLandroid/os/Message;)V
-Lcom/android/internal/telephony/uicc/IccIoResult;-><init>(IILjava/lang/String;)V
-Lcom/android/internal/telephony/uicc/IccIoResult;-><init>(II[B)V
-Lcom/android/internal/telephony/uicc/IccIoResult;->payload:[B
-Lcom/android/internal/telephony/uicc/IccIoResult;->success()Z
-Lcom/android/internal/telephony/uicc/IccIoResult;->sw1:I
-Lcom/android/internal/telephony/uicc/IccIoResult;->sw2:I
-Lcom/android/internal/telephony/uicc/IccRecords;->auth_rsp:Lcom/android/internal/telephony/uicc/IccIoResult;
-Lcom/android/internal/telephony/uicc/IccRecords;->getGid1()Ljava/lang/String;
-Lcom/android/internal/telephony/uicc/IccRecords;->getIccId()Ljava/lang/String;
-Lcom/android/internal/telephony/uicc/IccRecords;->getIccSimChallengeResponse(ILjava/lang/String;)Ljava/lang/String;
-Lcom/android/internal/telephony/uicc/IccRecords;->getIMSI()Ljava/lang/String;
-Lcom/android/internal/telephony/uicc/IccRecords;->getMsisdnNumber()Ljava/lang/String;
-Lcom/android/internal/telephony/uicc/IccRecords;->getOperatorNumeric()Ljava/lang/String;
-Lcom/android/internal/telephony/uicc/IccRecords;->getRecordsLoaded()Z
-Lcom/android/internal/telephony/uicc/IccRecords;->getServiceProviderName()Ljava/lang/String;
-Lcom/android/internal/telephony/uicc/IccRecords;->getUsimServiceTable()Lcom/android/internal/telephony/uicc/UsimServiceTable;
-Lcom/android/internal/telephony/uicc/IccRecords;->handleRefresh(Lcom/android/internal/telephony/uicc/IccRefreshResponse;)V
-Lcom/android/internal/telephony/uicc/IccRecords;->log(Ljava/lang/String;)V
-Lcom/android/internal/telephony/uicc/IccRecords;->mAdnCache:Lcom/android/internal/telephony/uicc/AdnRecordCache;
-Lcom/android/internal/telephony/uicc/IccRecords;->mCi:Lcom/android/internal/telephony/CommandsInterface;
-Lcom/android/internal/telephony/uicc/IccRecords;->mContext:Landroid/content/Context;
-Lcom/android/internal/telephony/uicc/IccRecords;->mDestroyed:Ljava/util/concurrent/atomic/AtomicBoolean;
-Lcom/android/internal/telephony/uicc/IccRecords;->mFh:Lcom/android/internal/telephony/uicc/IccFileHandler;
-Lcom/android/internal/telephony/uicc/IccRecords;->mGid1:Ljava/lang/String;
-Lcom/android/internal/telephony/uicc/IccRecords;->mIccId:Ljava/lang/String;
-Lcom/android/internal/telephony/uicc/IccRecords;->mImsi:Ljava/lang/String;
-Lcom/android/internal/telephony/uicc/IccRecords;->mIsVoiceMailFixed:Z
-Lcom/android/internal/telephony/uicc/IccRecords;->mLock:Ljava/lang/Object;
-Lcom/android/internal/telephony/uicc/IccRecords;->mMncLength:I
-Lcom/android/internal/telephony/uicc/IccRecords;->mParentApp:Lcom/android/internal/telephony/uicc/UiccCardApplication;
-Lcom/android/internal/telephony/uicc/IccRecords;->mRecordsEventsRegistrants:Landroid/os/RegistrantList;
-Lcom/android/internal/telephony/uicc/IccRecords;->mRecordsToLoad:I
-Lcom/android/internal/telephony/uicc/IccRecords;->mSpn:Ljava/lang/String;
-Lcom/android/internal/telephony/uicc/IccRecords;->mTelephonyManager:Landroid/telephony/TelephonyManager;
-Lcom/android/internal/telephony/uicc/IccRecords;->mVoiceMailNum:Ljava/lang/String;
-Lcom/android/internal/telephony/uicc/IccRecords;->registerForNetworkSelectionModeAutomatic(Landroid/os/Handler;ILjava/lang/Object;)V
-Lcom/android/internal/telephony/uicc/IccRecords;->registerForNewSms(Landroid/os/Handler;ILjava/lang/Object;)V
-Lcom/android/internal/telephony/uicc/IccRecords;->registerForRecordsEvents(Landroid/os/Handler;ILjava/lang/Object;)V
-Lcom/android/internal/telephony/uicc/IccRecords;->registerForRecordsLoaded(Landroid/os/Handler;ILjava/lang/Object;)V
-Lcom/android/internal/telephony/uicc/IccRecords;->setMsisdnNumber(Ljava/lang/String;Ljava/lang/String;Landroid/os/Message;)V
-Lcom/android/internal/telephony/uicc/IccRecords;->setVoiceCallForwardingFlag(IZLjava/lang/String;)V
-Lcom/android/internal/telephony/uicc/IccRecords;->unregisterForNetworkSelectionModeAutomatic(Landroid/os/Handler;)V
-Lcom/android/internal/telephony/uicc/IccRecords;->unregisterForNewSms(Landroid/os/Handler;)V
-Lcom/android/internal/telephony/uicc/IccRecords;->unregisterForRecordsEvents(Landroid/os/Handler;)V
-Lcom/android/internal/telephony/uicc/IccRecords;->unregisterForRecordsLoaded(Landroid/os/Handler;)V
Lcom/android/internal/telephony/uicc/IccRefreshResponse;-><init>()V
-Lcom/android/internal/telephony/uicc/IccRefreshResponse;->aid:Ljava/lang/String;
-Lcom/android/internal/telephony/uicc/IccRefreshResponse;->efId:I
-Lcom/android/internal/telephony/uicc/IccRefreshResponse;->refreshResult:I
-Lcom/android/internal/telephony/uicc/IccServiceTable;->getTag()Ljava/lang/String;
-Lcom/android/internal/telephony/uicc/IccServiceTable;->mServiceTable:[B
Lcom/android/internal/telephony/uicc/IccUtils;->adnStringFieldToString([BII)Ljava/lang/String;
Lcom/android/internal/telephony/uicc/IccUtils;->bcdToString([BII)Ljava/lang/String;
Lcom/android/internal/telephony/uicc/IccUtils;->bytesToHexString([B)Ljava/lang/String;
@@ -3272,175 +1697,7 @@
Lcom/android/internal/telephony/uicc/IccUtils;->networkNameToString([BII)Ljava/lang/String;
Lcom/android/internal/telephony/uicc/IccUtils;->parseToBnW([BI)Landroid/graphics/Bitmap;
Lcom/android/internal/telephony/uicc/IccUtils;->parseToRGB([BIZ)Landroid/graphics/Bitmap;
-Lcom/android/internal/telephony/uicc/IsimRecords;->getIsimDomain()Ljava/lang/String;
-Lcom/android/internal/telephony/uicc/IsimRecords;->getIsimImpi()Ljava/lang/String;
-Lcom/android/internal/telephony/uicc/IsimRecords;->getIsimImpu()[Ljava/lang/String;
-Lcom/android/internal/telephony/uicc/IsimUiccRecords;->auth_rsp:Ljava/lang/String;
-Lcom/android/internal/telephony/uicc/IsimUiccRecords;->fetchIsimRecords()V
-Lcom/android/internal/telephony/uicc/IsimUiccRecords;->isimTlvToString([B)Ljava/lang/String;
-Lcom/android/internal/telephony/uicc/IsimUiccRecords;->log(Ljava/lang/String;)V
-Lcom/android/internal/telephony/uicc/IsimUiccRecords;->mIsimDomain:Ljava/lang/String;
-Lcom/android/internal/telephony/uicc/IsimUiccRecords;->mIsimImpi:Ljava/lang/String;
-Lcom/android/internal/telephony/uicc/IsimUiccRecords;->mIsimImpu:[Ljava/lang/String;
-Lcom/android/internal/telephony/uicc/IsimUiccRecords;->mIsimIst:Ljava/lang/String;
-Lcom/android/internal/telephony/uicc/IsimUiccRecords;->mIsimPcscf:[Ljava/lang/String;
-Lcom/android/internal/telephony/uicc/IsimUiccRecords;->mLock:Ljava/lang/Object;
-Lcom/android/internal/telephony/uicc/RuimRecords;->adjstMinDigits(I)I
-Lcom/android/internal/telephony/uicc/RuimRecords;->fetchRuimRecords()V
-Lcom/android/internal/telephony/uicc/RuimRecords;->getAssetLanguages(Landroid/content/Context;)[Ljava/lang/String;
-Lcom/android/internal/telephony/uicc/RuimRecords;->getCsimSpnDisplayCondition()Z
-Lcom/android/internal/telephony/uicc/RuimRecords;->getMdn()Ljava/lang/String;
-Lcom/android/internal/telephony/uicc/RuimRecords;->getMdnNumber()Ljava/lang/String;
-Lcom/android/internal/telephony/uicc/RuimRecords;->getRUIMOperatorNumeric()Ljava/lang/String;
-Lcom/android/internal/telephony/uicc/RuimRecords;->log(Ljava/lang/String;)V
-Lcom/android/internal/telephony/uicc/RuimRecords;->loge(Ljava/lang/String;)V
-Lcom/android/internal/telephony/uicc/RuimRecords;->mEFli:[B
-Lcom/android/internal/telephony/uicc/RuimRecords;->mEFpl:[B
-Lcom/android/internal/telephony/uicc/RuimRecords;->mMin:Ljava/lang/String;
-Lcom/android/internal/telephony/uicc/RuimRecords;->mNai:Ljava/lang/String;
-Lcom/android/internal/telephony/uicc/RuimRecords;->onGetCSimEprlDone(Landroid/os/AsyncResult;)V
-Lcom/android/internal/telephony/uicc/SIMRecords$GetSpnFsmState;->INIT:Lcom/android/internal/telephony/uicc/SIMRecords$GetSpnFsmState;
-Lcom/android/internal/telephony/uicc/SIMRecords$GetSpnFsmState;->READ_SPN_3GPP:Lcom/android/internal/telephony/uicc/SIMRecords$GetSpnFsmState;
-Lcom/android/internal/telephony/uicc/SIMRecords$GetSpnFsmState;->READ_SPN_CPHS:Lcom/android/internal/telephony/uicc/SIMRecords$GetSpnFsmState;
-Lcom/android/internal/telephony/uicc/SIMRecords$GetSpnFsmState;->READ_SPN_SHORT_CPHS:Lcom/android/internal/telephony/uicc/SIMRecords$GetSpnFsmState;
Lcom/android/internal/telephony/uicc/SIMRecords$GetSpnFsmState;->values()[Lcom/android/internal/telephony/uicc/SIMRecords$GetSpnFsmState;
-Lcom/android/internal/telephony/uicc/SIMRecords;->fetchSimRecords()V
-Lcom/android/internal/telephony/uicc/SIMRecords;->getExtFromEf(I)I
-Lcom/android/internal/telephony/uicc/SIMRecords;->getMsisdnNumber()Ljava/lang/String;
-Lcom/android/internal/telephony/uicc/SIMRecords;->getOperatorNumeric()Ljava/lang/String;
-Lcom/android/internal/telephony/uicc/SIMRecords;->getSpnFsm(ZLandroid/os/AsyncResult;)V
-Lcom/android/internal/telephony/uicc/SIMRecords;->getVoiceMailNumber()Ljava/lang/String;
-Lcom/android/internal/telephony/uicc/SIMRecords;->isCphsMailboxEnabled()Z
-Lcom/android/internal/telephony/uicc/SIMRecords;->log(Ljava/lang/String;)V
-Lcom/android/internal/telephony/uicc/SIMRecords;->loge(Ljava/lang/String;)V
-Lcom/android/internal/telephony/uicc/SIMRecords;->logv(Ljava/lang/String;)V
-Lcom/android/internal/telephony/uicc/SIMRecords;->mEfCff:[B
-Lcom/android/internal/telephony/uicc/SIMRecords;->mEfCfis:[B
-Lcom/android/internal/telephony/uicc/SIMRecords;->mEfCPHS_MWI:[B
-Lcom/android/internal/telephony/uicc/SIMRecords;->mEfLi:[B
-Lcom/android/internal/telephony/uicc/SIMRecords;->mEfMWIS:[B
-Lcom/android/internal/telephony/uicc/SIMRecords;->mEfPl:[B
-Lcom/android/internal/telephony/uicc/SIMRecords;->mSpnDisplayCondition:I
-Lcom/android/internal/telephony/uicc/SIMRecords;->mUsimServiceTable:Lcom/android/internal/telephony/uicc/UsimServiceTable;
-Lcom/android/internal/telephony/uicc/SIMRecords;->mVmConfig:Lcom/android/internal/telephony/uicc/VoiceMailConstants;
-Lcom/android/internal/telephony/uicc/SIMRecords;->setVoiceCallForwardingFlag(IZLjava/lang/String;)V
-Lcom/android/internal/telephony/uicc/UiccCard;->getApplication(I)Lcom/android/internal/telephony/uicc/UiccCardApplication;
-Lcom/android/internal/telephony/uicc/UiccCard;->getApplicationByType(I)Lcom/android/internal/telephony/uicc/UiccCardApplication;
-Lcom/android/internal/telephony/uicc/UiccCard;->getApplicationIndex(I)Lcom/android/internal/telephony/uicc/UiccCardApplication;
-Lcom/android/internal/telephony/uicc/UiccCard;->getCardState()Lcom/android/internal/telephony/uicc/IccCardStatus$CardState;
-Lcom/android/internal/telephony/uicc/UiccCard;->getCarrierPackageNamesForIntent(Landroid/content/pm/PackageManager;Landroid/content/Intent;)Ljava/util/List;
-Lcom/android/internal/telephony/uicc/UiccCard;->getIccId()Ljava/lang/String;
-Lcom/android/internal/telephony/uicc/UiccCard;->getNumApplications()I
-Lcom/android/internal/telephony/uicc/UiccCard;->getOperatorBrandOverride()Ljava/lang/String;
-Lcom/android/internal/telephony/uicc/UiccCard;->isApplicationOnIcc(Lcom/android/internal/telephony/uicc/IccCardApplicationStatus$AppType;)Z
-Lcom/android/internal/telephony/uicc/UiccCard;->log(Ljava/lang/String;)V
-Lcom/android/internal/telephony/uicc/UiccCard;->loge(Ljava/lang/String;)V
-Lcom/android/internal/telephony/uicc/UiccCard;->mCardState:Lcom/android/internal/telephony/uicc/IccCardStatus$CardState;
-Lcom/android/internal/telephony/uicc/UiccCard;->mCi:Lcom/android/internal/telephony/CommandsInterface;
-Lcom/android/internal/telephony/uicc/UiccCard;->mContext:Landroid/content/Context;
-Lcom/android/internal/telephony/uicc/UiccCard;->mLock:Ljava/lang/Object;
-Lcom/android/internal/telephony/uicc/UiccCard;->mPhoneId:I
-Lcom/android/internal/telephony/uicc/UiccCardApplication;->dispose()V
-Lcom/android/internal/telephony/uicc/UiccCardApplication;->getAid()Ljava/lang/String;
-Lcom/android/internal/telephony/uicc/UiccCardApplication;->getAuthContext()I
-Lcom/android/internal/telephony/uicc/UiccCardApplication;->getIccFileHandler()Lcom/android/internal/telephony/uicc/IccFileHandler;
-Lcom/android/internal/telephony/uicc/UiccCardApplication;->getIccRecords()Lcom/android/internal/telephony/uicc/IccRecords;
-Lcom/android/internal/telephony/uicc/UiccCardApplication;->getPersoSubState()Lcom/android/internal/telephony/uicc/IccCardApplicationStatus$PersoSubState;
-Lcom/android/internal/telephony/uicc/UiccCardApplication;->getPhoneId()I
-Lcom/android/internal/telephony/uicc/UiccCardApplication;->getPin1State()Lcom/android/internal/telephony/uicc/IccCardStatus$PinState;
-Lcom/android/internal/telephony/uicc/UiccCardApplication;->getState()Lcom/android/internal/telephony/uicc/IccCardApplicationStatus$AppState;
-Lcom/android/internal/telephony/uicc/UiccCardApplication;->getType()Lcom/android/internal/telephony/uicc/IccCardApplicationStatus$AppType;
-Lcom/android/internal/telephony/uicc/UiccCardApplication;->log(Ljava/lang/String;)V
-Lcom/android/internal/telephony/uicc/UiccCardApplication;->loge(Ljava/lang/String;)V
-Lcom/android/internal/telephony/uicc/UiccCardApplication;->mAid:Ljava/lang/String;
-Lcom/android/internal/telephony/uicc/UiccCardApplication;->mAppState:Lcom/android/internal/telephony/uicc/IccCardApplicationStatus$AppState;
-Lcom/android/internal/telephony/uicc/UiccCardApplication;->mAppType:Lcom/android/internal/telephony/uicc/IccCardApplicationStatus$AppType;
-Lcom/android/internal/telephony/uicc/UiccCardApplication;->mCi:Lcom/android/internal/telephony/CommandsInterface;
-Lcom/android/internal/telephony/uicc/UiccCardApplication;->mDestroyed:Z
-Lcom/android/internal/telephony/uicc/UiccCardApplication;->mLock:Ljava/lang/Object;
-Lcom/android/internal/telephony/uicc/UiccCardApplication;->mPersoSubState:Lcom/android/internal/telephony/uicc/IccCardApplicationStatus$PersoSubState;
-Lcom/android/internal/telephony/uicc/UiccCardApplication;->mPin1State:Lcom/android/internal/telephony/uicc/IccCardStatus$PinState;
-Lcom/android/internal/telephony/uicc/UiccCardApplication;->registerForReady(Landroid/os/Handler;ILjava/lang/Object;)V
-Lcom/android/internal/telephony/uicc/UiccCardApplication;->unregisterForReady(Landroid/os/Handler;)V
-Lcom/android/internal/telephony/uicc/UiccCardApplication;->update(Lcom/android/internal/telephony/uicc/IccCardApplicationStatus;Landroid/content/Context;Lcom/android/internal/telephony/CommandsInterface;)V
-Lcom/android/internal/telephony/uicc/UiccCarrierPrivilegeRules$TLV;->length:Ljava/lang/Integer;
-Lcom/android/internal/telephony/uicc/UiccCarrierPrivilegeRules$TLV;->value:Ljava/lang/String;
-Lcom/android/internal/telephony/uicc/UiccCarrierPrivilegeRules;->mLoadedCallback:Landroid/os/Message;
-Lcom/android/internal/telephony/uicc/UiccCarrierPrivilegeRules;->mState:Ljava/util/concurrent/atomic/AtomicInteger;
-Lcom/android/internal/telephony/uicc/UiccController;->getIccFileHandler(II)Lcom/android/internal/telephony/uicc/IccFileHandler;
-Lcom/android/internal/telephony/uicc/UiccController;->getIccRecords(II)Lcom/android/internal/telephony/uicc/IccRecords;
-Lcom/android/internal/telephony/uicc/UiccController;->getInstance()Lcom/android/internal/telephony/uicc/UiccController;
-Lcom/android/internal/telephony/uicc/UiccController;->getUiccCard(I)Lcom/android/internal/telephony/uicc/UiccCard;
-Lcom/android/internal/telephony/uicc/UiccController;->getUiccCardApplication(II)Lcom/android/internal/telephony/uicc/UiccCardApplication;
-Lcom/android/internal/telephony/uicc/UiccController;->log(Ljava/lang/String;)V
-Lcom/android/internal/telephony/uicc/UiccController;->mCis:[Lcom/android/internal/telephony/CommandsInterface;
-Lcom/android/internal/telephony/uicc/UiccController;->mContext:Landroid/content/Context;
-Lcom/android/internal/telephony/uicc/UiccController;->mInstance:Lcom/android/internal/telephony/uicc/UiccController;
-Lcom/android/internal/telephony/uicc/UiccController;->mLock:Ljava/lang/Object;
-Lcom/android/internal/telephony/uicc/UiccController;->registerForIccChanged(Landroid/os/Handler;ILjava/lang/Object;)V
-Lcom/android/internal/telephony/uicc/UsimServiceTable$UsimService;->ALLOWED_CSG_LISTS_AND_INDICATIONS:Lcom/android/internal/telephony/uicc/UsimServiceTable$UsimService;
-Lcom/android/internal/telephony/uicc/UsimServiceTable$UsimService;->CFI_STATUS:Lcom/android/internal/telephony/uicc/UsimServiceTable$UsimService;
-Lcom/android/internal/telephony/uicc/UsimServiceTable$UsimService;->CSG_DISPLAY_CONTROL:Lcom/android/internal/telephony/uicc/UsimServiceTable$UsimService;
-Lcom/android/internal/telephony/uicc/UsimServiceTable$UsimService;->FDN:Lcom/android/internal/telephony/uicc/UsimServiceTable$UsimService;
-Lcom/android/internal/telephony/uicc/UsimServiceTable$UsimService;->MBDN:Lcom/android/internal/telephony/uicc/UsimServiceTable$UsimService;
-Lcom/android/internal/telephony/uicc/UsimServiceTable$UsimService;->MSISDN:Lcom/android/internal/telephony/uicc/UsimServiceTable$UsimService;
-Lcom/android/internal/telephony/uicc/UsimServiceTable$UsimService;->MWI_STATUS:Lcom/android/internal/telephony/uicc/UsimServiceTable$UsimService;
-Lcom/android/internal/telephony/uicc/UsimServiceTable$UsimService;->OPERATOR_CSG_LISTS_AND_INDICATIONS:Lcom/android/internal/telephony/uicc/UsimServiceTable$UsimService;
-Lcom/android/internal/telephony/uicc/UsimServiceTable$UsimService;->OPERATOR_PLMN_LIST:Lcom/android/internal/telephony/uicc/UsimServiceTable$UsimService;
-Lcom/android/internal/telephony/uicc/UsimServiceTable$UsimService;->PLMN_NETWORK_NAME:Lcom/android/internal/telephony/uicc/UsimServiceTable$UsimService;
-Lcom/android/internal/telephony/uicc/UsimServiceTable$UsimService;->SDN:Lcom/android/internal/telephony/uicc/UsimServiceTable$UsimService;
-Lcom/android/internal/telephony/uicc/UsimServiceTable$UsimService;->SM_OVER_IP:Lcom/android/internal/telephony/uicc/UsimServiceTable$UsimService;
-Lcom/android/internal/telephony/uicc/UsimServiceTable$UsimService;->SM_SERVICE_PARAMS:Lcom/android/internal/telephony/uicc/UsimServiceTable$UsimService;
-Lcom/android/internal/telephony/uicc/UsimServiceTable$UsimService;->SM_STORAGE:Lcom/android/internal/telephony/uicc/UsimServiceTable$UsimService;
-Lcom/android/internal/telephony/uicc/UsimServiceTable$UsimService;->SPN:Lcom/android/internal/telephony/uicc/UsimServiceTable$UsimService;
-Lcom/android/internal/telephony/uicc/UsimServiceTable;->isAvailable(Lcom/android/internal/telephony/uicc/UsimServiceTable$UsimService;)Z
-Lcom/android/internal/telephony/uicc/VoiceMailConstants;-><init>()V
-Lcom/android/internal/telephony/UiccPhoneBookController;-><init>([Lcom/android/internal/telephony/Phone;)V
-Lcom/android/internal/telephony/UiccPhoneBookController;->getDefaultSubscription()I
-Lcom/android/internal/telephony/UiccPhoneBookController;->getIccPhoneBookInterfaceManager(I)Lcom/android/internal/telephony/IccPhoneBookInterfaceManager;
-Lcom/android/internal/telephony/UiccPhoneBookController;->mPhone:[Lcom/android/internal/telephony/Phone;
-Lcom/android/internal/telephony/UiccSmsController;->copyMessageToIccEfForSubscriber(ILjava/lang/String;I[B[B)Z
-Lcom/android/internal/telephony/UiccSmsController;->disableCellBroadcastForSubscriber(III)Z
-Lcom/android/internal/telephony/UiccSmsController;->disableCellBroadcastRangeForSubscriber(IIII)Z
-Lcom/android/internal/telephony/UiccSmsController;->enableCellBroadcastForSubscriber(III)Z
-Lcom/android/internal/telephony/UiccSmsController;->enableCellBroadcastRangeForSubscriber(IIII)Z
-Lcom/android/internal/telephony/UiccSmsController;->getAllMessagesFromIccEfForSubscriber(ILjava/lang/String;)Ljava/util/List;
-Lcom/android/internal/telephony/UiccSmsController;->getIccSmsInterfaceManager(I)Lcom/android/internal/telephony/IccSmsInterfaceManager;
-Lcom/android/internal/telephony/UiccSmsController;->getImsSmsFormatForSubscriber(I)Ljava/lang/String;
-Lcom/android/internal/telephony/UiccSmsController;->getPreferredSmsSubscription()I
-Lcom/android/internal/telephony/UiccSmsController;->isImsSmsSupportedForSubscriber(I)Z
-Lcom/android/internal/telephony/UiccSmsController;->sendDataForSubscriber(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;I[BLandroid/app/PendingIntent;Landroid/app/PendingIntent;)V
-Lcom/android/internal/telephony/UiccSmsController;->sendErrorInPendingIntent(Landroid/app/PendingIntent;I)V
-Lcom/android/internal/telephony/UiccSmsController;->sendErrorInPendingIntents(Ljava/util/List;I)V
-Lcom/android/internal/telephony/UiccSmsController;->updateMessageOnIccEfForSubscriber(ILjava/lang/String;II[B)Z
-Lcom/android/internal/telephony/UUSInfo;->getDcs()I
-Lcom/android/internal/telephony/UUSInfo;->getType()I
-Lcom/android/internal/telephony/UUSInfo;->getUserData()[B
-Lcom/android/internal/telephony/WakeLockStateMachine;->log(Ljava/lang/String;)V
-Lcom/android/internal/telephony/WakeLockStateMachine;->mContext:Landroid/content/Context;
-Lcom/android/internal/telephony/WakeLockStateMachine;->mIdleState:Lcom/android/internal/telephony/WakeLockStateMachine$IdleState;
-Lcom/android/internal/telephony/WakeLockStateMachine;->mPhone:Lcom/android/internal/telephony/Phone;
-Lcom/android/internal/telephony/WapPushOverSms;->dispatchWapPdu([BLandroid/content/BroadcastReceiver;Lcom/android/internal/telephony/InboundSmsHandler;)I
-Lcom/android/internal/telephony/WapPushOverSms;->getDeliveryOrReadReportThreadId(Landroid/content/Context;Lcom/google/android/mms/pdu/GenericPdu;)J
-Lcom/android/internal/telephony/WapPushOverSms;->isDuplicateNotification(Landroid/content/Context;Lcom/google/android/mms/pdu/NotificationInd;)Z
-Lcom/android/internal/telephony/WapPushOverSms;->isWapPushForMms([BLcom/android/internal/telephony/InboundSmsHandler;)Z
-Lcom/android/internal/telephony/WapPushOverSms;->mContext:Landroid/content/Context;
-Lcom/android/internal/telephony/WapPushOverSms;->mDeviceIdleController:Landroid/os/IDeviceIdleController;
-Lcom/android/internal/telephony/WapPushOverSms;->mWapPushManager:Lcom/android/internal/telephony/IWapPushManager;
-Lcom/android/internal/telephony/WspTypeDecoder;-><init>([B)V
-Lcom/android/internal/telephony/WspTypeDecoder;->decodeContentType(I)Z
-Lcom/android/internal/telephony/WspTypeDecoder;->decodeIntegerValue(I)Z
-Lcom/android/internal/telephony/WspTypeDecoder;->decodeShortInteger(I)Z
-Lcom/android/internal/telephony/WspTypeDecoder;->decodeTextString(I)Z
-Lcom/android/internal/telephony/WspTypeDecoder;->decodeUintvarInteger(I)Z
-Lcom/android/internal/telephony/WspTypeDecoder;->decodeValueLength(I)Z
-Lcom/android/internal/telephony/WspTypeDecoder;->decodeXWapApplicationId(I)Z
-Lcom/android/internal/telephony/WspTypeDecoder;->getContentParameters()Ljava/util/HashMap;
-Lcom/android/internal/telephony/WspTypeDecoder;->getDecodedDataLength()I
-Lcom/android/internal/telephony/WspTypeDecoder;->getValue32()J
-Lcom/android/internal/telephony/WspTypeDecoder;->getValueString()Ljava/lang/String;
-Lcom/android/internal/telephony/WspTypeDecoder;->mWspData:[B
-Lcom/android/internal/telephony/WspTypeDecoder;->seekXWapApplicationId(II)Z
Lcom/android/internal/textservice/ITextServicesManager$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
Lcom/android/internal/util/ArrayUtils;->appendElement(Ljava/lang/Class;[Ljava/lang/Object;Ljava/lang/Object;)[Ljava/lang/Object;
Lcom/android/internal/util/ArrayUtils;->appendInt([II)[I
diff --git a/core/java/android/app/LoadedApk.java b/core/java/android/app/LoadedApk.java
index 3a76de4..0f1ba39 100644
--- a/core/java/android/app/LoadedApk.java
+++ b/core/java/android/app/LoadedApk.java
@@ -760,6 +760,16 @@
isBundledApp = false;
}
+ // Similar to vendor apks, we should add /product/lib for apks from product partition
+ // and not having /product/lib in the default search path
+ final boolean treatProductApkAsUnbundled = !defaultSearchPaths.contains("/product/lib");
+ if (mApplicationInfo.getCodePath() != null
+ && mApplicationInfo.isProduct() && treatProductApkAsUnbundled
+ // TODO(b/128557860): Change target SDK version when version code R is available.
+ && getTargetSdkVersion() == Build.VERSION_CODES.CUR_DEVELOPMENT) {
+ isBundledApp = false;
+ }
+
makePaths(mActivityThread, isBundledApp, mApplicationInfo, zipPaths, libPaths);
String libraryPermittedPath = mDataDir;
diff --git a/core/java/android/app/SystemServiceRegistry.java b/core/java/android/app/SystemServiceRegistry.java
index a3ee849..b4330fb 100644
--- a/core/java/android/app/SystemServiceRegistry.java
+++ b/core/java/android/app/SystemServiceRegistry.java
@@ -81,11 +81,9 @@
import android.net.EthernetManager;
import android.net.IConnectivityManager;
import android.net.IEthernetManager;
-import android.net.IIpMemoryStore;
import android.net.IIpSecService;
import android.net.INetworkPolicyManager;
import android.net.ITestNetworkManager;
-import android.net.IpMemoryStore;
import android.net.IpSecManager;
import android.net.NetworkPolicyManager;
import android.net.NetworkScoreManager;
@@ -298,17 +296,6 @@
}
});
- registerService(Context.IP_MEMORY_STORE_SERVICE, IpMemoryStore.class,
- new CachedServiceFetcher<IpMemoryStore>() {
- @Override
- public IpMemoryStore createService(final ContextImpl ctx)
- throws ServiceNotFoundException {
- IBinder b = ServiceManager.getServiceOrThrow(
- Context.IP_MEMORY_STORE_SERVICE);
- IIpMemoryStore service = IIpMemoryStore.Stub.asInterface(b);
- return new IpMemoryStore(ctx, service);
- }});
-
registerService(Context.IPSEC_SERVICE, IpSecManager.class,
new CachedServiceFetcher<IpSecManager>() {
@Override
diff --git a/core/java/android/app/admin/DevicePolicyManager.java b/core/java/android/app/admin/DevicePolicyManager.java
index 3871d7a..e2322f3 100644
--- a/core/java/android/app/admin/DevicePolicyManager.java
+++ b/core/java/android/app/admin/DevicePolicyManager.java
@@ -104,6 +104,7 @@
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
+import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.concurrent.Executor;
@@ -4488,7 +4489,8 @@
* </ul>
* The call will fail if called with the package name of an unsupported VPN app.
* <p> Enabling lockdown via {@code lockdownEnabled} argument carries the risk that any failure
- * of the VPN provider could break networking for all apps.
+ * of the VPN provider could break networking for all apps. This method clears any lockdown
+ * whitelist set by {@link #setAlwaysOnVpnPackage(ComponentName, String, boolean, Set)}.
*
* @param vpnPackage The package name for an installed VPN app on the device, or {@code null} to
* remove an existing always-on VPN configuration.
@@ -4498,11 +4500,11 @@
* @throws NameNotFoundException if {@code vpnPackage} is not installed.
* @throws UnsupportedOperationException if {@code vpnPackage} exists but does not support being
* set as always-on, or if always-on VPN is not available.
- * @see #setAlwaysOnVpnPackage(ComponentName, String, boolean, List)
+ * @see #setAlwaysOnVpnPackage(ComponentName, String, boolean, Set)
*/
public void setAlwaysOnVpnPackage(@NonNull ComponentName admin, @Nullable String vpnPackage,
boolean lockdownEnabled) throws NameNotFoundException {
- setAlwaysOnVpnPackage(admin, vpnPackage, lockdownEnabled, Collections.emptyList());
+ setAlwaysOnVpnPackage(admin, vpnPackage, lockdownEnabled, Collections.emptySet());
}
/**
@@ -4512,6 +4514,11 @@
* System apps can always bypass VPN.
* <p> Note that the system doesn't update the whitelist when packages are installed or
* uninstalled, the admin app must call this method to keep the list up to date.
+ * <p> When {@code lockdownEnabled} is false {@code lockdownWhitelist} is ignored . When
+ * {@code lockdownEnabled} is {@code true} and {@code lockdownWhitelist} is {@code null} or
+ * empty, only system apps can bypass VPN.
+ * <p> Setting always-on VPN package to {@code null} or using
+ * {@link #setAlwaysOnVpnPackage(ComponentName, String, boolean)} clears lockdown whitelist.
*
* @param vpnPackage package name for an installed VPN app on the device, or {@code null}
* to remove an existing always-on VPN configuration
@@ -4528,13 +4535,13 @@
* available.
*/
public void setAlwaysOnVpnPackage(@NonNull ComponentName admin, @Nullable String vpnPackage,
- boolean lockdownEnabled, @Nullable List<String> lockdownWhitelist)
+ boolean lockdownEnabled, @Nullable Set<String> lockdownWhitelist)
throws NameNotFoundException {
throwIfParentInstance("setAlwaysOnVpnPackage");
if (mService != null) {
try {
- mService.setAlwaysOnVpnPackage(
- admin, vpnPackage, lockdownEnabled, lockdownWhitelist);
+ mService.setAlwaysOnVpnPackage(admin, vpnPackage, lockdownEnabled,
+ lockdownWhitelist == null ? null : new ArrayList<>(lockdownWhitelist));
} catch (ServiceSpecificException e) {
switch (e.errorCode) {
case ERROR_VPN_PACKAGE_NOT_FOUND:
@@ -4572,7 +4579,7 @@
}
/**
- * Called by device or profile owner to query the list of packages that are allowed to access
+ * Called by device or profile owner to query the set of packages that are allowed to access
* the network directly when always-on VPN is in lockdown mode but not connected. Returns
* {@code null} when always-on VPN is not active or not in lockdown mode.
*
@@ -4580,13 +4587,15 @@
*
* @throws SecurityException if {@code admin} is not a device or a profile owner.
*
- * @see #setAlwaysOnVpnPackage(ComponentName, String, boolean, List)
+ * @see #setAlwaysOnVpnPackage(ComponentName, String, boolean, Set)
*/
- public @Nullable List<String> getAlwaysOnVpnLockdownWhitelist(@NonNull ComponentName admin) {
+ public @Nullable Set<String> getAlwaysOnVpnLockdownWhitelist(@NonNull ComponentName admin) {
throwIfParentInstance("getAlwaysOnVpnLockdownWhitelist");
if (mService != null) {
try {
- return mService.getAlwaysOnVpnLockdownWhitelist(admin);
+ final List<String> whitelist =
+ mService.getAlwaysOnVpnLockdownWhitelist(admin);
+ return whitelist == null ? null : new HashSet<>(whitelist);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
diff --git a/core/java/android/bluetooth/BluetoothHearingAid.java b/core/java/android/bluetooth/BluetoothHearingAid.java
index c5a0bbd..58ff2e1 100644
--- a/core/java/android/bluetooth/BluetoothHearingAid.java
+++ b/core/java/android/bluetooth/BluetoothHearingAid.java
@@ -22,7 +22,6 @@
import android.annotation.RequiresPermission;
import android.annotation.SdkConstant;
import android.annotation.SdkConstant.SdkConstantType;
-import android.annotation.UnsupportedAppUsage;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
@@ -91,7 +90,6 @@
* @hide
*/
@SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
- @UnsupportedAppUsage
public static final String ACTION_ACTIVE_DEVICE_CHANGED =
"android.bluetooth.hearingaid.profile.action.ACTIVE_DEVICE_CHANGED";
@@ -323,7 +321,8 @@
/**
* {@inheritDoc}
*/
- @Override public @NonNull List<BluetoothDevice> getDevicesMatchingConnectionStates(
+ @Override
+ public @NonNull List<BluetoothDevice> getDevicesMatchingConnectionStates(
@NonNull int[] states) {
if (VDBG) log("getDevicesMatchingStates()");
try {
@@ -345,7 +344,8 @@
* {@inheritDoc}
*/
@Override
- public int getConnectionState(@NonNull BluetoothDevice device) {
+ public @BluetoothProfile.BtProfileState int getConnectionState(
+ @NonNull BluetoothDevice device) {
if (VDBG) log("getState(" + device + ")");
try {
mServiceLock.readLock().lock();
@@ -385,7 +385,6 @@
* @return false on immediate error, true otherwise
* @hide
*/
- @UnsupportedAppUsage
public boolean setActiveDevice(@Nullable BluetoothDevice device) {
if (DBG) log("setActiveDevice(" + device + ")");
try {
@@ -417,7 +416,6 @@
* @hide
*/
@RequiresPermission(Manifest.permission.BLUETOOTH)
- @UnsupportedAppUsage
public List<BluetoothDevice> getActiveDevices() {
if (VDBG) log("getActiveDevices()");
try {
diff --git a/core/java/android/bluetooth/BluetoothProfile.java b/core/java/android/bluetooth/BluetoothProfile.java
index b8670db..dabe0fd 100644
--- a/core/java/android/bluetooth/BluetoothProfile.java
+++ b/core/java/android/bluetooth/BluetoothProfile.java
@@ -18,11 +18,14 @@
package android.bluetooth;
import android.Manifest;
+import android.annotation.IntDef;
import android.annotation.RequiresPermission;
import android.annotation.SystemApi;
import android.annotation.UnsupportedAppUsage;
import android.os.Build;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
import java.util.List;
/**
@@ -60,6 +63,16 @@
/** The profile is in disconnecting state */
int STATE_DISCONNECTING = 3;
+ /** @hide */
+ @IntDef({
+ STATE_DISCONNECTED,
+ STATE_CONNECTING,
+ STATE_CONNECTED,
+ STATE_DISCONNECTING,
+ })
+ @Retention(RetentionPolicy.SOURCE)
+ public @interface BtProfileState {}
+
/**
* Headset and Handsfree profile
*/
@@ -263,7 +276,7 @@
* #STATE_CONNECTING}, {@link #STATE_DISCONNECTED}, {@link #STATE_DISCONNECTING}
*/
@RequiresPermission(Manifest.permission.BLUETOOTH)
- public int getConnectionState(BluetoothDevice device);
+ @BtProfileState int getConnectionState(BluetoothDevice device);
/**
* An interface for notifying BluetoothProfile IPC clients when they have
diff --git a/core/java/android/content/Context.java b/core/java/android/content/Context.java
index 5a75d5df..8625a04 100644
--- a/core/java/android/content/Context.java
+++ b/core/java/android/content/Context.java
@@ -3523,14 +3523,6 @@
/**
* Use with {@link #getSystemService(String)} to retrieve a
- * {@link android.net.IpMemoryStore} to store and read information about
- * known networks.
- * @hide
- */
- public static final String IP_MEMORY_STORE_SERVICE = "ipmemorystore";
-
- /**
- * Use with {@link #getSystemService(String)} to retrieve a
* {@link android.net.IpSecManager} for encrypting Sockets or Networks with
* IPSec.
*
diff --git a/core/java/android/content/pm/PackageList.java b/core/java/android/content/pm/PackageList.java
index cfd99ab..f781758 100644
--- a/core/java/android/content/pm/PackageList.java
+++ b/core/java/android/content/pm/PackageList.java
@@ -45,16 +45,16 @@
}
@Override
- public void onPackageAdded(String packageName) {
+ public void onPackageAdded(String packageName, int uid) {
if (mWrappedObserver != null) {
- mWrappedObserver.onPackageAdded(packageName);
+ mWrappedObserver.onPackageAdded(packageName, uid);
}
}
@Override
- public void onPackageRemoved(String packageName) {
+ public void onPackageRemoved(String packageName, int uid) {
if (mWrappedObserver != null) {
- mWrappedObserver.onPackageRemoved(packageName);
+ mWrappedObserver.onPackageRemoved(packageName, uid);
}
}
diff --git a/core/java/android/content/pm/PackageManagerInternal.java b/core/java/android/content/pm/PackageManagerInternal.java
index 7c9943b..c299369 100644
--- a/core/java/android/content/pm/PackageManagerInternal.java
+++ b/core/java/android/content/pm/PackageManagerInternal.java
@@ -62,9 +62,9 @@
/** Observer called whenever the list of packages changes */
public interface PackageListObserver {
/** A package was added to the system. */
- void onPackageAdded(@NonNull String packageName);
+ void onPackageAdded(@NonNull String packageName, int uid);
/** A package was removed from the system. */
- void onPackageRemoved(@NonNull String packageName);
+ void onPackageRemoved(@NonNull String packageName, int uid);
}
/** Interface to override permission checks via composition */
diff --git a/core/java/android/content/pm/SharedLibraryInfo.java b/core/java/android/content/pm/SharedLibraryInfo.java
index ad82626d..8354296 100644
--- a/core/java/android/content/pm/SharedLibraryInfo.java
+++ b/core/java/android/content/pm/SharedLibraryInfo.java
@@ -289,9 +289,9 @@
@Override
public String toString() {
- return "SharedLibraryInfo[name:" + mName + ", type:" + typeToString(mType)
+ return "SharedLibraryInfo{name:" + mName + ", type:" + typeToString(mType)
+ ", version:" + mVersion + (!getDependentPackages().isEmpty()
- ? " has dependents" : "");
+ ? " has dependents" : "") + "}";
}
@Override
diff --git a/core/java/android/net/CaptivePortal.java b/core/java/android/net/CaptivePortal.java
index 3ab35e1..ebd8a7e 100644
--- a/core/java/android/net/CaptivePortal.java
+++ b/core/java/android/net/CaptivePortal.java
@@ -15,6 +15,7 @@
*/
package android.net;
+import android.annotation.NonNull;
import android.annotation.SystemApi;
import android.annotation.TestApi;
import android.os.IBinder;
@@ -29,15 +30,33 @@
* {@code ACTION_CAPTIVE_PORTAL_SIGN_IN} activity.
*/
public class CaptivePortal implements Parcelable {
- /** @hide */
+ /**
+ * Response code from the captive portal application, indicating that the portal was dismissed
+ * and the network should be re-validated.
+ * @see ICaptivePortal#appResponse(int)
+ * @see android.net.INetworkMonitor#notifyCaptivePortalAppFinished(int)
+ * @hide
+ */
@SystemApi
@TestApi
public static final int APP_RETURN_DISMISSED = 0;
- /** @hide */
+ /**
+ * Response code from the captive portal application, indicating that the user did not login and
+ * does not want to use the captive portal network.
+ * @see ICaptivePortal#appResponse(int)
+ * @see android.net.INetworkMonitor#notifyCaptivePortalAppFinished(int)
+ * @hide
+ */
@SystemApi
@TestApi
public static final int APP_RETURN_UNWANTED = 1;
- /** @hide */
+ /**
+ * Response code from the captive portal application, indicating that the user does not wish to
+ * login but wants to use the captive portal network as-is.
+ * @see ICaptivePortal#appResponse(int)
+ * @see android.net.INetworkMonitor#notifyCaptivePortalAppFinished(int)
+ * @hide
+ */
@SystemApi
@TestApi
public static final int APP_RETURN_WANTED_AS_IS = 2;
@@ -47,7 +66,7 @@
/** @hide */
@SystemApi
@TestApi
- public CaptivePortal(IBinder binder) {
+ public CaptivePortal(@NonNull IBinder binder) {
mBinder = binder;
}
@@ -124,7 +143,7 @@
*/
@SystemApi
@TestApi
- public void logEvent(int eventId, String packageName) {
+ public void logEvent(int eventId, @NonNull String packageName) {
try {
ICaptivePortal.Stub.asInterface(mBinder).logEvent(eventId, packageName);
} catch (RemoteException e) {
diff --git a/core/java/android/net/ConnectivityManager.java b/core/java/android/net/ConnectivityManager.java
index d08379f..1632235 100644
--- a/core/java/android/net/ConnectivityManager.java
+++ b/core/java/android/net/ConnectivityManager.java
@@ -2816,23 +2816,6 @@
}
/**
- * @removed
- * @deprecated This API would be removed when all of caller has been updated.
- * */
- @Deprecated
- public abstract static class TetheringEntitlementValueListener {
- /**
- * Called to notify entitlement result.
- *
- * @param resultCode a int value of entitlement result. It may be one of
- * {@link #TETHER_ERROR_NO_ERROR},
- * {@link #TETHER_ERROR_PROVISION_FAILED}, or
- * {@link #TETHER_ERROR_ENTITLEMENT_UNKONWN}.
- */
- public void onEntitlementResult(int resultCode) {}
- }
-
- /**
* Get the last value of the entitlement check on this downstream. If the cached value is
* {@link #TETHER_ERROR_NO_ERROR} or showEntitlementUi argument is false, it just return the
* cached value. Otherwise, a UI-based entitlement check would be performed. It is not
@@ -2878,31 +2861,6 @@
}
/**
- * @removed
- * @deprecated This API would be removed when all of caller has been updated.
- * */
- @Deprecated
- public void getLatestTetheringEntitlementValue(int type, boolean showEntitlementUi,
- @NonNull final TetheringEntitlementValueListener listener, @Nullable Handler handler) {
- Preconditions.checkNotNull(listener, "TetheringEntitlementValueListener cannot be null.");
- ResultReceiver wrappedListener = new ResultReceiver(handler) {
- @Override
- protected void onReceiveResult(int resultCode, Bundle resultData) {
- listener.onEntitlementResult(resultCode);
- }
- };
-
- try {
- String pkgName = mContext.getOpPackageName();
- Log.i(TAG, "getLatestTetheringEntitlementValue:" + pkgName);
- mService.getLatestTetheringEntitlementResult(type, wrappedListener,
- showEntitlementUi, pkgName);
- } catch (RemoteException e) {
- throw e.rethrowFromSystemServer();
- }
- }
-
- /**
* Report network connectivity status. This is currently used only
* to alter status bar UI.
* <p>This method requires the caller to hold the permission
@@ -4130,7 +4088,7 @@
@SystemApi
@TestApi
@RequiresPermission(NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK)
- public void startCaptivePortalApp(Network network, Bundle appExtras) {
+ public void startCaptivePortalApp(@NonNull Network network, @NonNull Bundle appExtras) {
try {
mService.startCaptivePortalAppInternal(network, appExtras);
} catch (RemoteException e) {
diff --git a/core/java/android/net/InterfaceConfiguration.java b/core/java/android/net/InterfaceConfiguration.java
index b9d49c1..61bc19f 100644
--- a/core/java/android/net/InterfaceConfiguration.java
+++ b/core/java/android/net/InterfaceConfiguration.java
@@ -19,11 +19,9 @@
import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
-import android.text.TextUtils;
import com.google.android.collect.Sets;
-import java.net.InetAddress;
import java.util.HashSet;
/**
@@ -117,40 +115,6 @@
}
/**
- * Construct InterfaceConfiguration from InterfaceConfigurationParcel.
- */
- public static InterfaceConfiguration fromParcel(InterfaceConfigurationParcel p) {
- InterfaceConfiguration cfg = new InterfaceConfiguration();
- cfg.setHardwareAddress(p.hwAddr);
-
- final InetAddress addr = NetworkUtils.numericToInetAddress(p.ipv4Addr);
- cfg.setLinkAddress(new LinkAddress(addr, p.prefixLength));
- for (String flag : p.flags) {
- cfg.setFlag(flag);
- }
-
- return cfg;
- }
-
- /**
- * Convert InterfaceConfiguration to InterfaceConfigurationParcel with given ifname.
- */
- public InterfaceConfigurationParcel toParcel(String iface) {
- InterfaceConfigurationParcel cfgParcel = new InterfaceConfigurationParcel();
- cfgParcel.ifName = iface;
- if (!TextUtils.isEmpty(mHwAddr)) {
- cfgParcel.hwAddr = mHwAddr;
- } else {
- cfgParcel.hwAddr = "";
- }
- cfgParcel.ipv4Addr = mAddr.getAddress().getHostAddress();
- cfgParcel.prefixLength = mAddr.getPrefixLength();
- cfgParcel.flags = mFlags.toArray(EMPTY_STRING_ARRAY);
-
- return cfgParcel;
- }
-
- /**
* This function determines if the interface is up and has a valid IP
* configuration (IP address has a non zero octet).
*
diff --git a/core/java/android/net/IpPrefix.aidl b/core/java/android/net/IpPrefix.aidl
index 837db5f..0d70f2a 100644
--- a/core/java/android/net/IpPrefix.aidl
+++ b/core/java/android/net/IpPrefix.aidl
@@ -17,4 +17,6 @@
package android.net;
-parcelable IpPrefix cpp_header "binder/IpPrefix.h";
+// @JavaOnlyStableParcelable only affects the parcelable when built as stable aidl (aidl_interface
+// build rule). IpPrefix is also used in cpp but only as non-stable aidl.
+@JavaOnlyStableParcelable parcelable IpPrefix cpp_header "binder/IpPrefix.h";
diff --git a/core/java/android/net/IpPrefix.java b/core/java/android/net/IpPrefix.java
index 175263f..b4f3a28 100644
--- a/core/java/android/net/IpPrefix.java
+++ b/core/java/android/net/IpPrefix.java
@@ -16,6 +16,7 @@
package android.net;
+import android.annotation.NonNull;
import android.annotation.SystemApi;
import android.annotation.TestApi;
import android.os.Parcel;
@@ -70,7 +71,7 @@
*
* @hide
*/
- public IpPrefix(byte[] address, int prefixLength) {
+ public IpPrefix(@NonNull byte[] address, int prefixLength) {
this.address = address.clone();
this.prefixLength = prefixLength;
checkAndMaskAddressAndPrefixLength();
@@ -87,7 +88,7 @@
*/
@SystemApi
@TestApi
- public IpPrefix(InetAddress address, int prefixLength) {
+ public IpPrefix(@NonNull InetAddress address, int prefixLength) {
// We don't reuse the (byte[], int) constructor because it calls clone() on the byte array,
// which is unnecessary because getAddress() already returns a clone.
this.address = address.getAddress();
@@ -106,7 +107,7 @@
*/
@SystemApi
@TestApi
- public IpPrefix(String prefix) {
+ public IpPrefix(@NonNull String prefix) {
// We don't reuse the (InetAddress, int) constructor because "error: call to this must be
// first statement in constructor". We could factor out setting the member variables to an
// init() method, but if we did, then we'd have to make the members non-final, or "error:
diff --git a/core/java/android/net/IpPrefixParcelable.aidl b/core/java/android/net/IpPrefixParcelable.aidl
deleted file mode 100644
index 93a8d41..0000000
--- a/core/java/android/net/IpPrefixParcelable.aidl
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Copyright (C) 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
-package android.net;
-
-parcelable IpPrefixParcelable {
- String address;
- int prefixLength;
-}
\ No newline at end of file
diff --git a/core/java/android/net/LinkAddress.aidl b/core/java/android/net/LinkAddress.aidl
index e7d8646..9c804db 100644
--- a/core/java/android/net/LinkAddress.aidl
+++ b/core/java/android/net/LinkAddress.aidl
@@ -17,5 +17,5 @@
package android.net;
-parcelable LinkAddress;
+@JavaOnlyStableParcelable parcelable LinkAddress;
diff --git a/core/java/android/net/LinkAddress.java b/core/java/android/net/LinkAddress.java
index 8b01960..78b4665 100644
--- a/core/java/android/net/LinkAddress.java
+++ b/core/java/android/net/LinkAddress.java
@@ -26,6 +26,7 @@
import static android.system.OsConstants.RT_SCOPE_UNIVERSE;
import android.annotation.NonNull;
+import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.annotation.TestApi;
import android.annotation.UnsupportedAppUsage;
@@ -107,8 +108,8 @@
*
* Per RFC 4193 section 8, fc00::/7 identifies these addresses.
*/
- private boolean isIPv6ULA() {
- if (isIPv6()) {
+ private boolean isIpv6ULA() {
+ if (isIpv6()) {
byte[] bytes = address.getAddress();
return ((bytes[0] & (byte)0xfe) == (byte)0xfc);
}
@@ -121,17 +122,29 @@
*/
@TestApi
@SystemApi
- public boolean isIPv6() {
+ public boolean isIpv6() {
return address instanceof Inet6Address;
}
/**
+ * For backward compatibility.
+ * This was annotated with @UnsupportedAppUsage in P, so we can't remove the method completely
+ * just yet.
+ * @return true if the address is IPv6.
+ * @hide
+ */
+ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
+ public boolean isIPv6() {
+ return isIpv6();
+ }
+
+ /**
* @return true if the address is IPv4 or is a mapped IPv4 address.
* @hide
*/
@TestApi
@SystemApi
- public boolean isIPv4() {
+ public boolean isIpv4() {
return address instanceof Inet4Address;
}
@@ -217,7 +230,7 @@
*/
@SystemApi
@TestApi
- public LinkAddress(String address, int flags, int scope) {
+ public LinkAddress(@NonNull String address, int flags, int scope) {
// This may throw an IllegalArgumentException; catching it is the caller's responsibility.
// TODO: consider rejecting mapped IPv4 addresses such as "::ffff:192.0.2.5/24".
Pair<InetAddress, Integer> ipAndMask = NetworkUtils.parseIpAndMask(address);
@@ -276,7 +289,10 @@
*/
@TestApi
@SystemApi
- public boolean isSameAddressAs(LinkAddress other) {
+ public boolean isSameAddressAs(@Nullable LinkAddress other) {
+ if (other == null) {
+ return false;
+ }
return address.equals(other.address) && prefixLength == other.prefixLength;
}
@@ -331,10 +347,10 @@
* state has cleared either DAD has succeeded or failed, and both
* flags are cleared regardless).
*/
- return (scope == RT_SCOPE_UNIVERSE &&
- !isIPv6ULA() &&
- (flags & (IFA_F_DADFAILED | IFA_F_DEPRECATED)) == 0L &&
- ((flags & IFA_F_TENTATIVE) == 0L || (flags & IFA_F_OPTIMISTIC) != 0L));
+ return (scope == RT_SCOPE_UNIVERSE
+ && !isIpv6ULA()
+ && (flags & (IFA_F_DADFAILED | IFA_F_DEPRECATED)) == 0L
+ && ((flags & IFA_F_TENTATIVE) == 0L || (flags & IFA_F_OPTIMISTIC) != 0L));
}
/**
diff --git a/core/java/android/net/LinkAddressParcelable.aidl b/core/java/android/net/LinkAddressParcelable.aidl
deleted file mode 100644
index af8e79b..0000000
--- a/core/java/android/net/LinkAddressParcelable.aidl
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Copyright (C) 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
-package android.net;
-
-parcelable LinkAddressParcelable {
- String address;
- int prefixLength;
- int flags;
- int scope;
-}
\ No newline at end of file
diff --git a/core/java/android/net/LinkProperties.aidl b/core/java/android/net/LinkProperties.aidl
index 3cb9525..a8b3c7b 100644
--- a/core/java/android/net/LinkProperties.aidl
+++ b/core/java/android/net/LinkProperties.aidl
@@ -17,4 +17,4 @@
package android.net;
-parcelable LinkProperties;
+@JavaOnlyStableParcelable parcelable LinkProperties;
diff --git a/core/java/android/net/LinkProperties.java b/core/java/android/net/LinkProperties.java
index 42db0fd..03d6d48 100644
--- a/core/java/android/net/LinkProperties.java
+++ b/core/java/android/net/LinkProperties.java
@@ -54,11 +54,11 @@
// The interface described by the network link.
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023)
private String mIfaceName;
- private ArrayList<LinkAddress> mLinkAddresses = new ArrayList<>();
- private ArrayList<InetAddress> mDnses = new ArrayList<>();
+ private final ArrayList<LinkAddress> mLinkAddresses = new ArrayList<>();
+ private final ArrayList<InetAddress> mDnses = new ArrayList<>();
// PCSCF addresses are addresses of SIP proxies that only exist for the IMS core service.
- private ArrayList<InetAddress> mPcscfs = new ArrayList<InetAddress>();
- private ArrayList<InetAddress> mValidatedPrivateDnses = new ArrayList<>();
+ private final ArrayList<InetAddress> mPcscfs = new ArrayList<InetAddress>();
+ private final ArrayList<InetAddress> mValidatedPrivateDnses = new ArrayList<>();
private boolean mUsePrivateDns;
private String mPrivateDnsServerName;
private String mDomains;
@@ -150,8 +150,8 @@
// connections getting stuck until timeouts fire and other
// baffling failures. Therefore, loss of either IPv4 or IPv6 on a
// previously dual-stack network is deemed a lost of provisioning.
- if ((before.isIPv4Provisioned() && !after.isIPv4Provisioned()) ||
- (before.isIPv6Provisioned() && !after.isIPv6Provisioned())) {
+ if ((before.isIpv4Provisioned() && !after.isIpv4Provisioned())
+ || (before.isIpv6Provisioned() && !after.isIpv6Provisioned())) {
return ProvisioningChange.LOST_PROVISIONING;
}
return ProvisioningChange.STILL_PROVISIONED;
@@ -165,9 +165,8 @@
}
/**
- * @hide
+ * Constructs a new {@code LinkProperties} with default values.
*/
- @SystemApi
public LinkProperties() {
}
@@ -176,7 +175,7 @@
*/
@SystemApi
@TestApi
- public LinkProperties(LinkProperties source) {
+ public LinkProperties(@Nullable LinkProperties source) {
if (source != null) {
mIfaceName = source.mIfaceName;
mLinkAddresses.addAll(source.mLinkAddresses);
@@ -202,10 +201,8 @@
* will have their interface changed to match this new value.
*
* @param iface The name of the network interface used for this link.
- * @hide
*/
- @SystemApi
- public void setInterfaceName(String iface) {
+ public void setInterfaceName(@Nullable String iface) {
mIfaceName = iface;
ArrayList<RouteInfo> newRoutes = new ArrayList<>(mRoutes.size());
for (RouteInfo route : mRoutes) {
@@ -227,7 +224,7 @@
* @hide
*/
@UnsupportedAppUsage
- public List<String> getAllInterfaceNames() {
+ public @NonNull List<String> getAllInterfaceNames() {
List<String> interfaceNames = new ArrayList<>(mStackedLinks.size() + 1);
if (mIfaceName != null) interfaceNames.add(mIfaceName);
for (LinkProperties stacked: mStackedLinks.values()) {
@@ -247,8 +244,8 @@
* @hide
*/
@UnsupportedAppUsage
- public List<InetAddress> getAddresses() {
- List<InetAddress> addresses = new ArrayList<>();
+ public @NonNull List<InetAddress> getAddresses() {
+ final List<InetAddress> addresses = new ArrayList<>();
for (LinkAddress linkAddress : mLinkAddresses) {
addresses.add(linkAddress.getAddress());
}
@@ -260,7 +257,7 @@
* @hide
*/
@UnsupportedAppUsage
- public List<InetAddress> getAllAddresses() {
+ public @NonNull List<InetAddress> getAllAddresses() {
List<InetAddress> addresses = new ArrayList<>();
for (LinkAddress linkAddress : mLinkAddresses) {
addresses.add(linkAddress.getAddress());
@@ -289,7 +286,7 @@
*/
@SystemApi
@TestApi
- public boolean addLinkAddress(LinkAddress address) {
+ public boolean addLinkAddress(@NonNull LinkAddress address) {
if (address == null) {
return false;
}
@@ -318,7 +315,10 @@
*/
@SystemApi
@TestApi
- public boolean removeLinkAddress(LinkAddress toRemove) {
+ public boolean removeLinkAddress(@NonNull LinkAddress toRemove) {
+ if (toRemove == null) {
+ return false;
+ }
int i = findLinkAddressIndex(toRemove);
if (i >= 0) {
mLinkAddresses.remove(i);
@@ -333,7 +333,7 @@
*
* @return An unmodifiable {@link List} of {@link LinkAddress} for this link.
*/
- public List<LinkAddress> getLinkAddresses() {
+ public @NonNull List<LinkAddress> getLinkAddresses() {
return Collections.unmodifiableList(mLinkAddresses);
}
@@ -356,10 +356,8 @@
*
* @param addresses The {@link Collection} of {@link LinkAddress} to set in this
* object.
- * @hide
*/
- @SystemApi
- public void setLinkAddresses(Collection<LinkAddress> addresses) {
+ public void setLinkAddresses(@NonNull Collection<LinkAddress> addresses) {
mLinkAddresses.clear();
for (LinkAddress address: addresses) {
addLinkAddress(address);
@@ -375,7 +373,7 @@
*/
@TestApi
@SystemApi
- public boolean addDnsServer(InetAddress dnsServer) {
+ public boolean addDnsServer(@NonNull InetAddress dnsServer) {
if (dnsServer != null && !mDnses.contains(dnsServer)) {
mDnses.add(dnsServer);
return true;
@@ -392,7 +390,7 @@
*/
@TestApi
@SystemApi
- public boolean removeDnsServer(InetAddress dnsServer) {
+ public boolean removeDnsServer(@NonNull InetAddress dnsServer) {
if (dnsServer != null) {
return mDnses.remove(dnsServer);
}
@@ -404,10 +402,8 @@
* the given {@link Collection} of {@link InetAddress} objects.
*
* @param dnsServers The {@link Collection} of DNS servers to set in this object.
- * @hide
*/
- @SystemApi
- public void setDnsServers(Collection<InetAddress> dnsServers) {
+ public void setDnsServers(@NonNull Collection<InetAddress> dnsServers) {
mDnses.clear();
for (InetAddress dnsServer: dnsServers) {
addDnsServer(dnsServer);
@@ -420,7 +416,7 @@
* @return An unmodifiable {@link List} of {@link InetAddress} for DNS servers on
* this link.
*/
- public List<InetAddress> getDnsServers() {
+ public @NonNull List<InetAddress> getDnsServers() {
return Collections.unmodifiableList(mDnses);
}
@@ -490,7 +486,7 @@
* @return true if the DNS server was added, false if it was already present.
* @hide
*/
- public boolean addValidatedPrivateDnsServer(InetAddress dnsServer) {
+ public boolean addValidatedPrivateDnsServer(@NonNull InetAddress dnsServer) {
if (dnsServer != null && !mValidatedPrivateDnses.contains(dnsServer)) {
mValidatedPrivateDnses.add(dnsServer);
return true;
@@ -506,11 +502,8 @@
* @return true if the DNS server was removed, false if it did not exist.
* @hide
*/
- public boolean removeValidatedPrivateDnsServer(InetAddress dnsServer) {
- if (dnsServer != null) {
- return mValidatedPrivateDnses.remove(dnsServer);
- }
- return false;
+ public boolean removeValidatedPrivateDnsServer(@NonNull InetAddress dnsServer) {
+ return mValidatedPrivateDnses.remove(dnsServer);
}
/**
@@ -523,7 +516,7 @@
*/
@TestApi
@SystemApi
- public void setValidatedPrivateDnsServers(Collection<InetAddress> dnsServers) {
+ public void setValidatedPrivateDnsServers(@NonNull Collection<InetAddress> dnsServers) {
mValidatedPrivateDnses.clear();
for (InetAddress dnsServer: dnsServers) {
addValidatedPrivateDnsServer(dnsServer);
@@ -534,13 +527,13 @@
* Returns all the {@link InetAddress} for validated private DNS servers on this link.
* These are resolved from the private DNS server name.
*
- * @return An umodifiable {@link List} of {@link InetAddress} for validated private
+ * @return An unmodifiable {@link List} of {@link InetAddress} for validated private
* DNS servers on this link.
* @hide
*/
@TestApi
@SystemApi
- public List<InetAddress> getValidatedPrivateDnsServers() {
+ public @NonNull List<InetAddress> getValidatedPrivateDnsServers() {
return Collections.unmodifiableList(mValidatedPrivateDnses);
}
@@ -551,7 +544,7 @@
* @return true if the PCSCF server was added, false otherwise.
* @hide
*/
- public boolean addPcscfServer(InetAddress pcscfServer) {
+ public boolean addPcscfServer(@NonNull InetAddress pcscfServer) {
if (pcscfServer != null && !mPcscfs.contains(pcscfServer)) {
mPcscfs.add(pcscfServer);
return true;
@@ -562,27 +555,24 @@
/**
* Removes the given {@link InetAddress} from the list of PCSCF servers.
*
- * @param pcscf Server The {@link InetAddress} to remove from the list of PCSCF servers.
+ * @param pcscfServer The {@link InetAddress} to remove from the list of PCSCF servers.
* @return true if the PCSCF server was removed, false otherwise.
* @hide
*/
- public boolean removePcscfServer(InetAddress pcscfServer) {
- if (pcscfServer != null) {
- return mPcscfs.remove(pcscfServer);
- }
- return false;
+ public boolean removePcscfServer(@NonNull InetAddress pcscfServer) {
+ return mPcscfs.remove(pcscfServer);
}
/**
* Replaces the PCSCF servers in this {@code LinkProperties} with
* the given {@link Collection} of {@link InetAddress} objects.
*
- * @param addresses The {@link Collection} of PCSCF servers to set in this object.
+ * @param pcscfServers The {@link Collection} of PCSCF servers to set in this object.
* @hide
*/
@SystemApi
@TestApi
- public void setPcscfServers(Collection<InetAddress> pcscfServers) {
+ public void setPcscfServers(@NonNull Collection<InetAddress> pcscfServers) {
mPcscfs.clear();
for (InetAddress pcscfServer: pcscfServers) {
addPcscfServer(pcscfServer);
@@ -598,7 +588,7 @@
*/
@SystemApi
@TestApi
- public List<InetAddress> getPcscfServers() {
+ public @NonNull List<InetAddress> getPcscfServers() {
return Collections.unmodifiableList(mPcscfs);
}
@@ -607,20 +597,18 @@
*
* @param domains A {@link String} listing in priority order the comma separated
* domains to search when resolving host names on this link.
- * @hide
*/
- @SystemApi
- public void setDomains(String domains) {
+ public void setDomains(@Nullable String domains) {
mDomains = domains;
}
/**
- * Get the DNS domains search path set for this link.
+ * Get the DNS domains search path set for this link. May be {@code null} if not set.
*
- * @return A {@link String} containing the comma separated domains to search when resolving
- * host names on this link.
+ * @return A {@link String} containing the comma separated domains to search when resolving host
+ * names on this link or {@code null}.
*/
- public String getDomains() {
+ public @Nullable String getDomains() {
return mDomains;
}
@@ -630,9 +618,7 @@
* 10000 will be ignored.
*
* @param mtu The MTU to use for this link.
- * @hide
*/
- @SystemApi
public void setMtu(int mtu) {
mMtu = mtu;
}
@@ -657,20 +643,20 @@
*/
@TestApi
@SystemApi
- public void setTcpBufferSizes(String tcpBufferSizes) {
+ public void setTcpBufferSizes(@Nullable String tcpBufferSizes) {
mTcpBufferSizes = tcpBufferSizes;
}
/**
- * Gets the tcp buffer sizes.
+ * Gets the tcp buffer sizes. May be {@code null} if not set.
*
- * @return the tcp buffer sizes to use when this link is the system default.
+ * @return the tcp buffer sizes to use when this link is the system default or {@code null}.
*
* @hide
*/
@TestApi
@SystemApi
- public String getTcpBufferSizes() {
+ public @Nullable String getTcpBufferSizes() {
return mTcpBufferSizes;
}
@@ -690,23 +676,18 @@
*
* @param route A {@link RouteInfo} to add to this object.
* @return {@code false} if the route was already present, {@code true} if it was added.
- *
- * @hide
*/
- @SystemApi
- public boolean addRoute(RouteInfo route) {
- if (route != null) {
- String routeIface = route.getInterface();
- if (routeIface != null && !routeIface.equals(mIfaceName)) {
- throw new IllegalArgumentException(
- "Route added with non-matching interface: " + routeIface +
- " vs. " + mIfaceName);
- }
- route = routeWithInterface(route);
- if (!mRoutes.contains(route)) {
- mRoutes.add(route);
- return true;
- }
+ public boolean addRoute(@NonNull RouteInfo route) {
+ String routeIface = route.getInterface();
+ if (routeIface != null && !routeIface.equals(mIfaceName)) {
+ throw new IllegalArgumentException(
+ "Route added with non-matching interface: " + routeIface
+ + " vs. " + mIfaceName);
+ }
+ route = routeWithInterface(route);
+ if (!mRoutes.contains(route)) {
+ mRoutes.add(route);
+ return true;
}
return false;
}
@@ -722,10 +703,8 @@
*/
@TestApi
@SystemApi
- public boolean removeRoute(RouteInfo route) {
- return route != null &&
- Objects.equals(mIfaceName, route.getInterface()) &&
- mRoutes.remove(route);
+ public boolean removeRoute(@NonNull RouteInfo route) {
+ return Objects.equals(mIfaceName, route.getInterface()) && mRoutes.remove(route);
}
/**
@@ -733,7 +712,7 @@
*
* @return An unmodifiable {@link List} of {@link RouteInfo} for this link.
*/
- public List<RouteInfo> getRoutes() {
+ public @NonNull List<RouteInfo> getRoutes() {
return Collections.unmodifiableList(mRoutes);
}
@@ -753,7 +732,7 @@
* @hide
*/
@UnsupportedAppUsage
- public List<RouteInfo> getAllRoutes() {
+ public @NonNull List<RouteInfo> getAllRoutes() {
List<RouteInfo> routes = new ArrayList<>(mRoutes);
for (LinkProperties stacked: mStackedLinks.values()) {
routes.addAll(stacked.getAllRoutes());
@@ -767,26 +746,24 @@
* not enforce it and applications may ignore them.
*
* @param proxy A {@link ProxyInfo} defining the HTTP Proxy to use on this link.
- * @hide
*/
- @SystemApi
- public void setHttpProxy(ProxyInfo proxy) {
+ public void setHttpProxy(@Nullable ProxyInfo proxy) {
mHttpProxy = proxy;
}
/**
* Gets the recommended {@link ProxyInfo} (or {@code null}) set on this link.
*
- * @return The {@link ProxyInfo} set on this link
+ * @return The {@link ProxyInfo} set on this link or {@code null}.
*/
- public ProxyInfo getHttpProxy() {
+ public @Nullable ProxyInfo getHttpProxy() {
return mHttpProxy;
}
/**
* Returns the NAT64 prefix in use on this link, if any.
*
- * @return the NAT64 prefix.
+ * @return the NAT64 prefix or {@code null}.
* @hide
*/
@SystemApi
@@ -799,14 +776,14 @@
* Sets the NAT64 prefix in use on this link.
*
* Currently, only 96-bit prefixes (i.e., where the 32-bit IPv4 address is at the end of the
- * 128-bit IPv6 address) are supported.
+ * 128-bit IPv6 address) are supported or {@code null} for no prefix.
*
* @param prefix the NAT64 prefix.
* @hide
*/
@SystemApi
@TestApi
- public void setNat64Prefix(IpPrefix prefix) {
+ public void setNat64Prefix(@Nullable IpPrefix prefix) {
if (prefix != null && prefix.getPrefixLength() != 96) {
throw new IllegalArgumentException("Only 96-bit prefixes are supported: " + prefix);
}
@@ -818,15 +795,15 @@
*
* If there is already a stacked link with the same interface name as link,
* that link is replaced with link. Otherwise, link is added to the list
- * of stacked links. If link is null, nothing changes.
+ * of stacked links.
*
* @param link The link to add.
* @return true if the link was stacked, false otherwise.
* @hide
*/
@UnsupportedAppUsage
- public boolean addStackedLink(LinkProperties link) {
- if (link != null && link.getInterfaceName() != null) {
+ public boolean addStackedLink(@NonNull LinkProperties link) {
+ if (link.getInterfaceName() != null) {
mStackedLinks.put(link.getInterfaceName(), link);
return true;
}
@@ -843,12 +820,9 @@
* @return true if the link was removed, false otherwise.
* @hide
*/
- public boolean removeStackedLink(String iface) {
- if (iface != null) {
- LinkProperties removed = mStackedLinks.remove(iface);
- return removed != null;
- }
- return false;
+ public boolean removeStackedLink(@NonNull String iface) {
+ LinkProperties removed = mStackedLinks.remove(iface);
+ return removed != null;
}
/**
@@ -860,7 +834,7 @@
if (mStackedLinks.isEmpty()) {
return Collections.emptyList();
}
- List<LinkProperties> stacked = new ArrayList<>();
+ final List<LinkProperties> stacked = new ArrayList<>();
for (LinkProperties link : mStackedLinks.values()) {
stacked.add(new LinkProperties(link));
}
@@ -869,9 +843,7 @@
/**
* Clears this object to its initial state.
- * @hide
*/
- @SystemApi
public void clear() {
mIfaceName = null;
mLinkAddresses.clear();
@@ -988,7 +960,7 @@
*/
@TestApi
@SystemApi
- public boolean hasIPv4Address() {
+ public boolean hasIpv4Address() {
for (LinkAddress address : mLinkAddresses) {
if (address.getAddress() instanceof Inet4Address) {
return true;
@@ -998,15 +970,27 @@
}
/**
+ * For backward compatibility.
+ * This was annotated with @UnsupportedAppUsage in P, so we can't remove the method completely
+ * just yet.
+ * @return {@code true} if there is an IPv4 address, {@code false} otherwise.
+ * @hide
+ */
+ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
+ public boolean hasIPv4Address() {
+ return hasIpv4Address();
+ }
+
+ /**
* Returns true if this link or any of its stacked interfaces has an IPv4 address.
*
* @return {@code true} if there is an IPv4 address, {@code false} otherwise.
*/
- private boolean hasIPv4AddressOnInterface(String iface) {
+ private boolean hasIpv4AddressOnInterface(String iface) {
// mIfaceName can be null.
- return (Objects.equals(iface, mIfaceName) && hasIPv4Address()) ||
- (iface != null && mStackedLinks.containsKey(iface) &&
- mStackedLinks.get(iface).hasIPv4Address());
+ return (Objects.equals(iface, mIfaceName) && hasIpv4Address())
+ || (iface != null && mStackedLinks.containsKey(iface)
+ && mStackedLinks.get(iface).hasIpv4Address());
}
/**
@@ -1017,7 +1001,7 @@
*/
@TestApi
@SystemApi
- public boolean hasGlobalIPv6Address() {
+ public boolean hasGlobalIpv6Address() {
for (LinkAddress address : mLinkAddresses) {
if (address.getAddress() instanceof Inet6Address && address.isGlobalPreferred()) {
return true;
@@ -1027,13 +1011,25 @@
}
/**
+ * For backward compatibility.
+ * This was annotated with @UnsupportedAppUsage in P, so we can't remove the method completely
+ * just yet.
+ * @return {@code true} if there is a global preferred IPv6 address, {@code false} otherwise.
+ * @hide
+ */
+ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
+ public boolean hasGlobalIPv6Address() {
+ return hasGlobalIpv6Address();
+ }
+
+ /**
* Returns true if this link has an IPv4 default route.
*
* @return {@code true} if there is an IPv4 default route, {@code false} otherwise.
* @hide
*/
@UnsupportedAppUsage
- public boolean hasIPv4DefaultRoute() {
+ public boolean hasIpv4DefaultRoute() {
for (RouteInfo r : mRoutes) {
if (r.isIPv4Default()) {
return true;
@@ -1043,6 +1039,18 @@
}
/**
+ * For backward compatibility.
+ * This was annotated with @UnsupportedAppUsage in P, so we can't remove the method completely
+ * just yet.
+ * @return {@code true} if there is an IPv4 default route, {@code false} otherwise.
+ * @hide
+ */
+ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
+ public boolean hasIPv4DefaultRoute() {
+ return hasIpv4DefaultRoute();
+ }
+
+ /**
* Returns true if this link has an IPv6 default route.
*
* @return {@code true} if there is an IPv6 default route, {@code false} otherwise.
@@ -1050,7 +1058,7 @@
*/
@TestApi
@SystemApi
- public boolean hasIPv6DefaultRoute() {
+ public boolean hasIpv6DefaultRoute() {
for (RouteInfo r : mRoutes) {
if (r.isIPv6Default()) {
return true;
@@ -1060,13 +1068,25 @@
}
/**
+ * For backward compatibility.
+ * This was annotated with @UnsupportedAppUsage in P, so we can't remove the method completely
+ * just yet.
+ * @return {@code true} if there is an IPv6 default route, {@code false} otherwise.
+ * @hide
+ */
+ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
+ public boolean hasIPv6DefaultRoute() {
+ return hasIpv6DefaultRoute();
+ }
+
+ /**
* Returns true if this link has an IPv4 DNS server.
*
* @return {@code true} if there is an IPv4 DNS server, {@code false} otherwise.
* @hide
*/
@UnsupportedAppUsage
- public boolean hasIPv4DnsServer() {
+ public boolean hasIpv4DnsServer() {
for (InetAddress ia : mDnses) {
if (ia instanceof Inet4Address) {
return true;
@@ -1076,13 +1096,25 @@
}
/**
+ * For backward compatibility.
+ * This was annotated with @UnsupportedAppUsage in P, so we can't remove the method completely
+ * just yet.
+ * @return {@code true} if there is an IPv4 DNS server, {@code false} otherwise.
+ * @hide
+ */
+ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
+ public boolean hasIPv4DnsServer() {
+ return hasIpv4DnsServer();
+ }
+
+ /**
* Returns true if this link has an IPv6 DNS server.
*
* @return {@code true} if there is an IPv6 DNS server, {@code false} otherwise.
* @hide
*/
@UnsupportedAppUsage
- public boolean hasIPv6DnsServer() {
+ public boolean hasIpv6DnsServer() {
for (InetAddress ia : mDnses) {
if (ia instanceof Inet6Address) {
return true;
@@ -1092,12 +1124,24 @@
}
/**
+ * For backward compatibility.
+ * This was annotated with @UnsupportedAppUsage in P, so we can't remove the method completely
+ * just yet.
+ * @return {@code true} if there is an IPv6 DNS server, {@code false} otherwise.
+ * @hide
+ */
+ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
+ public boolean hasIPv6DnsServer() {
+ return hasIpv6DnsServer();
+ }
+
+ /**
* Returns true if this link has an IPv4 PCSCF server.
*
* @return {@code true} if there is an IPv4 PCSCF server, {@code false} otherwise.
* @hide
*/
- public boolean hasIPv4PcscfServer() {
+ public boolean hasIpv4PcscfServer() {
for (InetAddress ia : mPcscfs) {
if (ia instanceof Inet4Address) {
return true;
@@ -1112,7 +1156,7 @@
* @return {@code true} if there is an IPv6 PCSCF server, {@code false} otherwise.
* @hide
*/
- public boolean hasIPv6PcscfServer() {
+ public boolean hasIpv6PcscfServer() {
for (InetAddress ia : mPcscfs) {
if (ia instanceof Inet6Address) {
return true;
@@ -1130,10 +1174,10 @@
*/
@TestApi
@SystemApi
- public boolean isIPv4Provisioned() {
- return (hasIPv4Address() &&
- hasIPv4DefaultRoute() &&
- hasIPv4DnsServer());
+ public boolean isIpv4Provisioned() {
+ return (hasIpv4Address()
+ && hasIpv4DefaultRoute()
+ && hasIpv4DnsServer());
}
/**
@@ -1145,13 +1189,26 @@
*/
@TestApi
@SystemApi
- public boolean isIPv6Provisioned() {
- return (hasGlobalIPv6Address() &&
- hasIPv6DefaultRoute() &&
- hasIPv6DnsServer());
+ public boolean isIpv6Provisioned() {
+ return (hasGlobalIpv6Address()
+ && hasIpv6DefaultRoute()
+ && hasIpv6DnsServer());
}
/**
+ * For backward compatibility.
+ * This was annotated with @UnsupportedAppUsage in P, so we can't remove the method completely
+ * just yet.
+ * @return {@code true} if the link is provisioned, {@code false} otherwise.
+ * @hide
+ */
+ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
+ public boolean isIPv6Provisioned() {
+ return isIpv6Provisioned();
+ }
+
+
+ /**
* Returns true if this link is provisioned for global connectivity,
* for at least one Internet Protocol family.
*
@@ -1161,7 +1218,7 @@
@TestApi
@SystemApi
public boolean isProvisioned() {
- return (isIPv4Provisioned() || isIPv6Provisioned());
+ return (isIpv4Provisioned() || isIpv6Provisioned());
}
/**
@@ -1173,7 +1230,7 @@
*/
@TestApi
@SystemApi
- public boolean isReachable(InetAddress ip) {
+ public boolean isReachable(@NonNull InetAddress ip) {
final List<RouteInfo> allRoutes = getAllRoutes();
// If we don't have a route to this IP address, it's not reachable.
final RouteInfo bestRoute = RouteInfo.selectBestRoute(allRoutes, ip);
@@ -1185,7 +1242,7 @@
if (ip instanceof Inet4Address) {
// For IPv4, it suffices for now to simply have any address.
- return hasIPv4AddressOnInterface(bestRoute.getInterface());
+ return hasIpv4AddressOnInterface(bestRoute.getInterface());
} else if (ip instanceof Inet6Address) {
if (ip.isLinkLocalAddress()) {
// For now, just make sure link-local destinations have
@@ -1196,7 +1253,7 @@
// For non-link-local destinations check that either the best route
// is directly connected or that some global preferred address exists.
// TODO: reconsider all cases (disconnected ULA networks, ...).
- return (!bestRoute.hasGateway() || hasGlobalIPv6Address());
+ return (!bestRoute.hasGateway() || hasGlobalIpv6Address());
}
}
@@ -1211,7 +1268,7 @@
* @hide
*/
@UnsupportedAppUsage
- public boolean isIdenticalInterfaceName(LinkProperties target) {
+ public boolean isIdenticalInterfaceName(@NonNull LinkProperties target) {
return TextUtils.equals(getInterfaceName(), target.getInterfaceName());
}
@@ -1223,7 +1280,7 @@
* @hide
*/
@UnsupportedAppUsage
- public boolean isIdenticalAddresses(LinkProperties target) {
+ public boolean isIdenticalAddresses(@NonNull LinkProperties target) {
Collection<InetAddress> targetAddresses = target.getAddresses();
Collection<InetAddress> sourceAddresses = getAddresses();
return (sourceAddresses.size() == targetAddresses.size()) ?
@@ -1238,7 +1295,7 @@
* @hide
*/
@UnsupportedAppUsage
- public boolean isIdenticalDnses(LinkProperties target) {
+ public boolean isIdenticalDnses(@NonNull LinkProperties target) {
Collection<InetAddress> targetDnses = target.getDnsServers();
String targetDomains = target.getDomains();
if (mDomains == null) {
@@ -1258,7 +1315,7 @@
* @return {@code true} if both are identical, {@code false} otherwise.
* @hide
*/
- public boolean isIdenticalPrivateDns(LinkProperties target) {
+ public boolean isIdenticalPrivateDns(@NonNull LinkProperties target) {
return (isPrivateDnsActive() == target.isPrivateDnsActive()
&& TextUtils.equals(getPrivateDnsServerName(),
target.getPrivateDnsServerName()));
@@ -1272,7 +1329,7 @@
* @return {@code true} if both are identical, {@code false} otherwise.
* @hide
*/
- public boolean isIdenticalValidatedPrivateDnses(LinkProperties target) {
+ public boolean isIdenticalValidatedPrivateDnses(@NonNull LinkProperties target) {
Collection<InetAddress> targetDnses = target.getValidatedPrivateDnsServers();
return (mValidatedPrivateDnses.size() == targetDnses.size())
? mValidatedPrivateDnses.containsAll(targetDnses) : false;
@@ -1285,7 +1342,7 @@
* @return {@code true} if both are identical, {@code false} otherwise.
* @hide
*/
- public boolean isIdenticalPcscfs(LinkProperties target) {
+ public boolean isIdenticalPcscfs(@NonNull LinkProperties target) {
Collection<InetAddress> targetPcscfs = target.getPcscfServers();
return (mPcscfs.size() == targetPcscfs.size()) ?
mPcscfs.containsAll(targetPcscfs) : false;
@@ -1299,7 +1356,7 @@
* @hide
*/
@UnsupportedAppUsage
- public boolean isIdenticalRoutes(LinkProperties target) {
+ public boolean isIdenticalRoutes(@NonNull LinkProperties target) {
Collection<RouteInfo> targetRoutes = target.getRoutes();
return (mRoutes.size() == targetRoutes.size()) ?
mRoutes.containsAll(targetRoutes) : false;
@@ -1313,7 +1370,7 @@
* @hide
*/
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023)
- public boolean isIdenticalHttpProxy(LinkProperties target) {
+ public boolean isIdenticalHttpProxy(@NonNull LinkProperties target) {
return getHttpProxy() == null ? target.getHttpProxy() == null :
getHttpProxy().equals(target.getHttpProxy());
}
@@ -1326,7 +1383,7 @@
* @hide
*/
@UnsupportedAppUsage
- public boolean isIdenticalStackedLinks(LinkProperties target) {
+ public boolean isIdenticalStackedLinks(@NonNull LinkProperties target) {
if (!mStackedLinks.keySet().equals(target.mStackedLinks.keySet())) {
return false;
}
@@ -1347,7 +1404,7 @@
* @return {@code true} if both are identical, {@code false} otherwise.
* @hide
*/
- public boolean isIdenticalMtu(LinkProperties target) {
+ public boolean isIdenticalMtu(@NonNull LinkProperties target) {
return getMtu() == target.getMtu();
}
@@ -1358,7 +1415,7 @@
* @return {@code true} if both are identical, {@code false} otherwise.
* @hide
*/
- public boolean isIdenticalTcpBufferSizes(LinkProperties target) {
+ public boolean isIdenticalTcpBufferSizes(@NonNull LinkProperties target) {
return Objects.equals(mTcpBufferSizes, target.mTcpBufferSizes);
}
@@ -1369,7 +1426,7 @@
* @return {@code true} if both are identical, {@code false} otherwise.
* @hide
*/
- public boolean isIdenticalNat64Prefix(LinkProperties target) {
+ public boolean isIdenticalNat64Prefix(@NonNull LinkProperties target) {
return Objects.equals(mNat64Prefix, target.mNat64Prefix);
}
@@ -1421,7 +1478,7 @@
* @return the differences between the addresses.
* @hide
*/
- public CompareResult<LinkAddress> compareAddresses(LinkProperties target) {
+ public @NonNull CompareResult<LinkAddress> compareAddresses(@Nullable LinkProperties target) {
/*
* Duplicate the LinkAddresses into removed, we will be removing
* address which are common between mLinkAddresses and target
@@ -1441,7 +1498,7 @@
* @return the differences between the DNS addresses.
* @hide
*/
- public CompareResult<InetAddress> compareDnses(LinkProperties target) {
+ public @NonNull CompareResult<InetAddress> compareDnses(@Nullable LinkProperties target) {
/*
* Duplicate the InetAddresses into removed, we will be removing
* dns address which are common between mDnses and target
@@ -1460,7 +1517,8 @@
* @return the differences between the DNS addresses.
* @hide
*/
- public CompareResult<InetAddress> compareValidatedPrivateDnses(LinkProperties target) {
+ public @NonNull CompareResult<InetAddress> compareValidatedPrivateDnses(
+ @Nullable LinkProperties target) {
return new CompareResult<>(mValidatedPrivateDnses,
target != null ? target.getValidatedPrivateDnsServers() : null);
}
@@ -1473,7 +1531,7 @@
* @return the differences between the routes.
* @hide
*/
- public CompareResult<RouteInfo> compareAllRoutes(LinkProperties target) {
+ public @NonNull CompareResult<RouteInfo> compareAllRoutes(@Nullable LinkProperties target) {
/*
* Duplicate the RouteInfos into removed, we will be removing
* routes which are common between mRoutes and target
@@ -1491,7 +1549,8 @@
* @return the differences between the interface names.
* @hide
*/
- public CompareResult<String> compareAllInterfaceNames(LinkProperties target) {
+ public @NonNull CompareResult<String> compareAllInterfaceNames(
+ @Nullable LinkProperties target) {
/*
* Duplicate the interface names into removed, we will be removing
* interface names which are common between this and target
diff --git a/core/java/android/net/LinkPropertiesParcelable.aidl b/core/java/android/net/LinkPropertiesParcelable.aidl
deleted file mode 100644
index 6b52239..0000000
--- a/core/java/android/net/LinkPropertiesParcelable.aidl
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (C) 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
-package android.net;
-
-import android.net.IpPrefixParcelable;
-import android.net.LinkAddressParcelable;
-import android.net.ProxyInfoParcelable;
-import android.net.RouteInfoParcelable;
-
-parcelable LinkPropertiesParcelable {
- String ifaceName;
- LinkAddressParcelable[] linkAddresses;
- String[] dnses;
- String[] pcscfs;
- String[] validatedPrivateDnses;
- boolean usePrivateDns;
- String privateDnsServerName;
- String domains;
- RouteInfoParcelable[] routes;
- ProxyInfoParcelable httpProxy;
- int mtu;
- String tcpBufferSizes;
- IpPrefixParcelable nat64Prefix;
-}
\ No newline at end of file
diff --git a/core/java/android/net/Network.aidl b/core/java/android/net/Network.aidl
index 73ba1af..05622025b 100644
--- a/core/java/android/net/Network.aidl
+++ b/core/java/android/net/Network.aidl
@@ -17,4 +17,4 @@
package android.net;
-parcelable Network;
+@JavaOnlyStableParcelable parcelable Network;
diff --git a/core/java/android/net/Network.java b/core/java/android/net/Network.java
index e04b5fc..09a86fc 100644
--- a/core/java/android/net/Network.java
+++ b/core/java/android/net/Network.java
@@ -16,6 +16,7 @@
package android.net;
+import android.annotation.NonNull;
import android.annotation.SystemApi;
import android.annotation.TestApi;
import android.annotation.UnsupportedAppUsage;
@@ -125,7 +126,7 @@
*/
@SystemApi
@TestApi
- public Network(Network that) {
+ public Network(@NonNull Network that) {
this(that.netId, that.mPrivateDnsBypass);
}
@@ -163,7 +164,7 @@
*/
@TestApi
@SystemApi
- public Network getPrivateDnsBypassingCopy() {
+ public @NonNull Network getPrivateDnsBypassingCopy() {
return new Network(netId, true);
}
diff --git a/core/java/android/net/NetworkCapabilities.java b/core/java/android/net/NetworkCapabilities.java
index e1cfe99..99375f8 100644
--- a/core/java/android/net/NetworkCapabilities.java
+++ b/core/java/android/net/NetworkCapabilities.java
@@ -17,6 +17,7 @@
package android.net;
import android.annotation.IntDef;
+import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.annotation.TestApi;
@@ -91,7 +92,7 @@
* Set all contents of this object to the contents of a NetworkCapabilities.
* @hide
*/
- public void set(NetworkCapabilities nc) {
+ public void set(@NonNull NetworkCapabilities nc) {
mNetworkCapabilities = nc.mNetworkCapabilities;
mTransportTypes = nc.mTransportTypes;
mLinkUpBandwidthKbps = nc.mLinkUpBandwidthKbps;
@@ -405,7 +406,7 @@
* @hide
*/
@UnsupportedAppUsage
- public NetworkCapabilities addCapability(@NetCapability int capability) {
+ public @NonNull NetworkCapabilities addCapability(@NetCapability int capability) {
checkValidCapability(capability);
mNetworkCapabilities |= 1 << capability;
mUnwantedNetworkCapabilities &= ~(1 << capability); // remove from unwanted capability list
@@ -442,7 +443,7 @@
* @hide
*/
@UnsupportedAppUsage
- public NetworkCapabilities removeCapability(@NetCapability int capability) {
+ public @NonNull NetworkCapabilities removeCapability(@NetCapability int capability) {
checkValidCapability(capability);
final long mask = ~(1 << capability);
mNetworkCapabilities &= mask;
@@ -456,7 +457,8 @@
*
* @hide
*/
- public NetworkCapabilities setCapability(@NetCapability int capability, boolean value) {
+ public @NonNull NetworkCapabilities setCapability(@NetCapability int capability,
+ boolean value) {
if (value) {
addCapability(capability);
} else {
@@ -534,7 +536,7 @@
}
/** Note this method may result in having the same capability in wanted and unwanted lists. */
- private void combineNetCapabilities(NetworkCapabilities nc) {
+ private void combineNetCapabilities(@NonNull NetworkCapabilities nc) {
this.mNetworkCapabilities |= nc.mNetworkCapabilities;
this.mUnwantedNetworkCapabilities |= nc.mUnwantedNetworkCapabilities;
}
@@ -546,7 +548,7 @@
*
* @hide
*/
- public String describeFirstNonRequestableCapability() {
+ public @Nullable String describeFirstNonRequestableCapability() {
final long nonRequestable = (mNetworkCapabilities | mUnwantedNetworkCapabilities)
& NON_REQUESTABLE_CAPABILITIES;
@@ -558,7 +560,8 @@
return null;
}
- private boolean satisfiedByNetCapabilities(NetworkCapabilities nc, boolean onlyImmutable) {
+ private boolean satisfiedByNetCapabilities(@NonNull NetworkCapabilities nc,
+ boolean onlyImmutable) {
long requestedCapabilities = mNetworkCapabilities;
long requestedUnwantedCapabilities = mUnwantedNetworkCapabilities;
long providedCapabilities = nc.mNetworkCapabilities;
@@ -572,12 +575,12 @@
}
/** @hide */
- public boolean equalsNetCapabilities(NetworkCapabilities nc) {
+ public boolean equalsNetCapabilities(@NonNull NetworkCapabilities nc) {
return (nc.mNetworkCapabilities == this.mNetworkCapabilities)
&& (nc.mUnwantedNetworkCapabilities == this.mUnwantedNetworkCapabilities);
}
- private boolean equalsNetCapabilitiesRequestable(NetworkCapabilities that) {
+ private boolean equalsNetCapabilitiesRequestable(@NonNull NetworkCapabilities that) {
return ((this.mNetworkCapabilities & ~NON_REQUESTABLE_CAPABILITIES) ==
(that.mNetworkCapabilities & ~NON_REQUESTABLE_CAPABILITIES))
&& ((this.mUnwantedNetworkCapabilities & ~NON_REQUESTABLE_CAPABILITIES) ==
@@ -713,7 +716,7 @@
* @hide
*/
@UnsupportedAppUsage
- public NetworkCapabilities addTransportType(@Transport int transportType) {
+ public @NonNull NetworkCapabilities addTransportType(@Transport int transportType) {
checkValidTransportType(transportType);
mTransportTypes |= 1 << transportType;
setNetworkSpecifier(mNetworkSpecifier); // used for exception checking
@@ -727,7 +730,7 @@
* @return This NetworkCapabilities instance, to facilitate chaining.
* @hide
*/
- public NetworkCapabilities removeTransportType(@Transport int transportType) {
+ public @NonNull NetworkCapabilities removeTransportType(@Transport int transportType) {
checkValidTransportType(transportType);
mTransportTypes &= ~(1 << transportType);
setNetworkSpecifier(mNetworkSpecifier); // used for exception checking
@@ -740,7 +743,8 @@
*
* @hide
*/
- public NetworkCapabilities setTransportType(@Transport int transportType, boolean value) {
+ public @NonNull NetworkCapabilities setTransportType(@Transport int transportType,
+ boolean value) {
if (value) {
addTransportType(transportType);
} else {
@@ -757,7 +761,7 @@
*/
@TestApi
@SystemApi
- public @Transport int[] getTransportTypes() {
+ @NonNull public @Transport int[] getTransportTypes() {
return BitUtils.unpackBits(mTransportTypes);
}
@@ -847,7 +851,7 @@
* @param upKbps the estimated first hop upstream (device to network) bandwidth.
* @hide
*/
- public NetworkCapabilities setLinkUpstreamBandwidthKbps(int upKbps) {
+ public @NonNull NetworkCapabilities setLinkUpstreamBandwidthKbps(int upKbps) {
mLinkUpBandwidthKbps = upKbps;
return this;
}
@@ -877,7 +881,7 @@
* @param downKbps the estimated first hop downstream (network to device) bandwidth.
* @hide
*/
- public NetworkCapabilities setLinkDownstreamBandwidthKbps(int downKbps) {
+ public @NonNull NetworkCapabilities setLinkDownstreamBandwidthKbps(int downKbps) {
mLinkDownBandwidthKbps = downKbps;
return this;
}
@@ -936,7 +940,7 @@
* @return This NetworkCapabilities instance, to facilitate chaining.
* @hide
*/
- public NetworkCapabilities setNetworkSpecifier(NetworkSpecifier networkSpecifier) {
+ public @NonNull NetworkCapabilities setNetworkSpecifier(NetworkSpecifier networkSpecifier) {
if (networkSpecifier != null && Long.bitCount(mTransportTypes) != 1) {
throw new IllegalStateException("Must have a single transport specified to use " +
"setNetworkSpecifier");
@@ -955,20 +959,20 @@
* @return This NetworkCapabilities instance, to facilitate chaining.
* @hide
*/
- public NetworkCapabilities setTransportInfo(TransportInfo transportInfo) {
+ public @NonNull NetworkCapabilities setTransportInfo(TransportInfo transportInfo) {
mTransportInfo = transportInfo;
return this;
}
/**
- * Gets the optional bearer specific network specifier.
+ * Gets the optional bearer specific network specifier. May be {@code null} if not set.
*
* @return The optional {@link NetworkSpecifier} specifying the bearer specific network
- * specifier. See {@link #setNetworkSpecifier}.
+ * specifier or {@code null}. See {@link #setNetworkSpecifier}.
* @hide
*/
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023)
- public NetworkSpecifier getNetworkSpecifier() {
+ public @Nullable NetworkSpecifier getNetworkSpecifier() {
return mNetworkSpecifier;
}
@@ -1015,8 +1019,6 @@
/**
* Magic value that indicates no signal strength provided. A request specifying this value is
* always satisfied.
- *
- * @hide
*/
public static final int SIGNAL_STRENGTH_UNSPECIFIED = Integer.MIN_VALUE;
@@ -1024,7 +1026,7 @@
* Signal strength. This is a signed integer, and higher values indicate better signal.
* The exact units are bearer-dependent. For example, Wi-Fi uses RSSI.
*/
- @UnsupportedAppUsage
+ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
private int mSignalStrength = SIGNAL_STRENGTH_UNSPECIFIED;
/**
@@ -1041,7 +1043,7 @@
* @hide
*/
@UnsupportedAppUsage
- public NetworkCapabilities setSignalStrength(int signalStrength) {
+ public @NonNull NetworkCapabilities setSignalStrength(int signalStrength) {
mSignalStrength = signalStrength;
return this;
}
@@ -1060,9 +1062,7 @@
* Retrieves the signal strength.
*
* @return The bearer-specific signal strength.
- * @hide
*/
- @SystemApi
public int getSignalStrength() {
return mSignalStrength;
}
@@ -1120,7 +1120,7 @@
* Convenience method to set the UIDs this network applies to to a single UID.
* @hide
*/
- public NetworkCapabilities setSingleUid(int uid) {
+ public @NonNull NetworkCapabilities setSingleUid(int uid) {
final ArraySet<UidRange> identity = new ArraySet<>(1);
identity.add(new UidRange(uid, uid));
setUids(identity);
@@ -1132,7 +1132,7 @@
* This makes a copy of the set so that callers can't modify it after the call.
* @hide
*/
- public NetworkCapabilities setUids(Set<UidRange> uids) {
+ public @NonNull NetworkCapabilities setUids(Set<UidRange> uids) {
if (null == uids) {
mUids = null;
} else {
@@ -1146,7 +1146,7 @@
* This returns a copy of the set so that callers can't modify the original object.
* @hide
*/
- public Set<UidRange> getUids() {
+ public @Nullable Set<UidRange> getUids() {
return null == mUids ? null : new ArraySet<>(mUids);
}
@@ -1179,7 +1179,7 @@
* @hide
*/
@VisibleForTesting
- public boolean equalsUids(NetworkCapabilities nc) {
+ public boolean equalsUids(@NonNull NetworkCapabilities nc) {
Set<UidRange> comparedUids = nc.mUids;
if (null == comparedUids) return null == mUids;
if (null == mUids) return false;
@@ -1212,7 +1212,7 @@
* @see #appliesToUid
* @hide
*/
- public boolean satisfiedByUids(NetworkCapabilities nc) {
+ public boolean satisfiedByUids(@NonNull NetworkCapabilities nc) {
if (null == nc.mUids || null == mUids) return true; // The network satisfies everything.
for (UidRange requiredRange : mUids) {
if (requiredRange.contains(nc.mEstablishingVpnAppUid)) return true;
@@ -1232,7 +1232,7 @@
* @hide
*/
@VisibleForTesting
- public boolean appliesToUidRange(UidRange requiredRange) {
+ public boolean appliesToUidRange(@Nullable UidRange requiredRange) {
if (null == mUids) return true;
for (UidRange uidRange : mUids) {
if (uidRange.containsRange(requiredRange)) {
@@ -1247,7 +1247,7 @@
* NetworkCapabilities apply to.
* nc is assumed nonnull.
*/
- private void combineUids(NetworkCapabilities nc) {
+ private void combineUids(@NonNull NetworkCapabilities nc) {
if (null == nc.mUids || null == mUids) {
mUids = null;
return;
@@ -1268,7 +1268,7 @@
* Sets the SSID of this network.
* @hide
*/
- public NetworkCapabilities setSSID(String ssid) {
+ public @NonNull NetworkCapabilities setSSID(@Nullable String ssid) {
mSSID = ssid;
return this;
}
@@ -1277,7 +1277,7 @@
* Gets the SSID of this network, or null if none or unknown.
* @hide
*/
- public String getSSID() {
+ public @Nullable String getSSID() {
return mSSID;
}
@@ -1285,7 +1285,7 @@
* Tests if the SSID of this network is the same as the SSID of the passed network.
* @hide
*/
- public boolean equalsSSID(NetworkCapabilities nc) {
+ public boolean equalsSSID(@NonNull NetworkCapabilities nc) {
return Objects.equals(mSSID, nc.mSSID);
}
@@ -1293,7 +1293,7 @@
* Check if the SSID requirements of this object are matched by the passed object.
* @hide
*/
- public boolean satisfiedBySSID(NetworkCapabilities nc) {
+ public boolean satisfiedBySSID(@NonNull NetworkCapabilities nc) {
return mSSID == null || mSSID.equals(nc.mSSID);
}
@@ -1304,7 +1304,7 @@
* equal.
* @hide
*/
- private void combineSSIDs(NetworkCapabilities nc) {
+ private void combineSSIDs(@NonNull NetworkCapabilities nc) {
if (mSSID != null && !mSSID.equals(nc.mSSID)) {
throw new IllegalStateException("Can't combine two SSIDs");
}
@@ -1319,7 +1319,7 @@
* both lists will never be satisfied.
* @hide
*/
- public void combineCapabilities(NetworkCapabilities nc) {
+ public void combineCapabilities(@NonNull NetworkCapabilities nc) {
combineNetCapabilities(nc);
combineTransportTypes(nc);
combineLinkBandwidths(nc);
@@ -1359,7 +1359,7 @@
*/
@TestApi
@SystemApi
- public boolean satisfiedByNetworkCapabilities(NetworkCapabilities nc) {
+ public boolean satisfiedByNetworkCapabilities(@Nullable NetworkCapabilities nc) {
return satisfiedByNetworkCapabilities(nc, false);
}
@@ -1370,7 +1370,7 @@
*
* @hide
*/
- public boolean satisfiedByImmutableNetworkCapabilities(NetworkCapabilities nc) {
+ public boolean satisfiedByImmutableNetworkCapabilities(@Nullable NetworkCapabilities nc) {
return satisfiedByNetworkCapabilities(nc, true);
}
@@ -1381,7 +1381,7 @@
*
* @hide
*/
- public String describeImmutableDifferences(NetworkCapabilities that) {
+ public String describeImmutableDifferences(@Nullable NetworkCapabilities that) {
if (that == null) {
return "other NetworkCapabilities was null";
}
@@ -1420,7 +1420,7 @@
*
* @hide
*/
- public boolean equalRequestableCapabilities(NetworkCapabilities nc) {
+ public boolean equalRequestableCapabilities(@Nullable NetworkCapabilities nc) {
if (nc == null) return false;
return (equalsNetCapabilitiesRequestable(nc) &&
equalsTransportTypes(nc) &&
@@ -1428,7 +1428,7 @@
}
@Override
- public boolean equals(Object obj) {
+ public boolean equals(@Nullable Object obj) {
if (obj == null || (obj instanceof NetworkCapabilities == false)) return false;
NetworkCapabilities that = (NetworkCapabilities) obj;
return (equalsNetCapabilities(that)
@@ -1502,7 +1502,7 @@
};
@Override
- public String toString() {
+ public @NonNull String toString() {
final StringBuilder sb = new StringBuilder("[");
if (0 != mTransportTypes) {
sb.append(" Transports: ");
@@ -1561,8 +1561,8 @@
/**
* @hide
*/
- public static void appendStringRepresentationOfBitMaskToStringBuilder(StringBuilder sb,
- long bitMask, NameOf nameFetcher, String separator) {
+ public static void appendStringRepresentationOfBitMaskToStringBuilder(@NonNull StringBuilder sb,
+ long bitMask, @NonNull NameOf nameFetcher, @NonNull String separator) {
int bitPos = 0;
boolean firstElementAdded = false;
while (bitMask != 0) {
@@ -1580,7 +1580,7 @@
}
/** @hide */
- public void writeToProto(ProtoOutputStream proto, long fieldId) {
+ public void writeToProto(@NonNull ProtoOutputStream proto, long fieldId) {
final long token = proto.start(fieldId);
for (int transport : getTransportTypes()) {
@@ -1610,7 +1610,7 @@
/**
* @hide
*/
- public static String capabilityNamesOf(@NetCapability int[] capabilities) {
+ public static @NonNull String capabilityNamesOf(@Nullable @NetCapability int[] capabilities) {
StringJoiner joiner = new StringJoiner("|");
if (capabilities != null) {
for (int c : capabilities) {
@@ -1623,7 +1623,7 @@
/**
* @hide
*/
- public static String capabilityNameOf(@NetCapability int capability) {
+ public static @NonNull String capabilityNameOf(@NetCapability int capability) {
switch (capability) {
case NET_CAPABILITY_MMS: return "MMS";
case NET_CAPABILITY_SUPL: return "SUPL";
@@ -1658,7 +1658,7 @@
* @hide
*/
@UnsupportedAppUsage
- public static String transportNamesOf(@Transport int[] types) {
+ public static @NonNull String transportNamesOf(@Nullable @Transport int[] types) {
StringJoiner joiner = new StringJoiner("|");
if (types != null) {
for (int t : types) {
@@ -1671,7 +1671,7 @@
/**
* @hide
*/
- public static String transportNameOf(@Transport int transport) {
+ public static @NonNull String transportNameOf(@Transport int transport) {
if (!isValidTransport(transport)) {
return "UNKNOWN";
}
diff --git a/core/java/android/net/NetworkInfo.java b/core/java/android/net/NetworkInfo.java
index 89d9961..8fb5a20 100644
--- a/core/java/android/net/NetworkInfo.java
+++ b/core/java/android/net/NetworkInfo.java
@@ -16,6 +16,7 @@
package android.net;
+import android.annotation.NonNull;
import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
@@ -138,7 +139,9 @@
private int mSubtype;
private String mTypeName;
private String mSubtypeName;
+ @NonNull
private State mState;
+ @NonNull
private DetailedState mDetailedState;
private String mReason;
private String mExtraInfo;
@@ -451,7 +454,7 @@
* the device and let apps react more easily and quickly to changes.
*/
@Deprecated
- public DetailedState getDetailedState() {
+ public @NonNull DetailedState getDetailedState() {
synchronized (this) {
return mDetailedState;
}
diff --git a/core/java/android/net/NetworkParcelable.aidl b/core/java/android/net/NetworkParcelable.aidl
deleted file mode 100644
index c26352e..0000000
--- a/core/java/android/net/NetworkParcelable.aidl
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
-**
-** Copyright (C) 2019 The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
-
-package android.net;
-
-parcelable NetworkParcelable {
- long networkHandle;
-}
diff --git a/core/java/android/net/NetworkRequest.java b/core/java/android/net/NetworkRequest.java
index 9508217..3a41a07 100644
--- a/core/java/android/net/NetworkRequest.java
+++ b/core/java/android/net/NetworkRequest.java
@@ -347,7 +347,7 @@
* @hide
*/
@SystemApi
- public Builder setSignalStrength(int signalStrength) {
+ public @NonNull Builder setSignalStrength(int signalStrength) {
mNetworkCapabilities.setSignalStrength(signalStrength);
return this;
}
diff --git a/core/java/android/net/NetworkTemplate.java b/core/java/android/net/NetworkTemplate.java
index bb75c63..60ae352 100644
--- a/core/java/android/net/NetworkTemplate.java
+++ b/core/java/android/net/NetworkTemplate.java
@@ -40,6 +40,7 @@
import android.util.BackupUtils;
import android.util.Log;
+import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.util.ArrayUtils;
import java.io.ByteArrayOutputStream;
@@ -89,10 +90,22 @@
private static boolean sForceAllNetworkTypes = false;
+ /**
+ * Results in matching against all mobile network types.
+ *
+ * <p>See {@link #matchesMobile} and {@link matchesMobileWildcard}.
+ */
+ @VisibleForTesting
public static void forceAllNetworkTypes() {
sForceAllNetworkTypes = true;
}
+ /** Resets the affect of {@link #forceAllNetworkTypes}. */
+ @VisibleForTesting
+ public static void resetForceAllNetworkTypes() {
+ sForceAllNetworkTypes = false;
+ }
+
/**
* Template to match {@link ConnectivityManager#TYPE_MOBILE} networks with
* the given IMSI.
diff --git a/core/java/android/net/ProxyInfo.aidl b/core/java/android/net/ProxyInfo.aidl
index 2c91960..a5d0c12 100644
--- a/core/java/android/net/ProxyInfo.aidl
+++ b/core/java/android/net/ProxyInfo.aidl
@@ -17,5 +17,5 @@
package android.net;
-parcelable ProxyInfo;
+@JavaOnlyStableParcelable parcelable ProxyInfo;
diff --git a/core/java/android/net/ProxyInfoParcelable.aidl b/core/java/android/net/ProxyInfoParcelable.aidl
deleted file mode 100644
index 59fd846..0000000
--- a/core/java/android/net/ProxyInfoParcelable.aidl
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Copyright (C) 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
-package android.net;
-
-parcelable ProxyInfoParcelable {
- String host;
- int port;
- String[] exclusionList;
- String pacFileUrl;
-}
diff --git a/core/java/android/net/RouteInfo.aidl b/core/java/android/net/RouteInfo.aidl
index 2296a57..7af9fda 100644
--- a/core/java/android/net/RouteInfo.aidl
+++ b/core/java/android/net/RouteInfo.aidl
@@ -16,4 +16,4 @@
package android.net;
-parcelable RouteInfo;
+@JavaOnlyStableParcelable parcelable RouteInfo;
diff --git a/core/java/android/net/RouteInfo.java b/core/java/android/net/RouteInfo.java
index 5c0f758..24d9b8e 100644
--- a/core/java/android/net/RouteInfo.java
+++ b/core/java/android/net/RouteInfo.java
@@ -16,6 +16,7 @@
package android.net;
+import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.annotation.TestApi;
import android.annotation.UnsupportedAppUsage;
@@ -112,7 +113,8 @@
*/
@SystemApi
@TestApi
- public RouteInfo(IpPrefix destination, InetAddress gateway, String iface, int type) {
+ public RouteInfo(@Nullable IpPrefix destination, @Nullable InetAddress gateway,
+ @Nullable String iface, int type) {
switch (type) {
case RTN_UNICAST:
case RTN_UNREACHABLE:
diff --git a/core/java/android/net/RouteInfoParcelable.aidl b/core/java/android/net/RouteInfoParcelable.aidl
deleted file mode 100644
index 15bcdcf..0000000
--- a/core/java/android/net/RouteInfoParcelable.aidl
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Copyright (C) 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
-package android.net;
-
-import android.net.IpPrefixParcelable;
-
-parcelable RouteInfoParcelable {
- IpPrefixParcelable destination;
- String gatewayAddr;
- String ifaceName;
- int type;
-}
diff --git a/core/java/android/net/StaticIpConfiguration.java b/core/java/android/net/StaticIpConfiguration.java
index 99cf3a9..0728d83 100644
--- a/core/java/android/net/StaticIpConfiguration.java
+++ b/core/java/android/net/StaticIpConfiguration.java
@@ -16,6 +16,8 @@
package android.net;
+import android.annotation.NonNull;
+import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.annotation.TestApi;
import android.annotation.UnsupportedAppUsage;
@@ -53,22 +55,26 @@
public final class StaticIpConfiguration implements Parcelable {
/** @hide */
@UnsupportedAppUsage
+ @Nullable
public LinkAddress ipAddress;
/** @hide */
@UnsupportedAppUsage
+ @Nullable
public InetAddress gateway;
/** @hide */
@UnsupportedAppUsage
+ @NonNull
public final ArrayList<InetAddress> dnsServers;
/** @hide */
@UnsupportedAppUsage
+ @Nullable
public String domains;
public StaticIpConfiguration() {
dnsServers = new ArrayList<InetAddress>();
}
- public StaticIpConfiguration(StaticIpConfiguration source) {
+ public StaticIpConfiguration(@Nullable StaticIpConfiguration source) {
this();
if (source != null) {
// All of these except dnsServers are immutable, so no need to make copies.
@@ -86,38 +92,38 @@
domains = null;
}
- public LinkAddress getIpAddress() {
+ public @Nullable LinkAddress getIpAddress() {
return ipAddress;
}
- public void setIpAddress(LinkAddress ipAddress) {
+ public void setIpAddress(@Nullable LinkAddress ipAddress) {
this.ipAddress = ipAddress;
}
- public InetAddress getGateway() {
+ public @Nullable InetAddress getGateway() {
return gateway;
}
- public void setGateway(InetAddress gateway) {
+ public void setGateway(@Nullable InetAddress gateway) {
this.gateway = gateway;
}
- public List<InetAddress> getDnsServers() {
+ public @NonNull List<InetAddress> getDnsServers() {
return dnsServers;
}
- public String getDomains() {
+ public @Nullable String getDomains() {
return domains;
}
- public void setDomains(String newDomains) {
+ public void setDomains(@Nullable String newDomains) {
domains = newDomains;
}
/**
* Add a DNS server to this configuration.
*/
- public void addDnsServer(InetAddress server) {
+ public void addDnsServer(@NonNull InetAddress server) {
dnsServers.add(server);
}
@@ -128,7 +134,7 @@
* route to the gateway as well. This configuration is arguably invalid, but it used to work
* in K and earlier, and other OSes appear to accept it.
*/
- public List<RouteInfo> getRoutes(String iface) {
+ public @NonNull List<RouteInfo> getRoutes(String iface) {
List<RouteInfo> routes = new ArrayList<RouteInfo>(3);
if (ipAddress != null) {
RouteInfo connectedRoute = new RouteInfo(ipAddress, null, iface);
@@ -150,7 +156,7 @@
* IPv6 configuration) will not be included.
* @hide
*/
- public LinkProperties toLinkProperties(String iface) {
+ public @NonNull LinkProperties toLinkProperties(String iface) {
LinkProperties lp = new LinkProperties();
lp.setInterfaceName(iface);
if (ipAddress != null) {
diff --git a/core/java/android/net/UidRange.java b/core/java/android/net/UidRange.java
index 793c82d..fa0eeb9e 100644
--- a/core/java/android/net/UidRange.java
+++ b/core/java/android/net/UidRange.java
@@ -19,14 +19,17 @@
import static android.os.UserHandle.PER_USER_RANGE;
import android.os.Parcel;
+import android.os.Parcelable;
/**
* An inclusive range of UIDs.
*
* @hide
*/
-public final class UidRange extends UidRangeParcel {
- private UidRange() {}
+public final class UidRange implements Parcelable {
+ public final int start;
+ public final int stop;
+
public UidRange(int startUid, int stopUid) {
if (startUid < 0) throw new IllegalArgumentException("Invalid start UID.");
if (stopUid < 0) throw new IllegalArgumentException("Invalid stop UID.");
@@ -86,18 +89,28 @@
return start + "-" + stop;
}
- /**
- * DO NOT override "writeToParcel" and "readFromParcel" in this class.
- * The parceling code is autogenerated by the superclass.
- */
+ // Implement the Parcelable interface
+ // TODO: Consider making this class no longer parcelable, since all users are likely in the
+ // system server.
+ @Override
+ public int describeContents() {
+ return 0;
+ }
+
+ @Override
+ public void writeToParcel(Parcel dest, int flags) {
+ dest.writeInt(start);
+ dest.writeInt(stop);
+ }
public static final Creator<UidRange> CREATOR =
new Creator<UidRange>() {
@Override
public UidRange createFromParcel(Parcel in) {
- UidRange obj = new UidRange();
- obj.readFromParcel(in);
- return obj;
+ int start = in.readInt();
+ int stop = in.readInt();
+
+ return new UidRange(start, stop);
}
@Override
public UidRange[] newArray(int size) {
diff --git a/core/java/android/net/VpnService.java b/core/java/android/net/VpnService.java
index 870d8b1..ea245a4 100644
--- a/core/java/android/net/VpnService.java
+++ b/core/java/android/net/VpnService.java
@@ -27,6 +27,8 @@
import android.app.Activity;
import android.app.PendingIntent;
import android.app.Service;
+import android.app.admin.DevicePolicyManager;
+import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.pm.IPackageManager;
@@ -48,6 +50,7 @@
import java.net.Socket;
import java.util.ArrayList;
import java.util.List;
+import java.util.Set;
/**
* VpnService is a base class for applications to extend and build their
@@ -138,7 +141,7 @@
* provides users with the ability to set it as always-on, so that VPN connection is
* persisted after device reboot and app upgrade. Always-on VPN can also be enabled by device
* owner and profile owner apps through
- * {@link android.app.admin.DevicePolicyManager#setAlwaysOnVpnPackage}.
+ * {@link DevicePolicyManager#setAlwaysOnVpnPackage}.
*
* <p>VPN apps not supporting this feature should opt out by adding this meta-data field to the
* {@code VpnService} component of {@code AndroidManifest.xml}. In case there is more than one
@@ -370,7 +373,10 @@
}
/**
- * Returns whether the service is running in always-on VPN mode.
+ * Returns whether the service is running in always-on VPN mode. In this mode the system ensures
+ * that the service is always running by restarting it when necessary, e.g. after reboot.
+ *
+ * @see DevicePolicyManager#setAlwaysOnVpnPackage(ComponentName, String, boolean, Set)
*/
public final boolean isAlwaysOn() {
try {
@@ -381,8 +387,11 @@
}
/**
- * Returns whether the service is running in always-on VPN mode blocking connections without
- * VPN.
+ * Returns whether the service is running in always-on VPN lockdown mode. In this mode the
+ * system ensures that the service is always running and that the apps aren't allowed to bypass
+ * the VPN.
+ *
+ * @see DevicePolicyManager#setAlwaysOnVpnPackage(ComponentName, String, boolean, Set)
*/
public final boolean isLockdownEnabled() {
try {
diff --git a/core/java/android/net/apf/ApfCapabilities.java b/core/java/android/net/apf/ApfCapabilities.java
index e09fa8f..17a03c7c 100644
--- a/core/java/android/net/apf/ApfCapabilities.java
+++ b/core/java/android/net/apf/ApfCapabilities.java
@@ -16,20 +16,24 @@
package android.net.apf;
+import android.annotation.NonNull;
import android.annotation.SystemApi;
import android.annotation.TestApi;
import android.content.Context;
+import android.os.Parcel;
+import android.os.Parcelable;
import com.android.internal.R;
/**
* APF program support capabilities.
*
+ * This class is immutable.
* @hide
*/
@SystemApi
@TestApi
-public class ApfCapabilities {
+public final class ApfCapabilities implements Parcelable {
/**
* Version of APF instruction set supported for packet filtering. 0 indicates no support for
* packet filtering using APF programs.
@@ -53,6 +57,37 @@
this.apfPacketFormat = apfPacketFormat;
}
+ private ApfCapabilities(Parcel in) {
+ apfVersionSupported = in.readInt();
+ maximumApfProgramSize = in.readInt();
+ apfPacketFormat = in.readInt();
+ }
+
+
+ @Override
+ public int describeContents() {
+ return 0;
+ }
+
+ @Override
+ public void writeToParcel(Parcel dest, int flags) {
+ dest.writeInt(apfVersionSupported);
+ dest.writeInt(maximumApfProgramSize);
+ dest.writeInt(apfPacketFormat);
+ }
+
+ public static final Creator<ApfCapabilities> CREATOR = new Creator<ApfCapabilities>() {
+ @Override
+ public ApfCapabilities createFromParcel(Parcel in) {
+ return new ApfCapabilities(in);
+ }
+
+ @Override
+ public ApfCapabilities[] newArray(int size) {
+ return new ApfCapabilities[size];
+ }
+ };
+
@Override
public String toString() {
return String.format("%s{version: %d, maxSize: %d, format: %d}", getClass().getSimpleName(),
@@ -81,14 +116,14 @@
/**
* @return Whether the APF Filter in the device should filter out IEEE 802.3 Frames.
*/
- public static boolean getApfDrop8023Frames(Context context) {
+ public static boolean getApfDrop8023Frames(@NonNull Context context) {
return context.getResources().getBoolean(R.bool.config_apfDrop802_3Frames);
}
/**
* @return An array of blacklisted EtherType, packets with EtherTypes within it will be dropped.
*/
- public static int[] getApfEthTypeBlackList(Context context) {
+ public static @NonNull int[] getApfEthTypeBlackList(@NonNull Context context) {
return context.getResources().getIntArray(R.array.config_apfEthTypeBlackList);
}
}
diff --git a/core/java/android/net/captiveportal/CaptivePortalProbeResult.java b/core/java/android/net/captiveportal/CaptivePortalProbeResult.java
index 3930344..a1d3de2 100644
--- a/core/java/android/net/captiveportal/CaptivePortalProbeResult.java
+++ b/core/java/android/net/captiveportal/CaptivePortalProbeResult.java
@@ -16,6 +16,7 @@
package android.net.captiveportal;
+import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.annotation.TestApi;
@@ -39,14 +40,18 @@
*/
public static final int PARTIAL_CODE = -1;
+ @NonNull
public static final CaptivePortalProbeResult FAILED = new CaptivePortalProbeResult(FAILED_CODE);
+ @NonNull
public static final CaptivePortalProbeResult SUCCESS =
new CaptivePortalProbeResult(SUCCESS_CODE);
public static final CaptivePortalProbeResult PARTIAL =
new CaptivePortalProbeResult(PARTIAL_CODE);
private final int mHttpResponseCode; // HTTP response code returned from Internet probe.
+ @Nullable
public final String redirectUrl; // Redirect destination returned from Internet probe.
+ @Nullable
public final String detectUrl; // URL where a 204 response code indicates
// captive portal has been appeased.
@Nullable
@@ -56,12 +61,13 @@
this(httpResponseCode, null, null);
}
- public CaptivePortalProbeResult(int httpResponseCode, String redirectUrl, String detectUrl) {
+ public CaptivePortalProbeResult(int httpResponseCode, @Nullable String redirectUrl,
+ @Nullable String detectUrl) {
this(httpResponseCode, redirectUrl, detectUrl, null);
}
- public CaptivePortalProbeResult(int httpResponseCode, String redirectUrl, String detectUrl,
- CaptivePortalProbeSpec probeSpec) {
+ public CaptivePortalProbeResult(int httpResponseCode, @Nullable String redirectUrl,
+ @Nullable String detectUrl, @Nullable CaptivePortalProbeSpec probeSpec) {
mHttpResponseCode = httpResponseCode;
this.redirectUrl = redirectUrl;
this.detectUrl = detectUrl;
diff --git a/core/java/android/net/captiveportal/CaptivePortalProbeSpec.java b/core/java/android/net/captiveportal/CaptivePortalProbeSpec.java
index 7ad4ecf..6c6a16c 100644
--- a/core/java/android/net/captiveportal/CaptivePortalProbeSpec.java
+++ b/core/java/android/net/captiveportal/CaptivePortalProbeSpec.java
@@ -19,6 +19,8 @@
import static android.net.captiveportal.CaptivePortalProbeResult.PORTAL_CODE;
import static android.net.captiveportal.CaptivePortalProbeResult.SUCCESS_CODE;
+import static com.android.internal.util.Preconditions.checkNotNull;
+
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SystemApi;
@@ -48,9 +50,10 @@
private final String mEncodedSpec;
private final URL mUrl;
- CaptivePortalProbeSpec(String encodedSpec, URL url) {
- mEncodedSpec = encodedSpec;
- mUrl = url;
+ CaptivePortalProbeSpec(@NonNull String encodedSpec, @NonNull URL url)
+ throws NullPointerException {
+ mEncodedSpec = checkNotNull(encodedSpec);
+ mUrl = checkNotNull(url);
}
/**
@@ -64,7 +67,7 @@
*/
@VisibleForTesting
@NonNull
- public static CaptivePortalProbeSpec parseSpec(String spec) throws ParseException,
+ public static CaptivePortalProbeSpec parseSpec(@NonNull String spec) throws ParseException,
MalformedURLException {
if (TextUtils.isEmpty(spec)) {
throw new ParseException("Empty probe spec", 0 /* errorOffset */);
@@ -84,7 +87,8 @@
}
@Nullable
- private static Pattern parsePatternIfNonEmpty(String pattern, int pos) throws ParseException {
+ private static Pattern parsePatternIfNonEmpty(@Nullable String pattern, int pos)
+ throws ParseException {
if (TextUtils.isEmpty(pattern)) {
return null;
}
@@ -120,8 +124,9 @@
* <p>Each spec is separated by @@,@@ and follows the format for {@link #parseSpec(String)}.
* <p>This method does not throw but ignores any entry that could not be parsed.
*/
+ @NonNull
public static Collection<CaptivePortalProbeSpec> parseCaptivePortalProbeSpecs(
- String settingsVal) {
+ @NonNull String settingsVal) {
List<CaptivePortalProbeSpec> specs = new ArrayList<>();
if (settingsVal != null) {
for (String spec : TextUtils.split(settingsVal, SPEC_SEPARATOR)) {
@@ -142,12 +147,15 @@
/**
* Get the probe result from HTTP status and location header.
*/
+ @NonNull
public abstract CaptivePortalProbeResult getResult(int status, @Nullable String locationHeader);
+ @NonNull
public String getEncodedSpec() {
return mEncodedSpec;
}
+ @NonNull
public URL getUrl() {
return mUrl;
}
diff --git a/core/java/android/net/metrics/ApfProgramEvent.java b/core/java/android/net/metrics/ApfProgramEvent.java
index 8601005..30d3b84 100644
--- a/core/java/android/net/metrics/ApfProgramEvent.java
+++ b/core/java/android/net/metrics/ApfProgramEvent.java
@@ -17,6 +17,7 @@
package android.net.metrics;
import android.annotation.IntDef;
+import android.annotation.NonNull;
import android.annotation.SystemApi;
import android.annotation.TestApi;
import android.annotation.UnsupportedAppUsage;
@@ -95,7 +96,7 @@
/**
* Utility to create an instance of {@link ApfProgramEvent}.
*/
- public static class Builder {
+ public static final class Builder {
private long mLifetime;
private long mActualLifetime;
private int mFilteredRas;
@@ -106,6 +107,7 @@
/**
* Set the maximum computed lifetime of the program in seconds.
*/
+ @NonNull
public Builder setLifetime(long lifetime) {
mLifetime = lifetime;
return this;
@@ -114,6 +116,7 @@
/**
* Set the effective program lifetime in seconds.
*/
+ @NonNull
public Builder setActualLifetime(long lifetime) {
mActualLifetime = lifetime;
return this;
@@ -122,6 +125,7 @@
/**
* Set the number of RAs filtered by the APF program.
*/
+ @NonNull
public Builder setFilteredRas(int filteredRas) {
mFilteredRas = filteredRas;
return this;
@@ -130,6 +134,7 @@
/**
* Set the total number of current RAs at generation time.
*/
+ @NonNull
public Builder setCurrentRas(int currentRas) {
mCurrentRas = currentRas;
return this;
@@ -138,6 +143,7 @@
/**
* Set the length of the APF program in bytes.
*/
+ @NonNull
public Builder setProgramLength(int programLength) {
mProgramLength = programLength;
return this;
@@ -146,6 +152,7 @@
/**
* Set the flags describing what an Apf program filters.
*/
+ @NonNull
public Builder setFlags(boolean hasIPv4, boolean multicastFilterOn) {
mFlags = flagsFor(hasIPv4, multicastFilterOn);
return this;
@@ -154,6 +161,7 @@
/**
* Build a new {@link ApfProgramEvent}.
*/
+ @NonNull
public ApfProgramEvent build() {
return new ApfProgramEvent(mLifetime, mActualLifetime, mFilteredRas, mCurrentRas,
mProgramLength, mFlags);
diff --git a/core/java/android/net/metrics/ApfStats.java b/core/java/android/net/metrics/ApfStats.java
index 844a134..ddc788d 100644
--- a/core/java/android/net/metrics/ApfStats.java
+++ b/core/java/android/net/metrics/ApfStats.java
@@ -16,6 +16,7 @@
package android.net.metrics;
+import android.annotation.NonNull;
import android.annotation.SystemApi;
import android.annotation.TestApi;
import android.annotation.UnsupportedAppUsage;
@@ -125,7 +126,7 @@
*/
@SystemApi
@TestApi
- public static class Builder {
+ public static final class Builder {
private long mDurationMs;
private int mReceivedRas;
private int mMatchingRas;
@@ -140,6 +141,7 @@
/**
* Set the time interval in milliseconds these statistics covers.
*/
+ @NonNull
public Builder setDurationMs(long durationMs) {
mDurationMs = durationMs;
return this;
@@ -148,6 +150,7 @@
/**
* Set the number of received RAs.
*/
+ @NonNull
public Builder setReceivedRas(int receivedRas) {
mReceivedRas = receivedRas;
return this;
@@ -156,6 +159,7 @@
/**
* Set the number of received RAs matching a known RA.
*/
+ @NonNull
public Builder setMatchingRas(int matchingRas) {
mMatchingRas = matchingRas;
return this;
@@ -164,6 +168,7 @@
/**
* Set the number of received RAs ignored due to the MAX_RAS limit.
*/
+ @NonNull
public Builder setDroppedRas(int droppedRas) {
mDroppedRas = droppedRas;
return this;
@@ -172,6 +177,7 @@
/**
* Set the number of received RAs with a minimum lifetime of 0.
*/
+ @NonNull
public Builder setZeroLifetimeRas(int zeroLifetimeRas) {
mZeroLifetimeRas = zeroLifetimeRas;
return this;
@@ -180,6 +186,7 @@
/**
* Set the number of received RAs that could not be parsed.
*/
+ @NonNull
public Builder setParseErrors(int parseErrors) {
mParseErrors = parseErrors;
return this;
@@ -188,6 +195,7 @@
/**
* Set the number of APF program updates from receiving RAs.
*/
+ @NonNull
public Builder setProgramUpdates(int programUpdates) {
mProgramUpdates = programUpdates;
return this;
@@ -196,6 +204,7 @@
/**
* Set the total number of APF program updates.
*/
+ @NonNull
public Builder setProgramUpdatesAll(int programUpdatesAll) {
mProgramUpdatesAll = programUpdatesAll;
return this;
@@ -204,6 +213,7 @@
/**
* Set the number of APF program updates from allowing multicast traffic.
*/
+ @NonNull
public Builder setProgramUpdatesAllowingMulticast(int programUpdatesAllowingMulticast) {
mProgramUpdatesAllowingMulticast = programUpdatesAllowingMulticast;
return this;
@@ -212,6 +222,7 @@
/**
* Set the maximum APF program size advertised by hardware.
*/
+ @NonNull
public Builder setMaxProgramSize(int maxProgramSize) {
mMaxProgramSize = maxProgramSize;
return this;
@@ -220,6 +231,7 @@
/**
* Create a new {@link ApfStats}.
*/
+ @NonNull
public ApfStats build() {
return new ApfStats(mDurationMs, mReceivedRas, mMatchingRas, mDroppedRas,
mZeroLifetimeRas, mParseErrors, mProgramUpdates, mProgramUpdatesAll,
diff --git a/core/java/android/net/metrics/DhcpClientEvent.java b/core/java/android/net/metrics/DhcpClientEvent.java
index 3008115..93063cb 100644
--- a/core/java/android/net/metrics/DhcpClientEvent.java
+++ b/core/java/android/net/metrics/DhcpClientEvent.java
@@ -16,6 +16,7 @@
package android.net.metrics;
+import android.annotation.NonNull;
import android.annotation.SystemApi;
import android.annotation.TestApi;
import android.annotation.UnsupportedAppUsage;
@@ -51,13 +52,14 @@
/**
* Utility to create an instance of {@link ApfProgramEvent}.
*/
- public static class Builder {
+ public static final class Builder {
private String mMsg;
private int mDurationMs;
/**
* Set the message of the event.
*/
+ @NonNull
public Builder setMsg(String msg) {
mMsg = msg;
return this;
@@ -66,6 +68,7 @@
/**
* Set the duration of the event in milliseconds.
*/
+ @NonNull
public Builder setDurationMs(int durationMs) {
mDurationMs = durationMs;
return this;
@@ -74,6 +77,7 @@
/**
* Create a new {@link DhcpClientEvent}.
*/
+ @NonNull
public DhcpClientEvent build() {
return new DhcpClientEvent(mMsg, mDurationMs);
}
diff --git a/core/java/android/net/metrics/DhcpErrorEvent.java b/core/java/android/net/metrics/DhcpErrorEvent.java
index 18fde80..8beaa40 100644
--- a/core/java/android/net/metrics/DhcpErrorEvent.java
+++ b/core/java/android/net/metrics/DhcpErrorEvent.java
@@ -37,26 +37,26 @@
public static final int DHCP_ERROR = 4;
public static final int MISC_ERROR = 5;
- public static final int L2_TOO_SHORT = makeErrorCode(L2_ERROR, 1);
- public static final int L2_WRONG_ETH_TYPE = makeErrorCode(L2_ERROR, 2);
+ public static final int L2_TOO_SHORT = (L2_ERROR << 24) | (1 << 16);
+ public static final int L2_WRONG_ETH_TYPE = (L2_ERROR << 24) | (2 << 16);
- public static final int L3_TOO_SHORT = makeErrorCode(L3_ERROR, 1);
- public static final int L3_NOT_IPV4 = makeErrorCode(L3_ERROR, 2);
- public static final int L3_INVALID_IP = makeErrorCode(L3_ERROR, 3);
+ public static final int L3_TOO_SHORT = (L3_ERROR << 24) | (1 << 16);
+ public static final int L3_NOT_IPV4 = (L3_ERROR << 24) | (2 << 16);
+ public static final int L3_INVALID_IP = (L3_ERROR << 24) | (3 << 16);
- public static final int L4_NOT_UDP = makeErrorCode(L4_ERROR, 1);
- public static final int L4_WRONG_PORT = makeErrorCode(L4_ERROR, 2);
+ public static final int L4_NOT_UDP = (L4_ERROR << 24) | (1 << 16);
+ public static final int L4_WRONG_PORT = (L4_ERROR << 24) | (2 << 16);
- public static final int BOOTP_TOO_SHORT = makeErrorCode(DHCP_ERROR, 1);
- public static final int DHCP_BAD_MAGIC_COOKIE = makeErrorCode(DHCP_ERROR, 2);
- public static final int DHCP_INVALID_OPTION_LENGTH = makeErrorCode(DHCP_ERROR, 3);
- public static final int DHCP_NO_MSG_TYPE = makeErrorCode(DHCP_ERROR, 4);
- public static final int DHCP_UNKNOWN_MSG_TYPE = makeErrorCode(DHCP_ERROR, 5);
- public static final int DHCP_NO_COOKIE = makeErrorCode(DHCP_ERROR, 6);
+ public static final int BOOTP_TOO_SHORT = (DHCP_ERROR << 24) | (1 << 16);
+ public static final int DHCP_BAD_MAGIC_COOKIE = (DHCP_ERROR << 24) | (2 << 16);
+ public static final int DHCP_INVALID_OPTION_LENGTH = (DHCP_ERROR << 24) | (3 << 16);
+ public static final int DHCP_NO_MSG_TYPE = (DHCP_ERROR << 24) | (4 << 16);
+ public static final int DHCP_UNKNOWN_MSG_TYPE = (DHCP_ERROR << 24) | (5 << 16);
+ public static final int DHCP_NO_COOKIE = (DHCP_ERROR << 24) | (6 << 16);
- public static final int BUFFER_UNDERFLOW = makeErrorCode(MISC_ERROR, 1);
- public static final int RECEIVE_ERROR = makeErrorCode(MISC_ERROR, 2);
- public static final int PARSING_ERROR = makeErrorCode(MISC_ERROR, 3);
+ public static final int BUFFER_UNDERFLOW = (MISC_ERROR << 24) | (1 << 16);
+ public static final int RECEIVE_ERROR = (MISC_ERROR << 24) | (2 << 16);
+ public static final int PARSING_ERROR = (MISC_ERROR << 24) | (3 << 16);
// error code byte format (MSB to LSB):
// byte 0: error type
@@ -102,10 +102,6 @@
return (0xFFFF0000 & errorCode) | (0xFF & option);
}
- private static int makeErrorCode(int type, int subtype) {
- return (type << 24) | ((0xFF & subtype) << 16);
- }
-
@Override
public String toString() {
return String.format("DhcpErrorEvent(%s)", Decoder.constants.get(errorCode));
diff --git a/core/java/android/net/metrics/IpConnectivityLog.java b/core/java/android/net/metrics/IpConnectivityLog.java
index 5b5a235..680c015 100644
--- a/core/java/android/net/metrics/IpConnectivityLog.java
+++ b/core/java/android/net/metrics/IpConnectivityLog.java
@@ -16,6 +16,7 @@
package android.net.metrics;
+import android.annotation.NonNull;
import android.annotation.SystemApi;
import android.annotation.TestApi;
import android.net.ConnectivityMetricsEvent;
@@ -41,7 +42,7 @@
/** @hide */
public static final String SERVICE_NAME = "connmetrics";
-
+ @NonNull
private IIpConnectivityMetrics mService;
/**
@@ -57,7 +58,7 @@
/** @hide */
@VisibleForTesting
- public IpConnectivityLog(IIpConnectivityMetrics service) {
+ public IpConnectivityLog(@NonNull IIpConnectivityMetrics service) {
mService = service;
}
@@ -83,7 +84,7 @@
* @return true if the event was successfully logged.
* @hide
*/
- public boolean log(ConnectivityMetricsEvent ev) {
+ public boolean log(@NonNull ConnectivityMetricsEvent ev) {
if (!checkLoggerService()) {
if (DBG) {
Log.d(TAG, SERVICE_NAME + " service was not ready");
@@ -109,7 +110,7 @@
* @param data is a Parcelable instance representing the event.
* @return true if the event was successfully logged.
*/
- public boolean log(long timestamp, Event data) {
+ public boolean log(long timestamp, @NonNull Event data) {
ConnectivityMetricsEvent ev = makeEv(data);
ev.timestamp = timestamp;
return log(ev);
@@ -121,7 +122,7 @@
* @param data is a Parcelable instance representing the event.
* @return true if the event was successfully logged.
*/
- public boolean log(String ifname, Event data) {
+ public boolean log(@NonNull String ifname, @NonNull Event data) {
ConnectivityMetricsEvent ev = makeEv(data);
ev.ifname = ifname;
return log(ev);
@@ -135,7 +136,7 @@
* @param data is a Parcelable instance representing the event.
* @return true if the event was successfully logged.
*/
- public boolean log(Network network, int[] transports, Event data) {
+ public boolean log(@NonNull Network network, @NonNull int[] transports, @NonNull Event data) {
return log(network.netId, transports, data);
}
@@ -147,7 +148,7 @@
* @param data is a Parcelable instance representing the event.
* @return true if the event was successfully logged.
*/
- public boolean log(int netid, int[] transports, Event data) {
+ public boolean log(int netid, @NonNull int[] transports, @NonNull Event data) {
ConnectivityMetricsEvent ev = makeEv(data);
ev.netId = netid;
ev.transports = BitUtils.packBits(transports);
@@ -159,7 +160,7 @@
* @param data is a Parcelable instance representing the event.
* @return true if the event was successfully logged.
*/
- public boolean log(Event data) {
+ public boolean log(@NonNull Event data) {
return log(makeEv(data));
}
diff --git a/core/java/android/net/metrics/RaEvent.java b/core/java/android/net/metrics/RaEvent.java
index 04a2e6e..d16a104 100644
--- a/core/java/android/net/metrics/RaEvent.java
+++ b/core/java/android/net/metrics/RaEvent.java
@@ -16,6 +16,7 @@
package android.net.metrics;
+import android.annotation.NonNull;
import android.annotation.SystemApi;
import android.annotation.TestApi;
import android.os.Parcel;
@@ -107,7 +108,7 @@
}
};
- public static class Builder {
+ public static final class Builder {
long routerLifetime = NO_LIFETIME;
long prefixValidLifetime = NO_LIFETIME;
@@ -119,37 +120,37 @@
public Builder() {
}
- public RaEvent build() {
+ public @NonNull RaEvent build() {
return new RaEvent(routerLifetime, prefixValidLifetime, prefixPreferredLifetime,
routeInfoLifetime, rdnssLifetime, dnsslLifetime);
}
- public Builder updateRouterLifetime(long lifetime) {
+ public @NonNull Builder updateRouterLifetime(long lifetime) {
routerLifetime = updateLifetime(routerLifetime, lifetime);
return this;
}
- public Builder updatePrefixValidLifetime(long lifetime) {
+ public @NonNull Builder updatePrefixValidLifetime(long lifetime) {
prefixValidLifetime = updateLifetime(prefixValidLifetime, lifetime);
return this;
}
- public Builder updatePrefixPreferredLifetime(long lifetime) {
+ public @NonNull Builder updatePrefixPreferredLifetime(long lifetime) {
prefixPreferredLifetime = updateLifetime(prefixPreferredLifetime, lifetime);
return this;
}
- public Builder updateRouteInfoLifetime(long lifetime) {
+ public @NonNull Builder updateRouteInfoLifetime(long lifetime) {
routeInfoLifetime = updateLifetime(routeInfoLifetime, lifetime);
return this;
}
- public Builder updateRdnssLifetime(long lifetime) {
+ public @NonNull Builder updateRdnssLifetime(long lifetime) {
rdnssLifetime = updateLifetime(rdnssLifetime, lifetime);
return this;
}
- public Builder updateDnsslLifetime(long lifetime) {
+ public @NonNull Builder updateDnsslLifetime(long lifetime) {
dnsslLifetime = updateLifetime(dnsslLifetime, lifetime);
return this;
}
diff --git a/core/java/android/net/metrics/ValidationProbeEvent.java b/core/java/android/net/metrics/ValidationProbeEvent.java
index a43dc60..9eb87ef 100644
--- a/core/java/android/net/metrics/ValidationProbeEvent.java
+++ b/core/java/android/net/metrics/ValidationProbeEvent.java
@@ -17,6 +17,7 @@
package android.net.metrics;
import android.annotation.IntDef;
+import android.annotation.NonNull;
import android.annotation.SystemApi;
import android.annotation.TestApi;
import android.os.Parcel;
@@ -81,7 +82,7 @@
/**
* Utility to create an instance of {@link ValidationProbeEvent}.
*/
- public static class Builder {
+ public static final class Builder {
private long mDurationMs;
private int mProbeType;
private int mReturnCode;
@@ -89,6 +90,7 @@
/**
* Set the duration of the probe in milliseconds.
*/
+ @NonNull
public Builder setDurationMs(long durationMs) {
mDurationMs = durationMs;
return this;
@@ -97,6 +99,7 @@
/**
* Set the probe type based on whether it was the first validation.
*/
+ @NonNull
public Builder setProbeType(int probeType, boolean firstValidation) {
mProbeType = makeProbeType(probeType, firstValidation);
return this;
@@ -105,6 +108,7 @@
/**
* Set the return code of the probe.
*/
+ @NonNull
public Builder setReturnCode(int returnCode) {
mReturnCode = returnCode;
return this;
@@ -113,6 +117,7 @@
/**
* Create a new {@link ValidationProbeEvent}.
*/
+ @NonNull
public ValidationProbeEvent build() {
return new ValidationProbeEvent(mDurationMs, mProbeType, mReturnCode);
}
diff --git a/core/java/android/net/util/SocketUtils.java b/core/java/android/net/util/SocketUtils.java
index 5827f9e..6f8aece 100644
--- a/core/java/android/net/util/SocketUtils.java
+++ b/core/java/android/net/util/SocketUtils.java
@@ -45,7 +45,7 @@
*/
@SystemApi
@TestApi
-public class SocketUtils {
+public final class SocketUtils {
/**
* Create a raw datagram socket that is bound to an interface.
*
@@ -63,6 +63,7 @@
/**
* Make a socket address to communicate with netlink.
*/
+ @NonNull
public static SocketAddress makeNetlinkSocketAddress(int portId, int groupsMask) {
return new NetlinkSocketAddress(portId, groupsMask);
}
@@ -70,13 +71,15 @@
/**
* Make socket address that packet sockets can bind to.
*/
- public static SocketAddress makePacketSocketAddress(short protocol, int ifIndex) {
- return new PacketSocketAddress(protocol, ifIndex);
+ @NonNull
+ public static SocketAddress makePacketSocketAddress(int protocol, int ifIndex) {
+ return new PacketSocketAddress((short) protocol, ifIndex);
}
/**
* Make a socket address that packet socket can send packets to.
*/
+ @NonNull
public static SocketAddress makePacketSocketAddress(int ifIndex, @NonNull byte[] hwAddr) {
return new PacketSocketAddress(ifIndex, hwAddr);
}
diff --git a/core/java/android/os/AsyncResult.java b/core/java/android/os/AsyncResult.java
index 5bad09d..58a2701 100644
--- a/core/java/android/os/AsyncResult.java
+++ b/core/java/android/os/AsyncResult.java
@@ -16,6 +16,7 @@
package android.os;
+import android.annotation.UnsupportedAppUsage;
import android.os.Message;
/** @hide */
@@ -25,13 +26,17 @@
/*************************** Instance Variables **************************/
// Expect either exception or result to be null
+ @UnsupportedAppUsage
public Object userObj;
+ @UnsupportedAppUsage
public Throwable exception;
+ @UnsupportedAppUsage
public Object result;
/***************************** Class Methods *****************************/
/** Saves and sets m.obj */
+ @UnsupportedAppUsage
public static AsyncResult
forMessage(Message m, Object r, Throwable ex)
{
@@ -45,6 +50,7 @@
}
/** Saves and sets m.obj */
+ @UnsupportedAppUsage
public static AsyncResult
forMessage(Message m)
{
@@ -58,6 +64,7 @@
}
/** please note, this sets m.obj to be this */
+ @UnsupportedAppUsage
public
AsyncResult (Object uo, Object r, Throwable ex)
{
diff --git a/core/java/android/os/AsyncTask.java b/core/java/android/os/AsyncTask.java
index a851e04..d259f38 100644
--- a/core/java/android/os/AsyncTask.java
+++ b/core/java/android/os/AsyncTask.java
@@ -18,6 +18,7 @@
import android.annotation.MainThread;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.annotation.WorkerThread;
import java.util.ArrayDeque;
@@ -259,15 +260,20 @@
private static final int MESSAGE_POST_RESULT = 0x1;
private static final int MESSAGE_POST_PROGRESS = 0x2;
+ @UnsupportedAppUsage
private static volatile Executor sDefaultExecutor = SERIAL_EXECUTOR;
private static InternalHandler sHandler;
+ @UnsupportedAppUsage
private final WorkerRunnable<Params, Result> mWorker;
+ @UnsupportedAppUsage
private final FutureTask<Result> mFuture;
+ @UnsupportedAppUsage
private volatile Status mStatus = Status.PENDING;
private final AtomicBoolean mCancelled = new AtomicBoolean();
+ @UnsupportedAppUsage
private final AtomicBoolean mTaskInvoked = new AtomicBoolean();
private final Handler mHandler;
@@ -331,6 +337,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public static void setDefaultExecutor(Executor exec) {
sDefaultExecutor = exec;
}
diff --git a/core/java/android/os/BaseBundle.java b/core/java/android/os/BaseBundle.java
index 0fef78d..117d11a 100644
--- a/core/java/android/os/BaseBundle.java
+++ b/core/java/android/os/BaseBundle.java
@@ -18,6 +18,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.util.ArrayMap;
import android.util.Log;
import android.util.MathUtils;
@@ -82,6 +83,7 @@
// Invariant - exactly one of mMap / mParcelledData will be null
// (except inside a call to unparcel)
+ @UnsupportedAppUsage
ArrayMap<String, Object> mMap = null;
/*
@@ -89,6 +91,7 @@
* data are stored as a Parcel containing a Bundle. When the data
* are unparcelled, mParcelledData willbe set to null.
*/
+ @UnsupportedAppUsage
Parcel mParcelledData = null;
/**
@@ -225,6 +228,7 @@
* If the underlying data are stored as a Parcel, unparcel them
* using the currently assigned class loader.
*/
+ @UnsupportedAppUsage
/* package */ void unparcel() {
synchronized (this) {
final Parcel source = mParcelledData;
@@ -311,6 +315,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public boolean isParcelled() {
return mParcelledData != null;
}
diff --git a/core/java/android/os/BatteryManager.java b/core/java/android/os/BatteryManager.java
index 954071a..1a6e012 100644
--- a/core/java/android/os/BatteryManager.java
+++ b/core/java/android/os/BatteryManager.java
@@ -18,6 +18,7 @@
import android.annotation.SystemApi;
import android.annotation.SystemService;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.Intent;
import android.hardware.health.V1_0.Constants;
@@ -109,6 +110,7 @@
* to the device.
* {@hide}
*/
+ @UnsupportedAppUsage
public static final String EXTRA_INVALID_CHARGER = "invalid_charger";
/**
@@ -116,6 +118,7 @@
* Int value set to the maximum charging current supported by the charger in micro amperes.
* {@hide}
*/
+ @UnsupportedAppUsage
public static final String EXTRA_MAX_CHARGING_CURRENT = "max_charging_current";
/**
@@ -123,6 +126,7 @@
* Int value set to the maximum charging voltage supported by the charger in micro volts.
* {@hide}
*/
+ @UnsupportedAppUsage
public static final String EXTRA_MAX_CHARGING_VOLTAGE = "max_charging_voltage";
/**
@@ -130,6 +134,7 @@
* integer containing the charge counter present in the battery.
* {@hide}
*/
+ @UnsupportedAppUsage
public static final String EXTRA_CHARGE_COUNTER = "charge_counter";
/**
diff --git a/core/java/android/os/BatteryStats.java b/core/java/android/os/BatteryStats.java
index 517eaf8..6beddfd 100644
--- a/core/java/android/os/BatteryStats.java
+++ b/core/java/android/os/BatteryStats.java
@@ -16,6 +16,7 @@
package android.os;
+import android.annotation.UnsupportedAppUsage;
import android.app.ActivityManager;
import android.app.job.JobParameters;
import android.content.Context;
@@ -71,6 +72,7 @@
/**
* A constant indicating a partial wake lock timer.
*/
+ @UnsupportedAppUsage
public static final int WAKE_TYPE_PARTIAL = 0;
/**
@@ -196,6 +198,7 @@
/**
* Include only the current run in the stats.
*/
+ @UnsupportedAppUsage
public static final int STATS_CURRENT = 1;
/**
@@ -390,6 +393,7 @@
*
* @param which one of STATS_SINCE_CHARGED, STATS_SINCE_UNPLUGGED, or STATS_CURRENT
*/
+ @UnsupportedAppUsage
public abstract int getCountLocked(int which);
/**
@@ -491,6 +495,7 @@
*
* @param which one of STATS_SINCE_CHARGED, STATS_SINCE_UNPLUGGED, or STATS_CURRENT
*/
+ @UnsupportedAppUsage
public abstract int getCountLocked(int which);
/**
@@ -501,6 +506,7 @@
* @param which one of STATS_SINCE_CHARGED, STATS_SINCE_UNPLUGGED, or STATS_CURRENT
* @return a time in microseconds
*/
+ @UnsupportedAppUsage
public abstract long getTotalTimeLocked(long elapsedRealtimeUs, int which);
/**
@@ -603,6 +609,7 @@
*
* @return a Map from Strings to Uid.Wakelock objects.
*/
+ @UnsupportedAppUsage
public abstract ArrayMap<String, ? extends Wakelock> getWakelockStats();
/**
@@ -637,6 +644,7 @@
* The statistics associated with a particular wake lock.
*/
public static abstract class Wakelock {
+ @UnsupportedAppUsage
public abstract Timer getWakeTime(int type);
}
@@ -652,6 +660,7 @@
*
* @return a Map from Integer sensor ids to Uid.Sensor objects.
*/
+ @UnsupportedAppUsage
public abstract SparseArray<? extends Sensor> getSensorStats();
/**
@@ -664,6 +673,7 @@
*
* @return a Map from Strings to Uid.Proc objects.
*/
+ @UnsupportedAppUsage
public abstract ArrayMap<String, ? extends Proc> getProcessStats();
/**
@@ -671,6 +681,7 @@
*
* @return a Map from Strings to Uid.Pkg objects.
*/
+ @UnsupportedAppUsage
public abstract ArrayMap<String, ? extends Pkg> getPackageStats();
public abstract ControllerActivityCounter getWifiControllerActivity();
@@ -680,6 +691,7 @@
/**
* {@hide}
*/
+ @UnsupportedAppUsage
public abstract int getUid();
public abstract void noteWifiRunningLocked(long elapsedRealtime);
@@ -694,8 +706,11 @@
public abstract void noteWifiMulticastDisabledLocked(long elapsedRealtime);
public abstract void noteActivityResumedLocked(long elapsedRealtime);
public abstract void noteActivityPausedLocked(long elapsedRealtime);
+ @UnsupportedAppUsage
public abstract long getWifiRunningTime(long elapsedRealtimeUs, int which);
+ @UnsupportedAppUsage
public abstract long getFullWifiLockTime(long elapsedRealtimeUs, int which);
+ @UnsupportedAppUsage
public abstract long getWifiScanTime(long elapsedRealtimeUs, int which);
public abstract int getWifiScanCount(int which);
/**
@@ -709,10 +724,14 @@
* Returns the timer keeping track of background wifi scans.
*/
public abstract Timer getWifiScanBackgroundTimer();
+ @UnsupportedAppUsage
public abstract long getWifiBatchedScanTime(int csphBin, long elapsedRealtimeUs, int which);
public abstract int getWifiBatchedScanCount(int csphBin, int which);
+ @UnsupportedAppUsage
public abstract long getWifiMulticastTime(long elapsedRealtimeUs, int which);
+ @UnsupportedAppUsage
public abstract Timer getAudioTurnedOnTimer();
+ @UnsupportedAppUsage
public abstract Timer getVideoTurnedOnTimer();
public abstract Timer getFlashlightTurnedOnTimer();
public abstract Timer getCameraTurnedOnTimer();
@@ -842,8 +861,10 @@
public abstract int getUserActivityCount(int type, int which);
public abstract boolean hasNetworkActivity();
+ @UnsupportedAppUsage
public abstract long getNetworkActivityBytes(int type, int which);
public abstract long getNetworkActivityPackets(int type, int which);
+ @UnsupportedAppUsage
public abstract long getMobileRadioActiveTime(int which);
public abstract int getMobileRadioActiveCount(int which);
@@ -903,10 +924,13 @@
* the sensor HAL, and therefore out of our control
*/
// Magic sensor number for the GPS.
+ @UnsupportedAppUsage
public static final int GPS = -10000;
+ @UnsupportedAppUsage
public abstract int getHandle();
+ @UnsupportedAppUsage
public abstract Timer getSensorTime();
/** Returns a Timer for sensor usage when app is in the background. */
@@ -928,8 +952,11 @@
public static final int TYPE_WAKE = 1;
public static final int TYPE_CPU = 2;
+ @UnsupportedAppUsage
public int type;
+ @UnsupportedAppUsage
public long overTime;
+ @UnsupportedAppUsage
public long usedTime;
}
@@ -943,6 +970,7 @@
*
* @param which one of STATS_SINCE_CHARGED, STATS_SINCE_UNPLUGGED, or STATS_CURRENT.
*/
+ @UnsupportedAppUsage
public abstract long getUserTime(int which);
/**
@@ -950,6 +978,7 @@
*
* @param which one of STATS_SINCE_CHARGED, STATS_SINCE_UNPLUGGED, or STATS_CURRENT.
*/
+ @UnsupportedAppUsage
public abstract long getSystemTime(int which);
/**
@@ -957,6 +986,7 @@
*
* @param which one of STATS_SINCE_CHARGED, STATS_SINCE_UNPLUGGED, or STATS_CURRENT.
*/
+ @UnsupportedAppUsage
public abstract int getStarts(int which);
/**
@@ -978,10 +1008,13 @@
* @param which one of STATS_SINCE_CHARGED, STATS_SINCE_UNPLUGGED, or STATS_CURRENT.
* @return foreground cpu time in microseconds
*/
+ @UnsupportedAppUsage
public abstract long getForegroundTime(int which);
+ @UnsupportedAppUsage
public abstract int countExcessivePowers();
+ @UnsupportedAppUsage
public abstract ExcessivePower getExcessivePower(int i);
}
@@ -995,11 +1028,13 @@
* package. The mapping keys are tag names for the alarms, the counter contains
* the number of times the alarm was triggered while on battery.
*/
+ @UnsupportedAppUsage
public abstract ArrayMap<String, ? extends Counter> getWakeupAlarmStats();
/**
* Returns a mapping containing service statistics.
*/
+ @UnsupportedAppUsage
public abstract ArrayMap<String, ? extends Serv> getServiceStats();
/**
@@ -1014,6 +1049,7 @@
* @param which one of STATS_SINCE_CHARGED, STATS_SINCE_UNPLUGGED, or STATS_CURRENT.
* @return
*/
+ @UnsupportedAppUsage
public abstract long getStartTime(long batteryUptime, int which);
/**
@@ -1021,6 +1057,7 @@
*
* @param which one of STATS_SINCE_CHARGED, STATS_SINCE_UNPLUGGED, or STATS_CURRENT.
*/
+ @UnsupportedAppUsage
public abstract int getStarts(int which);
/**
@@ -1028,6 +1065,7 @@
*
* @param which one of STATS_SINCE_CHARGED, STATS_SINCE_UNPLUGGED, or STATS_CURRENT.
*/
+ @UnsupportedAppUsage
public abstract int getLaunches(int which);
}
}
@@ -1490,8 +1528,10 @@
public HistoryItem next;
// The time of this event in milliseconds, as per SystemClock.elapsedRealtime().
+ @UnsupportedAppUsage
public long time;
+ @UnsupportedAppUsage
public static final byte CMD_UPDATE = 0; // These can be written as deltas
public static final byte CMD_NULL = -1;
public static final byte CMD_START = 4;
@@ -1500,6 +1540,7 @@
public static final byte CMD_RESET = 7;
public static final byte CMD_SHUTDOWN = 8;
+ @UnsupportedAppUsage
public byte cmd = CMD_NULL;
/**
@@ -1509,12 +1550,17 @@
return cmd == CMD_UPDATE;
}
+ @UnsupportedAppUsage
public byte batteryLevel;
+ @UnsupportedAppUsage
public byte batteryStatus;
+ @UnsupportedAppUsage
public byte batteryHealth;
+ @UnsupportedAppUsage
public byte batteryPlugType;
public short batteryTemperature;
+ @UnsupportedAppUsage
public char batteryVoltage;
// The charge of the battery in micro-Ampere-hours.
@@ -1561,6 +1607,7 @@
public static final int SETTLE_TO_ZERO_STATES = 0xffff0000 & ~MOST_INTERESTING_STATES;
+ @UnsupportedAppUsage
public int states;
// Constants from WIFI_SUPPL_STATE_*
@@ -1596,6 +1643,7 @@
public static final int SETTLE_TO_ZERO_STATES2 = 0xffff0000 & ~MOST_INTERESTING_STATES2;
+ @UnsupportedAppUsage
public int states2;
// The wake lock that was acquired at this point.
@@ -1704,6 +1752,7 @@
public final HistoryTag localWakeReasonTag = new HistoryTag();
public final HistoryTag localEventTag = new HistoryTag();
+ @UnsupportedAppUsage
public HistoryItem() {
}
@@ -1995,6 +2044,7 @@
public abstract int getHistoryUsedSize();
+ @UnsupportedAppUsage
public abstract boolean startIteratingHistoryLocked();
public abstract int getHistoryStringPoolSize();
@@ -2005,6 +2055,7 @@
public abstract int getHistoryTagPoolUid(int index);
+ @UnsupportedAppUsage
public abstract boolean getNextHistoryLocked(HistoryItem out);
public abstract void finishIteratingHistoryLocked();
@@ -2031,6 +2082,7 @@
*
* {@hide}
*/
+ @UnsupportedAppUsage
public abstract long getScreenOnTime(long elapsedRealtimeUs, int which);
/**
@@ -2071,6 +2123,7 @@
"0", "1", "2", "3", "4"
};
+ @UnsupportedAppUsage
public static final int NUM_SCREEN_BRIGHTNESS_BINS = 5;
/**
@@ -2079,6 +2132,7 @@
*
* {@hide}
*/
+ @UnsupportedAppUsage
public abstract long getScreenBrightnessTime(int brightnessBin,
long elapsedRealtimeUs, int which);
@@ -2187,6 +2241,7 @@
*
* {@hide}
*/
+ @UnsupportedAppUsage
public abstract long getPhoneOnTime(long elapsedRealtimeUs, int which);
/**
@@ -2202,6 +2257,7 @@
*
* {@hide}
*/
+ @UnsupportedAppUsage
public abstract long getPhoneSignalStrengthTime(int strengthBin,
long elapsedRealtimeUs, int which);
@@ -2284,6 +2340,7 @@
"ehrpd", "hspap", "gsm", "td_scdma", "iwlan", "lte_ca", "other"
};
+ @UnsupportedAppUsage
public static final int NUM_DATA_CONNECTION_TYPES = DATA_CONNECTION_OTHER+1;
/**
@@ -2446,6 +2503,7 @@
*
* {@hide}
*/
+ @UnsupportedAppUsage
public abstract long getWifiOnTime(long elapsedRealtimeUs, int which);
/**
@@ -2462,6 +2520,7 @@
*
* {@hide}
*/
+ @UnsupportedAppUsage
public abstract long getGlobalWifiRunningTime(long elapsedRealtimeUs, int which);
public static final int WIFI_STATE_OFF = 0;
@@ -2667,6 +2726,7 @@
/**
* Returns a SparseArray containing the statistics for each uid.
*/
+ @UnsupportedAppUsage
public abstract SparseArray<? extends Uid> getUidStats();
/**
@@ -2674,6 +2734,7 @@
*
* @param curTime the amount of elapsed realtime in microseconds.
*/
+ @UnsupportedAppUsage
public abstract long getBatteryUptime(long curTime);
/**
@@ -2754,6 +2815,7 @@
* @param curTime the elapsed realtime in microseconds.
* @param which one of STATS_SINCE_CHARGED, STATS_SINCE_UNPLUGGED, or STATS_CURRENT.
*/
+ @UnsupportedAppUsage
public abstract long computeBatteryUptime(long curTime, int which);
/**
@@ -2762,6 +2824,7 @@
* @param curTime the current elapsed realtime in microseconds.
* @param which one of STATS_SINCE_CHARGED, STATS_SINCE_UNPLUGGED, or STATS_CURRENT.
*/
+ @UnsupportedAppUsage
public abstract long computeBatteryRealtime(long curTime, int which);
/**
@@ -2804,6 +2867,7 @@
*
* @param curTime The current elepsed realtime in microseconds.
*/
+ @UnsupportedAppUsage
public abstract long computeBatteryTimeRemaining(long curTime);
// The part of a step duration that is the actual time.
@@ -2938,6 +3002,7 @@
*
* @param curTime The current elepsed realtime in microseconds.
*/
+ @UnsupportedAppUsage
public abstract long computeChargeTimeRemaining(long curTime);
/**
@@ -3222,6 +3287,7 @@
* @param type type of data (e.g. "wakelock", "sensor", "process", "apk" , "process", "network")
* @param args type-dependent data arguments
*/
+ @UnsupportedAppUsage
private static final void dumpLine(PrintWriter pw, int uid, String category, String type,
Object... args ) {
dumpLineHeader(pw, uid, category, type);
diff --git a/core/java/android/os/Binder.java b/core/java/android/os/Binder.java
index 3bc1e93..3de1183 100644
--- a/core/java/android/os/Binder.java
+++ b/core/java/android/os/Binder.java
@@ -18,6 +18,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.util.ExceptionUtils;
import android.util.Log;
import android.util.Slog;
@@ -221,6 +222,7 @@
/**
* Raw native pointer to JavaBBinderHolder object. Owned by this Java object. Not null.
*/
+ @UnsupportedAppUsage
private final long mObject;
private IInterface mOwner;
@@ -720,6 +722,7 @@
private static native long getFinalizer();
// Entry point from android_util_Binder.cpp's onTransact
+ @UnsupportedAppUsage
private boolean execTransact(int code, long dataObj, long replyObj,
int flags) {
BinderCallsStats binderCallsStats = BinderCallsStats.getInstance();
diff --git a/core/java/android/os/Broadcaster.java b/core/java/android/os/Broadcaster.java
index 70dcdd8..6ac7f1a 100644
--- a/core/java/android/os/Broadcaster.java
+++ b/core/java/android/os/Broadcaster.java
@@ -16,9 +16,12 @@
package android.os;
+import android.annotation.UnsupportedAppUsage;
+
/** @hide */
public class Broadcaster
{
+ @UnsupportedAppUsage
public Broadcaster()
{
}
@@ -29,6 +32,7 @@
* When this broadcaster pushes a message with senderWhat in the what field,
* target will be sent a copy of that message with targetWhat in the what field.
*/
+ @UnsupportedAppUsage
public void request(int senderWhat, Handler target, int targetWhat)
{
synchronized (this) {
@@ -96,6 +100,7 @@
/**
* Unregister for notifications for this senderWhat/target/targetWhat tuple.
*/
+ @UnsupportedAppUsage
public void cancelRequest(int senderWhat, Handler target, int targetWhat)
{
synchronized (this) {
@@ -168,6 +173,7 @@
* Send out msg. Anyone who has registered via the request() method will be
* sent the message.
*/
+ @UnsupportedAppUsage
public void broadcast(Message msg)
{
synchronized (this) {
diff --git a/core/java/android/os/Build.java b/core/java/android/os/Build.java
index 6de5759..1c319fb 100755
--- a/core/java/android/os/Build.java
+++ b/core/java/android/os/Build.java
@@ -20,6 +20,7 @@
import android.annotation.RequiresPermission;
import android.annotation.SystemApi;
import android.annotation.TestApi;
+import android.annotation.UnsupportedAppUsage;
import android.app.Application;
import android.content.Context;
import android.text.TextUtils;
@@ -102,6 +103,7 @@
* Whether this build was for an emulator device.
* @hide
*/
+ @UnsupportedAppUsage
public static final boolean IS_EMULATOR = getString("ro.kernel.qemu").equals("1");
/**
@@ -285,6 +287,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public static final String[] ACTIVE_CODENAMES = "REL".equals(ALL_CODENAMES[0])
? new String[0] : ALL_CODENAMES;
@@ -1083,6 +1086,7 @@
* Returns true if we are running a debug build such as "user-debug" or "eng".
* @hide
*/
+ @UnsupportedAppUsage
public static final boolean IS_DEBUGGABLE =
SystemProperties.getInt("ro.debuggable", 0) == 1;
@@ -1131,6 +1135,7 @@
return TextUtils.isEmpty(propVal) ? null : propVal;
}
+ @UnsupportedAppUsage
private static String getString(String property) {
return SystemProperties.get(property, UNKNOWN);
}
@@ -1144,6 +1149,7 @@
}
}
+ @UnsupportedAppUsage
private static long getLong(String property) {
try {
return Long.parseLong(SystemProperties.get(property));
diff --git a/core/java/android/os/Bundle.java b/core/java/android/os/Bundle.java
index 7ae5a67..6b5eff7 100644
--- a/core/java/android/os/Bundle.java
+++ b/core/java/android/os/Bundle.java
@@ -17,6 +17,7 @@
package android.os;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.util.ArrayMap;
import android.util.Size;
import android.util.SizeF;
@@ -173,6 +174,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static Bundle forPair(String key, String value) {
Bundle b = new Bundle(1);
b.putString(key, value);
@@ -229,6 +231,7 @@
}
/** {@hide} */
+ @UnsupportedAppUsage
public static Bundle setDefusable(Bundle bundle, boolean defusable) {
if (bundle != null) {
bundle.setDefusable(defusable);
@@ -303,6 +306,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public int getSize() {
if (mParcelledData != null) {
return mParcelledData.dataSize();
@@ -385,6 +389,7 @@
* Filter values in Bundle to only basic types.
* @hide
*/
+ @UnsupportedAppUsage
public Bundle filterValues() {
unparcel();
Bundle bundle = this;
@@ -557,6 +562,7 @@
}
/** {@hide} */
+ @UnsupportedAppUsage
public void putParcelableList(String key, List<? extends Parcelable> value) {
unparcel();
mMap.put(key, value);
@@ -728,6 +734,7 @@
* @deprecated
* @hide This is the old name of the function.
*/
+ @UnsupportedAppUsage
@Deprecated
public void putIBinder(@Nullable String key, @Nullable IBinder value) {
unparcel();
@@ -1180,6 +1187,7 @@
* @deprecated
* @hide This is the old name of the function.
*/
+ @UnsupportedAppUsage
@Deprecated
@Nullable
public IBinder getIBinder(@Nullable String key) {
diff --git a/core/java/android/os/Debug.java b/core/java/android/os/Debug.java
index e606964..eab451c 100644
--- a/core/java/android/os/Debug.java
+++ b/core/java/android/os/Debug.java
@@ -18,6 +18,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.app.AppGlobals;
import android.content.Context;
import android.util.Log;
@@ -87,6 +88,7 @@
// set/cleared by waitForDebugger()
private static volatile boolean mWaiting = false;
+ @UnsupportedAppUsage
private Debug() {}
/*
@@ -115,8 +117,10 @@
public int dalvikPss;
/** The proportional set size that is swappable for dalvik heap. */
/** @hide We may want to expose this, eventually. */
+ @UnsupportedAppUsage
public int dalvikSwappablePss;
/** @hide The resident set size for dalvik heap. (Without other Dalvik overhead.) */
+ @UnsupportedAppUsage
public int dalvikRss;
/** The private dirty pages used by dalvik heap. */
public int dalvikPrivateDirty;
@@ -124,23 +128,29 @@
public int dalvikSharedDirty;
/** The private clean pages used by dalvik heap. */
/** @hide We may want to expose this, eventually. */
+ @UnsupportedAppUsage
public int dalvikPrivateClean;
/** The shared clean pages used by dalvik heap. */
/** @hide We may want to expose this, eventually. */
+ @UnsupportedAppUsage
public int dalvikSharedClean;
/** The dirty dalvik pages that have been swapped out. */
/** @hide We may want to expose this, eventually. */
+ @UnsupportedAppUsage
public int dalvikSwappedOut;
/** The dirty dalvik pages that have been swapped out, proportional. */
/** @hide We may want to expose this, eventually. */
+ @UnsupportedAppUsage
public int dalvikSwappedOutPss;
/** The proportional set size for the native heap. */
public int nativePss;
/** The proportional set size that is swappable for the native heap. */
/** @hide We may want to expose this, eventually. */
+ @UnsupportedAppUsage
public int nativeSwappablePss;
/** @hide The resident set size for the native heap. */
+ @UnsupportedAppUsage
public int nativeRss;
/** The private dirty pages used by the native heap. */
public int nativePrivateDirty;
@@ -148,23 +158,29 @@
public int nativeSharedDirty;
/** The private clean pages used by the native heap. */
/** @hide We may want to expose this, eventually. */
+ @UnsupportedAppUsage
public int nativePrivateClean;
/** The shared clean pages used by the native heap. */
/** @hide We may want to expose this, eventually. */
+ @UnsupportedAppUsage
public int nativeSharedClean;
/** The dirty native pages that have been swapped out. */
/** @hide We may want to expose this, eventually. */
+ @UnsupportedAppUsage
public int nativeSwappedOut;
/** The dirty native pages that have been swapped out, proportional. */
/** @hide We may want to expose this, eventually. */
+ @UnsupportedAppUsage
public int nativeSwappedOutPss;
/** The proportional set size for everything else. */
public int otherPss;
/** The proportional set size that is swappable for everything else. */
/** @hide We may want to expose this, eventually. */
+ @UnsupportedAppUsage
public int otherSwappablePss;
/** @hide The resident set size for everything else. */
+ @UnsupportedAppUsage
public int otherRss;
/** The private dirty pages used by everything else. */
public int otherPrivateDirty;
@@ -172,19 +188,24 @@
public int otherSharedDirty;
/** The private clean pages used by everything else. */
/** @hide We may want to expose this, eventually. */
+ @UnsupportedAppUsage
public int otherPrivateClean;
/** The shared clean pages used by everything else. */
/** @hide We may want to expose this, eventually. */
+ @UnsupportedAppUsage
public int otherSharedClean;
/** The dirty pages used by anyting else that have been swapped out. */
/** @hide We may want to expose this, eventually. */
+ @UnsupportedAppUsage
public int otherSwappedOut;
/** The dirty pages used by anyting else that have been swapped out, proportional. */
/** @hide We may want to expose this, eventually. */
+ @UnsupportedAppUsage
public int otherSwappedOutPss;
/** Whether the kernel reports proportional swap usage */
/** @hide */
+ @UnsupportedAppUsage
public boolean hasSwappedOutPss;
/** @hide */
@@ -231,6 +252,7 @@
// Needs to be declared here for the DVK_STAT ranges below.
/** @hide */
+ @UnsupportedAppUsage
public static final int NUM_OTHER_STATS = 17;
// Dalvik subsections.
@@ -291,6 +313,7 @@
public static final int OTHER_DVK_STAT_ART_END = OTHER_ART_BOOT - NUM_OTHER_STATS;
/** @hide */
+ @UnsupportedAppUsage
public static final int NUM_DVK_STATS = 14;
/** @hide */
@@ -315,6 +338,7 @@
/** @hide */
public static final int OFFSET_SWAPPED_OUT_PSS = 8;
+ @UnsupportedAppUsage
private int[] otherStats = new int[(NUM_OTHER_STATS+NUM_DVK_STATS)*NUM_CATEGORIES];
public MemoryInfo() {
@@ -330,6 +354,7 @@
/**
* @hide Return total PSS memory usage in kB.
*/
+ @UnsupportedAppUsage
public int getTotalUss() {
return dalvikPrivateClean + dalvikPrivateDirty
+ nativePrivateClean + nativePrivateDirty
@@ -396,6 +421,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public int getOtherPss(int which) {
return otherStats[which * NUM_CATEGORIES + OFFSET_PSS];
}
@@ -411,11 +437,13 @@
}
/** @hide */
+ @UnsupportedAppUsage
public int getOtherPrivateDirty(int which) {
return otherStats[which * NUM_CATEGORIES + OFFSET_PRIVATE_DIRTY];
}
/** @hide */
+ @UnsupportedAppUsage
public int getOtherSharedDirty(int which) {
return otherStats[which * NUM_CATEGORIES + OFFSET_SHARED_DIRTY];
}
@@ -426,6 +454,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public int getOtherPrivate(int which) {
return getOtherPrivateClean(which) + getOtherPrivateDirty(which);
}
@@ -446,6 +475,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public static String getOtherLabel(int which) {
switch (which) {
case OTHER_DALVIK_OTHER: return "Dalvik Other";
@@ -623,6 +653,7 @@
* such thing as private clean for the Java Heap.
* @hide
*/
+ @UnsupportedAppUsage
public int getSummaryJavaHeap() {
return dalvikPrivateDirty + getOtherPrivate(OTHER_ART);
}
@@ -635,6 +666,7 @@
* such thing as private clean for the Native Heap.
* @hide
*/
+ @UnsupportedAppUsage
public int getSummaryNativeHeap() {
return nativePrivateDirty;
}
@@ -644,6 +676,7 @@
* the application.
* @hide
*/
+ @UnsupportedAppUsage
public int getSummaryCode() {
return getOtherPrivate(OTHER_SO)
+ getOtherPrivate(OTHER_JAR)
@@ -662,6 +695,7 @@
* such thing as private clean for the stack.
* @hide
*/
+ @UnsupportedAppUsage
public int getSummaryStack() {
return getOtherPrivateDirty(OTHER_STACK);
}
@@ -677,6 +711,7 @@
* memory into the System category.
* @hide
*/
+ @UnsupportedAppUsage
public int getSummaryGraphics() {
return getOtherPrivate(OTHER_GL_DEV)
+ getOtherPrivate(OTHER_GRAPHICS)
@@ -688,6 +723,7 @@
* accounted for.
* @hide
*/
+ @UnsupportedAppUsage
public int getSummaryPrivateOther() {
return getTotalPrivateClean()
+ getTotalPrivateDirty()
@@ -704,6 +740,7 @@
* * Includes all shared memory.
* @hide
*/
+ @UnsupportedAppUsage
public int getSummarySystem() {
return getTotalPss()
- getTotalPrivateClean()
@@ -1743,6 +1780,7 @@
* as the caller.
* @hide
*/
+ @UnsupportedAppUsage
public static native void getMemoryInfo(int pid, MemoryInfo memoryInfo);
/**
@@ -1798,6 +1836,7 @@
* as defined by MEMINFO_* offsets.
* @hide
*/
+ @UnsupportedAppUsage
public static native void getMemInfo(long[] outSizes);
/**
@@ -1886,6 +1925,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static native void dumpNativeHeap(FileDescriptor fd);
/**
@@ -1900,6 +1940,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static long countInstancesOfClass(Class cls) {
return VMDebug.countInstancesOfClass(cls, true);
}
@@ -1959,6 +2000,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static final void dumpReferenceTables() {
VMDebug.dumpReferenceTables();
}
@@ -2325,6 +2367,7 @@
* @return a string describing the call stack.
* {@hide}
*/
+ @UnsupportedAppUsage
public static String getCallers(final int depth) {
final StackTraceElement[] callStack = Thread.currentThread().getStackTrace();
StringBuffer sb = new StringBuffer();
@@ -2371,6 +2414,7 @@
* @return a String describing the immediate caller of the calling method.
* {@hide}
*/
+ @UnsupportedAppUsage
public static String getCaller() {
return getCaller(Thread.currentThread().getStackTrace(), 0);
}
diff --git a/core/java/android/os/DropBoxManager.java b/core/java/android/os/DropBoxManager.java
index 97f0e0c..89fef68 100644
--- a/core/java/android/os/DropBoxManager.java
+++ b/core/java/android/os/DropBoxManager.java
@@ -19,6 +19,7 @@
import android.annotation.SdkConstant;
import android.annotation.SystemService;
import android.annotation.SdkConstant.SdkConstantType;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.util.Log;
@@ -45,6 +46,7 @@
private static final String TAG = "DropBoxManager";
private final Context mContext;
+ @UnsupportedAppUsage
private final IDropBoxManagerService mService;
/** Flag value: Entry's content was deleted to save space. */
diff --git a/core/java/android/os/Environment.java b/core/java/android/os/Environment.java
index 213260f..207eb36 100644
--- a/core/java/android/os/Environment.java
+++ b/core/java/android/os/Environment.java
@@ -17,6 +17,7 @@
package android.os;
import android.annotation.TestApi;
+import android.annotation.UnsupportedAppUsage;
import android.app.admin.DevicePolicyManager;
import android.content.Context;
import android.os.storage.StorageManager;
@@ -66,6 +67,7 @@
private static final File DIR_VENDOR_ROOT = getDirectory(ENV_VENDOR_ROOT, "/vendor");
private static final File DIR_PRODUCT_ROOT = getDirectory(ENV_PRODUCT_ROOT, "/product");
+ @UnsupportedAppUsage
private static UserEnvironment sCurrentUser;
private static boolean sUserRequired;
@@ -74,6 +76,7 @@
}
/** {@hide} */
+ @UnsupportedAppUsage
public static void initForCurrentUser() {
final int userId = UserHandle.myUserId();
sCurrentUser = new UserEnvironment(userId);
@@ -83,10 +86,12 @@
public static class UserEnvironment {
private final int mUserId;
+ @UnsupportedAppUsage
public UserEnvironment(int userId) {
mUserId = userId;
}
+ @UnsupportedAppUsage
public File[] getExternalDirs() {
final StorageVolume[] volumes = StorageManager.getVolumeList(mUserId,
StorageManager.FLAG_FOR_WRITE);
@@ -97,11 +102,13 @@
return files;
}
+ @UnsupportedAppUsage
@Deprecated
public File getExternalStorageDirectory() {
return getExternalDirs()[0];
}
+ @UnsupportedAppUsage
@Deprecated
public File getExternalStoragePublicDirectory(String type) {
return buildExternalStoragePublicDirs(type)[0];
@@ -149,6 +156,7 @@
}
/** {@hide} */
+ @UnsupportedAppUsage
public static File getStorageDirectory() {
return DIR_ANDROID_STORAGE;
}
@@ -159,6 +167,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static File getOemDirectory() {
return DIR_OEM_ROOT;
}
@@ -178,6 +187,7 @@
* software that should persist across simple reflashing of the "system" partition.
* @hide
*/
+ @UnsupportedAppUsage
public static File getVendorDirectory() {
return DIR_VENDOR_ROOT;
}
@@ -250,6 +260,7 @@
}
/** {@hide} */
+ @UnsupportedAppUsage
public static File getDataSystemDirectory() {
return new File(getDataDirectory(), "system");
}
@@ -482,11 +493,13 @@
}
/** {@hide} */
+ @UnsupportedAppUsage
public static File getLegacyExternalStorageDirectory() {
return new File(System.getenv(ENV_EXTERNAL_STORAGE));
}
/** {@hide} */
+ @UnsupportedAppUsage
public static File getLegacyExternalStorageObbDirectory() {
return buildPath(getLegacyExternalStorageDirectory(), DIR_ANDROID, DIR_OBB);
}
@@ -742,6 +755,7 @@
* Returns the path for android-specific data on the SD card.
* @hide
*/
+ @UnsupportedAppUsage
public static File[] buildExternalStorageAndroidDataDirs() {
throwIfUserRequired();
return sCurrentUser.buildExternalStorageAndroidDataDirs();
@@ -751,6 +765,7 @@
* Generates the raw path to an application's data
* @hide
*/
+ @UnsupportedAppUsage
public static File[] buildExternalStorageAppDataDirs(String packageName) {
throwIfUserRequired();
return sCurrentUser.buildExternalStorageAppDataDirs(packageName);
@@ -760,6 +775,7 @@
* Generates the raw path to an application's media
* @hide
*/
+ @UnsupportedAppUsage
public static File[] buildExternalStorageAppMediaDirs(String packageName) {
throwIfUserRequired();
return sCurrentUser.buildExternalStorageAppMediaDirs(packageName);
@@ -769,6 +785,7 @@
* Generates the raw path to an application's OBB files
* @hide
*/
+ @UnsupportedAppUsage
public static File[] buildExternalStorageAppObbDirs(String packageName) {
throwIfUserRequired();
return sCurrentUser.buildExternalStorageAppObbDirs(packageName);
@@ -778,6 +795,7 @@
* Generates the path to an application's files.
* @hide
*/
+ @UnsupportedAppUsage
public static File[] buildExternalStorageAppFilesDirs(String packageName) {
throwIfUserRequired();
return sCurrentUser.buildExternalStorageAppFilesDirs(packageName);
@@ -787,6 +805,7 @@
* Generates the path to an application's cache.
* @hide
*/
+ @UnsupportedAppUsage
public static File[] buildExternalStorageAppCacheDirs(String packageName) {
throwIfUserRequired();
return sCurrentUser.buildExternalStorageAppCacheDirs(packageName);
@@ -1021,6 +1040,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static File[] buildPaths(File[] base, String... segments) {
File[] result = new File[base.length];
for (int i = 0; i < base.length; i++) {
@@ -1060,6 +1080,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static File maybeTranslateEmulatedPathToInternal(File path) {
return StorageManager.maybeTranslateEmulatedPathToInternal(path);
}
diff --git a/core/java/android/os/FileObserver.java b/core/java/android/os/FileObserver.java
index dd85e15..2a88e32 100644
--- a/core/java/android/os/FileObserver.java
+++ b/core/java/android/os/FileObserver.java
@@ -17,6 +17,7 @@
package android.os;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.util.Log;
import java.lang.ref.WeakReference;
@@ -103,6 +104,7 @@
stopWatching(m_fd, descriptor);
}
+ @UnsupportedAppUsage
public void onEvent(int wfd, int mask, String path) {
// look up our observer, fixing up the map if necessary...
FileObserver observer = null;
@@ -133,6 +135,7 @@
private native void stopWatching(int fd, int wfd);
}
+ @UnsupportedAppUsage
private static ObserverThread s_observerThread;
static {
diff --git a/core/java/android/os/FileUtils.java b/core/java/android/os/FileUtils.java
index ddeb838..d3b791c 100644
--- a/core/java/android/os/FileUtils.java
+++ b/core/java/android/os/FileUtils.java
@@ -35,6 +35,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.provider.DocumentsContract.Document;
import android.system.ErrnoException;
import android.system.Os;
@@ -118,6 +119,7 @@
* @param gid to apply through {@code chown}, or -1 to leave unchanged
* @return 0 on success, otherwise errno.
*/
+ @UnsupportedAppUsage
public static int setPermissions(File path, int mode, int uid, int gid) {
return setPermissions(path.getAbsolutePath(), mode, uid, gid);
}
@@ -130,6 +132,7 @@
* @param gid to apply through {@code chown}, or -1 to leave unchanged
* @return 0 on success, otherwise errno.
*/
+ @UnsupportedAppUsage
public static int setPermissions(String path, int mode, int uid, int gid) {
try {
Os.chmod(path, mode);
@@ -158,6 +161,7 @@
* @param gid to apply through {@code chown}, or -1 to leave unchanged
* @return 0 on success, otherwise errno.
*/
+ @UnsupportedAppUsage
public static int setPermissions(FileDescriptor fd, int mode, int uid, int gid) {
try {
Os.fchmod(fd, mode);
@@ -203,6 +207,7 @@
* Perform an fsync on the given FileOutputStream. The stream at this
* point must be flushed but not yet closed.
*/
+ @UnsupportedAppUsage
public static boolean sync(FileOutputStream stream) {
try {
if (stream != null) {
@@ -217,6 +222,7 @@
/**
* @deprecated use {@link #copy(File, File)} instead.
*/
+ @UnsupportedAppUsage
@Deprecated
public static boolean copyFile(File srcFile, File destFile) {
try {
@@ -240,6 +246,7 @@
/**
* @deprecated use {@link #copy(InputStream, OutputStream)} instead.
*/
+ @UnsupportedAppUsage
@Deprecated
public static boolean copyToFile(InputStream inputStream, File destFile) {
try {
@@ -507,6 +514,7 @@
* Check if a filename is "safe" (no metacharacters or spaces).
* @param file The file to check
*/
+ @UnsupportedAppUsage
public static boolean isFilenameSafe(File file) {
// Note, we check whether it matches what's known to be safe,
// rather than what's known to be unsafe. Non-ASCII, control
@@ -522,6 +530,7 @@
* @return the contents of the file, possibly truncated
* @throws IOException if something goes wrong reading the file
*/
+ @UnsupportedAppUsage
public static String readTextFile(File file, int max, String ellipsis) throws IOException {
InputStream input = new FileInputStream(file);
// wrapping a BufferedInputStream around it because when reading /proc with unbuffered
@@ -575,6 +584,7 @@
}
}
+ @UnsupportedAppUsage
public static void stringToFile(File file, String string) throws IOException {
stringToFile(file.getAbsolutePath(), string);
}
@@ -605,6 +615,7 @@
* @param string
* @throws IOException
*/
+ @UnsupportedAppUsage
public static void stringToFile(String filename, String string) throws IOException {
bytesToFile(filename, string.getBytes(StandardCharsets.UTF_8));
}
@@ -616,6 +627,7 @@
* @param file the file to checksum, must not be null
* @return the checksum value or an exception is thrown.
*/
+ @UnsupportedAppUsage
public static long checksumCrc32(File file) throws FileNotFoundException, IOException {
CRC32 checkSummer = new CRC32();
CheckedInputStream cis = null;
@@ -645,6 +657,7 @@
* @param minAgeMs Always keep files younger than this age, in milliseconds.
* @return if any files were deleted.
*/
+ @UnsupportedAppUsage
public static boolean deleteOlderFiles(File dir, int minCount, long minAgeMs) {
if (minCount < 0 || minAgeMs < 0) {
throw new IllegalArgumentException("Constraints must be positive or 0");
@@ -726,6 +739,7 @@
}
}
+ @UnsupportedAppUsage
public static boolean deleteContents(File dir) {
File[] files = dir.listFiles();
boolean success = true;
diff --git a/core/java/android/os/Handler.java b/core/java/android/os/Handler.java
index 2b5f3da..4c2637b 100644
--- a/core/java/android/os/Handler.java
+++ b/core/java/android/os/Handler.java
@@ -18,6 +18,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.util.Log;
import android.util.Printer;
@@ -168,6 +169,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public Handler(boolean async) {
this(null, async);
}
@@ -229,6 +231,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public Handler(Looper looper, Callback callback, boolean async) {
mLooper = looper;
mQueue = looper.mQueue;
@@ -274,6 +277,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
@NonNull
public static Handler getMain() {
if (MAIN_THREAD_HANDLER == null) {
@@ -801,6 +805,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public final boolean hasCallbacks(Runnable r) {
return mQueue.hasMessages(this, r, null);
}
@@ -839,6 +844,7 @@
+ "}";
}
+ @UnsupportedAppUsage
final IMessenger getIMessenger() {
synchronized (mQueue) {
if (mMessenger != null) {
@@ -862,6 +868,7 @@
return m;
}
+ @UnsupportedAppUsage
private static Message getPostMessage(Runnable r, Object token) {
Message m = Message.obtain();
m.obj = token;
@@ -873,10 +880,13 @@
message.callback.run();
}
+ @UnsupportedAppUsage
final Looper mLooper;
final MessageQueue mQueue;
+ @UnsupportedAppUsage
final Callback mCallback;
final boolean mAsynchronous;
+ @UnsupportedAppUsage
IMessenger mMessenger;
private static final class BlockingRunnable implements Runnable {
diff --git a/core/java/android/os/HwBinder.java b/core/java/android/os/HwBinder.java
index 9e3e83e..09afdc7 100644
--- a/core/java/android/os/HwBinder.java
+++ b/core/java/android/os/HwBinder.java
@@ -18,6 +18,7 @@
import android.annotation.SystemApi;
import android.annotation.TestApi;
+import android.annotation.UnsupportedAppUsage;
import libcore.util.NativeAllocationRegistry;
@@ -151,6 +152,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static void reportSyspropChanged() {
native_report_sysprop_change();
}
diff --git a/core/java/android/os/HwParcel.java b/core/java/android/os/HwParcel.java
index dc640c9..cfb582e 100644
--- a/core/java/android/os/HwParcel.java
+++ b/core/java/android/os/HwParcel.java
@@ -21,6 +21,7 @@
import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.annotation.TestApi;
+import android.annotation.UnsupportedAppUsage;
import libcore.util.NativeAllocationRegistry;
@@ -49,6 +50,7 @@
private static final NativeAllocationRegistry sNativeRegistry;
+ @UnsupportedAppUsage
private HwParcel(boolean allocate) {
native_setup(allocate);
diff --git a/core/java/android/os/HwRemoteBinder.java b/core/java/android/os/HwRemoteBinder.java
index a07e42c..72ec958 100644
--- a/core/java/android/os/HwRemoteBinder.java
+++ b/core/java/android/os/HwRemoteBinder.java
@@ -16,6 +16,7 @@
package android.os;
+import android.annotation.UnsupportedAppUsage;
import libcore.util.NativeAllocationRegistry;
/** @hide */
@@ -24,6 +25,7 @@
private static final NativeAllocationRegistry sNativeRegistry;
+ @UnsupportedAppUsage
public HwRemoteBinder() {
native_setup_empty();
diff --git a/core/java/android/os/IBinder.java b/core/java/android/os/IBinder.java
index e74b0bb..83f88ad 100644
--- a/core/java/android/os/IBinder.java
+++ b/core/java/android/os/IBinder.java
@@ -18,6 +18,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import java.io.FileDescriptor;
@@ -149,6 +150,7 @@
int LIKE_TRANSACTION = ('_'<<24)|('L'<<16)|('I'<<8)|'K';
/** @hide */
+ @UnsupportedAppUsage
int SYSPROPS_TRANSACTION = ('_'<<24)|('S'<<16)|('P'<<8)|'R';
/**
diff --git a/core/java/android/os/IDeviceIdleController.aidl b/core/java/android/os/IDeviceIdleController.aidl
index 8271701..974745f 100644
--- a/core/java/android/os/IDeviceIdleController.aidl
+++ b/core/java/android/os/IDeviceIdleController.aidl
@@ -39,6 +39,7 @@
int[] getAppIdTempWhitelist();
boolean isPowerSaveWhitelistExceptIdleApp(String name);
boolean isPowerSaveWhitelistApp(String name);
+ @UnsupportedAppUsage
void addPowerSaveTempWhitelistApp(String name, long duration, int userId, String reason);
long addPowerSaveTempWhitelistAppForMms(String name, int userId, String reason);
long addPowerSaveTempWhitelistAppForSms(String name, int userId, String reason);
diff --git a/core/java/android/os/INetworkManagementService.aidl b/core/java/android/os/INetworkManagementService.aidl
index 8ced722..6536fc9 100644
--- a/core/java/android/os/INetworkManagementService.aidl
+++ b/core/java/android/os/INetworkManagementService.aidl
@@ -38,11 +38,13 @@
/**
* Register an observer to receive events.
*/
+ @UnsupportedAppUsage
void registerObserver(INetworkManagementEventObserver obs);
/**
* Unregister an observer from receiving events.
*/
+ @UnsupportedAppUsage
void unregisterObserver(INetworkManagementEventObserver obs);
/**
@@ -54,16 +56,19 @@
* Retrieves the specified interface config
*
*/
+ @UnsupportedAppUsage
InterfaceConfiguration getInterfaceConfig(String iface);
/**
* Sets the configuration of the specified interface
*/
+ @UnsupportedAppUsage
void setInterfaceConfig(String iface, in InterfaceConfiguration cfg);
/**
* Clear all IP addresses on the specified interface
*/
+ @UnsupportedAppUsage
void clearInterfaceAddresses(String iface);
/**
@@ -79,22 +84,26 @@
/**
* Set interface IPv6 privacy extensions
*/
+ @UnsupportedAppUsage
void setInterfaceIpv6PrivacyExtensions(String iface, boolean enable);
/**
* Disable IPv6 on an interface
*/
+ @UnsupportedAppUsage
void disableIpv6(String iface);
/**
* Enable IPv6 on an interface
*/
+ @UnsupportedAppUsage
void enableIpv6(String iface);
/**
* Set IPv6 autoconf address generation mode.
* This is a no-op if an unsupported mode is requested.
*/
+ @UnsupportedAppUsage
void setIPv6AddrGenMode(String iface, int mode);
/**
@@ -124,37 +133,44 @@
/**
* Returns true if IP forwarding is enabled
*/
+ @UnsupportedAppUsage
boolean getIpForwardingEnabled();
/**
* Enables/Disables IP Forwarding
*/
+ @UnsupportedAppUsage
void setIpForwardingEnabled(boolean enabled);
/**
* Start tethering services with the specified dhcp server range
* arg is a set of start end pairs defining the ranges.
*/
+ @UnsupportedAppUsage
void startTethering(in String[] dhcpRanges);
/**
* Stop currently running tethering services
*/
+ @UnsupportedAppUsage
void stopTethering();
/**
* Returns true if tethering services are started
*/
+ @UnsupportedAppUsage
boolean isTetheringStarted();
/**
* Tethers the specified interface
*/
+ @UnsupportedAppUsage
void tetherInterface(String iface);
/**
* Untethers the specified interface
*/
+ @UnsupportedAppUsage
void untetherInterface(String iface);
/**
@@ -189,11 +205,13 @@
* The address and netmask of the external interface is used for
* the NAT'ed network.
*/
+ @UnsupportedAppUsage
void enableNat(String internalInterface, String externalInterface);
/**
* Disables Network Address Translation between two interfaces.
*/
+ @UnsupportedAppUsage
void disableNat(String internalInterface, String externalInterface);
/**
@@ -224,27 +242,6 @@
void tetherLimitReached(ITetheringStatsProvider provider);
/**
- ** PPPD
- **/
-
- /**
- * Returns the list of currently known TTY devices on the system
- */
- String[] listTtys();
-
- /**
- * Attaches a PPP server daemon to the specified TTY with the specified
- * local/remote addresses.
- */
- void attachPppd(String tty, String localAddr, String remoteAddr, String dns1Addr,
- String dns2Addr);
-
- /**
- * Detaches a PPP server daemon from the specified TTY.
- */
- void detachPppd(String tty);
-
- /**
** DATA USAGE RELATED
**/
@@ -311,6 +308,7 @@
/**
* Return status of bandwidth control module.
*/
+ @UnsupportedAppUsage
boolean isBandwidthControlEnabled();
/**
diff --git a/core/java/android/os/IPowerManager.aidl b/core/java/android/os/IPowerManager.aidl
index 13e4e38..93b80aa 100644
--- a/core/java/android/os/IPowerManager.aidl
+++ b/core/java/android/os/IPowerManager.aidl
@@ -40,10 +40,14 @@
void updateWakeLockWorkSource(IBinder lock, in WorkSource ws, String historyTag);
boolean isWakeLockLevelSupported(int level);
+ @UnsupportedAppUsage
void userActivity(long time, int event, int flags);
+ @UnsupportedAppUsage
void wakeUp(long time, String reason, String opPackageName);
+ @UnsupportedAppUsage
void goToSleep(long time, int reason, int flags);
void nap(long time);
+ @UnsupportedAppUsage
boolean isInteractive();
boolean isPowerSaveMode();
PowerSaveState getPowerSaveState(int serviceType);
@@ -51,6 +55,7 @@
boolean isDeviceIdleMode();
boolean isLightDeviceIdleMode();
+ @UnsupportedAppUsage
void reboot(boolean confirm, String reason, boolean wait);
void rebootSafeMode(boolean confirm, boolean wait);
void shutdown(boolean confirm, String reason, boolean wait);
diff --git a/core/java/android/os/IRemoteCallback.aidl b/core/java/android/os/IRemoteCallback.aidl
index f0c6c73..71f3b06 100644
--- a/core/java/android/os/IRemoteCallback.aidl
+++ b/core/java/android/os/IRemoteCallback.aidl
@@ -21,5 +21,6 @@
/** @hide */
oneway interface IRemoteCallback {
+ @UnsupportedAppUsage
void sendResult(in Bundle data);
}
diff --git a/core/java/android/os/IServiceManager.java b/core/java/android/os/IServiceManager.java
index 89bf7b9..bc0690d 100644
--- a/core/java/android/os/IServiceManager.java
+++ b/core/java/android/os/IServiceManager.java
@@ -16,6 +16,8 @@
package android.os;
+import android.annotation.UnsupportedAppUsage;
+
/**
* Basic interface for finding and publishing system services.
*
@@ -33,12 +35,14 @@
* service manager. Blocks for a few seconds waiting for it to be
* published if it does not already exist.
*/
+ @UnsupportedAppUsage
IBinder getService(String name) throws RemoteException;
/**
* Retrieve an existing service called @a name from the
* service manager. Non-blocking.
*/
+ @UnsupportedAppUsage
IBinder checkService(String name) throws RemoteException;
/**
diff --git a/core/java/android/os/IUserManager.aidl b/core/java/android/os/IUserManager.aidl
index 3017f25..24afb56 100644
--- a/core/java/android/os/IUserManager.aidl
+++ b/core/java/android/os/IUserManager.aidl
@@ -59,6 +59,7 @@
boolean canAddMoreManagedProfiles(int userHandle, boolean allowedToRemoveOne);
UserInfo getProfileParent(int userHandle);
boolean isSameProfileGroup(int userHandle, int otherUserHandle);
+ @UnsupportedAppUsage
UserInfo getUserInfo(int userHandle);
String getUserAccount(int userHandle);
void setUserAccount(int userHandle, String accountName);
diff --git a/core/java/android/os/LocaleList.java b/core/java/android/os/LocaleList.java
index 87e1b7d..6da72aa 100644
--- a/core/java/android/os/LocaleList.java
+++ b/core/java/android/os/LocaleList.java
@@ -20,6 +20,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.Size;
+import android.annotation.UnsupportedAppUsage;
import android.content.LocaleProto;
import android.icu.util.ULocale;
import android.util.proto.ProtoOutputStream;
@@ -558,6 +559,7 @@
*
* {@hide}
*/
+ @UnsupportedAppUsage
public static void setDefault(@NonNull @Size(min=1) LocaleList locales, int localeIndex) {
if (locales == null) {
throw new NullPointerException("locales is null");
diff --git a/core/java/android/os/Looper.java b/core/java/android/os/Looper.java
index 684a8ee..a7d59e5 100644
--- a/core/java/android/os/Looper.java
+++ b/core/java/android/os/Looper.java
@@ -18,6 +18,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.os.LooperProto;
import android.util.Log;
import android.util.Printer;
@@ -68,12 +69,16 @@
private static final String TAG = "Looper";
// sThreadLocal.get() will return null unless you've called prepare().
+ @UnsupportedAppUsage
static final ThreadLocal<Looper> sThreadLocal = new ThreadLocal<Looper>();
+ @UnsupportedAppUsage
private static Looper sMainLooper; // guarded by Looper.class
+ @UnsupportedAppUsage
final MessageQueue mQueue;
final Thread mThread;
+ @UnsupportedAppUsage
private Printer mLogging;
private long mTraceTag;
@@ -290,6 +295,7 @@
}
/** {@hide} */
+ @UnsupportedAppUsage
public void setTraceTag(long traceTag) {
mTraceTag = traceTag;
}
diff --git a/core/java/android/os/MemoryFile.java b/core/java/android/os/MemoryFile.java
index ff3258f..5a1e3d4 100644
--- a/core/java/android/os/MemoryFile.java
+++ b/core/java/android/os/MemoryFile.java
@@ -16,6 +16,7 @@
package android.os;
+import android.annotation.UnsupportedAppUsage;
import android.system.ErrnoException;
import java.io.FileDescriptor;
@@ -40,7 +41,9 @@
private static String TAG = "MemoryFile";
// Returns 'true' if purged, 'false' otherwise
+ @UnsupportedAppUsage
private static native boolean native_pin(FileDescriptor fd, boolean pin) throws IOException;
+ @UnsupportedAppUsage
private static native int native_get_size(FileDescriptor fd) throws IOException;
private SharedMemory mSharedMemory;
@@ -79,6 +82,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
void deactivate() {
if (mMapping != null) {
SharedMemory.unmap(mMapping);
@@ -222,6 +226,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public FileDescriptor getFileDescriptor() throws IOException {
return mSharedMemory.getFileDescriptor();
}
@@ -234,6 +239,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static int getSize(FileDescriptor fd) throws IOException {
return native_get_size(fd);
}
diff --git a/core/java/android/os/Message.java b/core/java/android/os/Message.java
index 47659a2..3d77711 100644
--- a/core/java/android/os/Message.java
+++ b/core/java/android/os/Message.java
@@ -16,6 +16,7 @@
package android.os;
+import android.annotation.UnsupportedAppUsage;
import android.os.MessageProto;
import android.util.TimeUtils;
import android.util.proto.ProtoOutputStream;
@@ -96,17 +97,22 @@
/** Flags to clear in the copyFrom method */
/*package*/ static final int FLAGS_TO_CLEAR_ON_COPY_FROM = FLAG_IN_USE;
+ @UnsupportedAppUsage
/*package*/ int flags;
+ @UnsupportedAppUsage
/*package*/ long when;
/*package*/ Bundle data;
+ @UnsupportedAppUsage
/*package*/ Handler target;
+ @UnsupportedAppUsage
/*package*/ Runnable callback;
// sometimes we store linked lists of these things
+ @UnsupportedAppUsage
/*package*/ Message next;
@@ -292,6 +298,7 @@
* Recycles a Message that may be in-use.
* Used internally by the MessageQueue and Looper when disposing of queued Messages.
*/
+ @UnsupportedAppUsage
void recycleUnchecked() {
// Mark the message as in use while it remains in the recycled object pool.
// Clear out all other details.
@@ -373,6 +380,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public Message setCallback(Runnable r) {
callback = r;
return this;
@@ -486,6 +494,7 @@
return ((flags & FLAG_IN_USE) == FLAG_IN_USE);
}
+ @UnsupportedAppUsage
/*package*/ void markInUse() {
flags |= FLAG_IN_USE;
}
@@ -500,6 +509,7 @@
return toString(SystemClock.uptimeMillis());
}
+ @UnsupportedAppUsage
String toString(long now) {
StringBuilder b = new StringBuilder();
b.append("{ when=");
diff --git a/core/java/android/os/MessageQueue.java b/core/java/android/os/MessageQueue.java
index b1c33c2..183ef8b 100644
--- a/core/java/android/os/MessageQueue.java
+++ b/core/java/android/os/MessageQueue.java
@@ -18,6 +18,7 @@
import android.annotation.IntDef;
import android.annotation.NonNull;
+import android.annotation.UnsupportedAppUsage;
import android.os.MessageQueueProto;
import android.util.Log;
import android.util.Printer;
@@ -42,12 +43,16 @@
private static final boolean DEBUG = false;
// True if the message queue can be quit.
+ @UnsupportedAppUsage
private final boolean mQuitAllowed;
+ @UnsupportedAppUsage
@SuppressWarnings("unused")
private long mPtr; // used by native code
+ @UnsupportedAppUsage
Message mMessages;
+ @UnsupportedAppUsage
private final ArrayList<IdleHandler> mIdleHandlers = new ArrayList<IdleHandler>();
private SparseArray<FileDescriptorRecord> mFileDescriptorRecords;
private IdleHandler[] mPendingIdleHandlers;
@@ -58,10 +63,12 @@
// The next barrier token.
// Barriers are indicated by messages with a null target whose arg1 field carries the token.
+ @UnsupportedAppUsage
private int mNextBarrierToken;
private native static long nativeInit();
private native static void nativeDestroy(long ptr);
+ @UnsupportedAppUsage
private native void nativePollOnce(long ptr, int timeoutMillis); /*non-static for callbacks*/
private native static void nativeWake(long ptr);
private native static boolean nativeIsPolling(long ptr);
@@ -259,6 +266,7 @@
}
// Called from native code.
+ @UnsupportedAppUsage
private int dispatchEvents(int fd, int events) {
// Get the file descriptor record and any state that might change.
final FileDescriptorRecord record;
@@ -307,6 +315,7 @@
return newWatchedEvents;
}
+ @UnsupportedAppUsage
Message next() {
// Return here if the message loop has already quit and been disposed.
// This can happen if the application tries to restart a looper after quit
@@ -458,6 +467,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public int postSyncBarrier() {
return postSyncBarrier(SystemClock.uptimeMillis());
}
@@ -501,6 +511,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public void removeSyncBarrier(int token) {
// Remove a sync barrier token from the queue.
// If the queue is no longer stalled by a barrier then wake it.
@@ -604,6 +615,7 @@
}
}
+ @UnsupportedAppUsage
boolean hasMessages(Handler h, Runnable r, Object object) {
if (h == null) {
return false;
diff --git a/core/java/android/os/Parcel.java b/core/java/android/os/Parcel.java
index 210404c..ae743fb 100644
--- a/core/java/android/os/Parcel.java
+++ b/core/java/android/os/Parcel.java
@@ -17,6 +17,7 @@
package android.os;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.text.TextUtils;
import android.util.ArrayMap;
import android.util.ArraySet;
@@ -196,6 +197,7 @@
private static final boolean DEBUG_ARRAY_MAP = false;
private static final String TAG = "Parcel";
+ @UnsupportedAppUsage
@SuppressWarnings({"UnusedDeclaration"})
private long mNativePtr; // used by native code
@@ -445,9 +447,11 @@
}
/** @hide */
+ @UnsupportedAppUsage
public static native long getGlobalAllocSize();
/** @hide */
+ @UnsupportedAppUsage
public static native long getGlobalAllocCount();
/**
@@ -641,6 +645,7 @@
* {@hide}
* {@SystemApi}
*/
+ @UnsupportedAppUsage
public final void writeBlob(byte[] b) {
writeBlob(b, 0, (b != null) ? b.length : 0);
}
@@ -724,6 +729,7 @@
* growing dataCapacity() if needed.
* @hide
*/
+ @UnsupportedAppUsage
public final void writeCharSequence(CharSequence val) {
TextUtils.writeToParcel(val, this, 0);
}
@@ -882,6 +888,7 @@
/**
* @hide For testing only.
*/
+ @UnsupportedAppUsage
public void writeArrayMap(ArrayMap<String, Object> val) {
writeArrayMapInternal(val);
}
@@ -893,6 +900,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public void writeArraySet(@Nullable ArraySet<? extends Object> val) {
final int size = (val != null) ? val.size() : -1;
writeInt(size);
@@ -1454,6 +1462,7 @@
* @see #readParcelableList(List, ClassLoader)
* @hide
*/
+ @UnsupportedAppUsage
public final <T extends Parcelable> void writeParcelableList(List<T> val, int flags) {
if (val == null) {
writeInt(-1);
@@ -1683,6 +1692,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public final void writeParcelableCreator(Parcelable p) {
String name = p.getClass().getName();
writeString(name);
@@ -1881,6 +1891,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public final int readExceptionCode() {
int code = readInt();
if (code == EX_HAS_REPLY_HEADER) {
@@ -2023,6 +2034,7 @@
* Read a CharSequence value from the parcel at the current dataPosition().
* @hide
*/
+ @UnsupportedAppUsage
public final CharSequence readCharSequence() {
return TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(this);
}
@@ -2043,6 +2055,7 @@
}
/** {@hide} */
+ @UnsupportedAppUsage
public final FileDescriptor readRawFileDescriptor() {
return nativeReadFileDescriptor(mNativePtr);
}
@@ -2225,6 +2238,7 @@
* {@hide}
* {@SystemApi}
*/
+ @UnsupportedAppUsage
public final byte[] readBlob() {
return nativeReadBlob(mNativePtr);
}
@@ -2233,6 +2247,7 @@
* Read and return a String[] object from the parcel.
* {@hide}
*/
+ @UnsupportedAppUsage
public final String[] readStringArray() {
String[] array = null;
@@ -2519,6 +2534,7 @@
* @see #writeParcelableList(List, int)
* @hide
*/
+ @UnsupportedAppUsage
public final <T extends Parcelable> List<T> readParcelableList(List<T> list, ClassLoader cl) {
final int N = readInt();
if (N == -1) {
@@ -2761,6 +2777,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
@SuppressWarnings("unchecked")
public final <T extends Parcelable> T readCreator(Parcelable.Creator<?> creator,
ClassLoader loader) {
@@ -2773,6 +2790,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public final Parcelable.Creator<?> readParcelableCreator(ClassLoader loader) {
String name = readString();
if (name == null) {
@@ -3050,6 +3068,7 @@
/**
* @hide For testing only.
*/
+ @UnsupportedAppUsage
public void readArrayMap(ArrayMap outVal, ClassLoader loader) {
final int N = readInt();
if (N < 0) {
@@ -3065,6 +3084,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public @Nullable ArraySet<? extends Object> readArraySet(ClassLoader loader) {
final int size = readInt();
if (size < 0) {
diff --git a/core/java/android/os/ParcelFileDescriptor.java b/core/java/android/os/ParcelFileDescriptor.java
index 36b99d2..36ffd7a 100644
--- a/core/java/android/os/ParcelFileDescriptor.java
+++ b/core/java/android/os/ParcelFileDescriptor.java
@@ -33,6 +33,7 @@
import static android.system.OsConstants.S_ISREG;
import static android.system.OsConstants.S_IWOTH;
+import android.annotation.UnsupportedAppUsage;
import android.content.BroadcastReceiver;
import android.content.ContentProvider;
import android.os.MessageQueue.OnFileDescriptorEventListener;
@@ -178,6 +179,7 @@
}
/** {@hide} */
+ @UnsupportedAppUsage
public ParcelFileDescriptor(FileDescriptor fd) {
this(fd, null);
}
@@ -577,6 +579,7 @@
* @return A ParcelFileDescriptor.
* @throws IOException if there is an error while creating the shared memory area.
*/
+ @UnsupportedAppUsage
@Deprecated
public static ParcelFileDescriptor fromData(byte[] data, String name) throws IOException {
if (data == null) return null;
@@ -629,6 +632,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static File getFile(FileDescriptor fd) throws IOException {
try {
final String path = Os.readlink("/proc/self/fd/" + fd.getInt$());
@@ -682,6 +686,7 @@
* and I really don't think we want it to be public.
* @hide
*/
+ @UnsupportedAppUsage
public long seekTo(long pos) throws IOException {
if (mWrapped != null) {
return mWrapped.seekTo(pos);
diff --git a/core/java/android/os/ParcelableParcel.java b/core/java/android/os/ParcelableParcel.java
index 5bbe6488..61f3968 100644
--- a/core/java/android/os/ParcelableParcel.java
+++ b/core/java/android/os/ParcelableParcel.java
@@ -16,6 +16,7 @@
package android.os;
+import android.annotation.UnsupportedAppUsage;
import android.util.MathUtils;
/**
@@ -26,6 +27,7 @@
final Parcel mParcel;
final ClassLoader mClassLoader;
+ @UnsupportedAppUsage
public ParcelableParcel(ClassLoader loader) {
mParcel = Parcel.obtain();
mClassLoader = loader;
@@ -44,11 +46,13 @@
mParcel.appendFrom(src, pos, size);
}
+ @UnsupportedAppUsage
public Parcel getParcel() {
mParcel.setDataPosition(0);
return mParcel;
}
+ @UnsupportedAppUsage
public ClassLoader getClassLoader() {
return mClassLoader;
}
@@ -64,6 +68,7 @@
dest.appendFrom(mParcel, 0, mParcel.dataSize());
}
+ @UnsupportedAppUsage
public static final Parcelable.ClassLoaderCreator<ParcelableParcel> CREATOR
= new Parcelable.ClassLoaderCreator<ParcelableParcel>() {
public ParcelableParcel createFromParcel(Parcel in) {
diff --git a/core/java/android/os/PerformanceCollector.java b/core/java/android/os/PerformanceCollector.java
index be1cf6d..33c86b8 100644
--- a/core/java/android/os/PerformanceCollector.java
+++ b/core/java/android/os/PerformanceCollector.java
@@ -17,6 +17,7 @@
package android.os;
+import android.annotation.UnsupportedAppUsage;
import java.util.ArrayList;
/**
@@ -285,6 +286,7 @@
private long mCpuTime;
private long mExecTime;
+ @UnsupportedAppUsage
public PerformanceCollector() {
}
@@ -302,6 +304,7 @@
* @param label description of code block between beginSnapshot and
* endSnapshot, used to label output
*/
+ @UnsupportedAppUsage
public void beginSnapshot(String label) {
if (mPerfWriter != null)
mPerfWriter.writeBeginSnapshot(label);
@@ -346,6 +349,7 @@
* <li>{@link #METRIC_KEY_OTHER_SHARED_DIRTY other_shared_dirty}
* </ul>
*/
+ @UnsupportedAppUsage
public Bundle endSnapshot() {
endPerformanceSnapshot();
if (mPerfWriter != null)
@@ -359,6 +363,7 @@
* @param label description of code block between startTiming and
* stopTiming, used to label output
*/
+ @UnsupportedAppUsage
public void startTiming(String label) {
if (mPerfWriter != null)
mPerfWriter.writeStartTiming(label);
@@ -408,6 +413,7 @@
* between calls to startTiming and stopTiming. List of iterations
* is keyed by {@link #METRIC_KEY_ITERATIONS iterations}.
*/
+ @UnsupportedAppUsage
public Bundle stopTiming(String label) {
addIteration(label);
if (mPerfWriter != null)
diff --git a/core/java/android/os/PowerManager.java b/core/java/android/os/PowerManager.java
index 9c25848..cae54f5 100644
--- a/core/java/android/os/PowerManager.java
+++ b/core/java/android/os/PowerManager.java
@@ -22,6 +22,7 @@
import android.annotation.SystemApi;
import android.annotation.SystemService;
import android.annotation.TestApi;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.util.Log;
import android.util.proto.ProtoOutputStream;
@@ -282,6 +283,7 @@
* Brightness value for fully on.
* @hide
*/
+ @UnsupportedAppUsage
public static final int BRIGHTNESS_ON = 255;
/**
@@ -364,6 +366,7 @@
* Go to sleep reason code: Going to sleep due to a screen timeout.
* @hide
*/
+ @UnsupportedAppUsage
public static final int GO_TO_SLEEP_REASON_TIMEOUT = 2;
/**
@@ -608,6 +611,7 @@
public @interface LocationPowerSaveMode {}
final Context mContext;
+ @UnsupportedAppUsage
final IPowerManager mService;
final Handler mHandler;
@@ -628,6 +632,7 @@
* this is the minimum value that can be set by the user.
* @hide
*/
+ @UnsupportedAppUsage
public int getMinimumScreenBrightnessSetting() {
return mContext.getResources().getInteger(
com.android.internal.R.integer.config_screenBrightnessSettingMinimum);
@@ -639,6 +644,7 @@
* this is the maximum value that can be set by the user.
* @hide
*/
+ @UnsupportedAppUsage
public int getMaximumScreenBrightnessSetting() {
return mContext.getResources().getInteger(
com.android.internal.R.integer.config_screenBrightnessSettingMaximum);
@@ -648,6 +654,7 @@
* Gets the default screen brightness setting.
* @hide
*/
+ @UnsupportedAppUsage
public int getDefaultScreenBrightnessSetting() {
return mContext.getResources().getInteger(
com.android.internal.R.integer.config_screenBrightnessSettingDefault);
@@ -762,6 +769,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public static void validateWakeLockParameters(int levelAndFlags, String tag) {
switch (levelAndFlags & WAKE_LOCK_LEVEL_MASK) {
case PARTIAL_WAKE_LOCK:
@@ -894,6 +902,7 @@
*
* @hide Requires signature permission.
*/
+ @UnsupportedAppUsage
public void goToSleep(long time, int reason, int flags) {
try {
mService.goToSleep(time, reason, flags);
@@ -932,6 +941,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public void wakeUp(long time, String reason) {
try {
mService.wakeUp(time, reason, mContext.getOpPackageName());
@@ -1142,6 +1152,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public boolean setPowerSaveMode(boolean mode) {
try {
return mService.setPowerSaveMode(mode);
@@ -1217,6 +1228,7 @@
* restrictions have been lifted.
* @hide
*/
+ @UnsupportedAppUsage
public boolean isLightDeviceIdleMode() {
try {
return mService.isLightDeviceIdleMode();
@@ -1339,6 +1351,7 @@
* This broadcast is only sent to registered receivers.
* @hide
*/
+ @UnsupportedAppUsage
@SdkConstant(SdkConstant.SdkConstantType.BROADCAST_INTENT_ACTION)
public static final String ACTION_LIGHT_DEVICE_IDLE_MODE_CHANGED
= "android.os.action.LIGHT_DEVICE_IDLE_MODE_CHANGED";
@@ -1365,11 +1378,13 @@
*
* @hide
*/
+ @UnsupportedAppUsage
@SdkConstant(SdkConstant.SdkConstantType.BROADCAST_INTENT_ACTION)
public static final String ACTION_POWER_SAVE_MODE_CHANGING
= "android.os.action.POWER_SAVE_MODE_CHANGING";
/** @hide */
+ @UnsupportedAppUsage
public static final String EXTRA_POWER_SAVE_MODE = "mode";
/**
@@ -1401,7 +1416,9 @@
* </p>
*/
public final class WakeLock {
+ @UnsupportedAppUsage
private int mFlags;
+ @UnsupportedAppUsage
private String mTag;
private final String mPackageName;
private final IBinder mToken;
diff --git a/core/java/android/os/Process.java b/core/java/android/os/Process.java
index 64d14c0..b986669 100644
--- a/core/java/android/os/Process.java
+++ b/core/java/android/os/Process.java
@@ -17,6 +17,7 @@
package android.os;
import android.annotation.TestApi;
+import android.annotation.UnsupportedAppUsage;
import android.system.Os;
import android.system.OsConstants;
import android.webkit.WebViewZygote;
@@ -58,30 +59,35 @@
* Defines the UID/GID for the log group.
* @hide
*/
+ @UnsupportedAppUsage
public static final int LOG_UID = 1007;
/**
* Defines the UID/GID for the WIFI supplicant process.
* @hide
*/
+ @UnsupportedAppUsage
public static final int WIFI_UID = 1010;
/**
* Defines the UID/GID for the mediaserver process.
* @hide
*/
+ @UnsupportedAppUsage
public static final int MEDIA_UID = 1013;
/**
* Defines the UID/GID for the DRM process.
* @hide
*/
+ @UnsupportedAppUsage
public static final int DRM_UID = 1019;
/**
* Defines the UID/GID for the group that controls VPN services.
* @hide
*/
+ @UnsupportedAppUsage
public static final int VPN_UID = 1016;
/**
@@ -94,6 +100,7 @@
* Defines the UID/GID for the NFC service process.
* @hide
*/
+ @UnsupportedAppUsage
public static final int NFC_UID = 1027;
/**
@@ -565,6 +572,7 @@
* Returns the identifier of this process' parent.
* @hide
*/
+ @UnsupportedAppUsage
public static final int myPpid() {
return Os.getppid();
}
@@ -623,6 +631,7 @@
}
/** {@hide} */
+ @UnsupportedAppUsage
public static final boolean isIsolated(int uid) {
uid = UserHandle.getAppId(uid);
return uid >= FIRST_ISOLATED_UID && uid <= LAST_ISOLATED_UID;
@@ -648,6 +657,7 @@
* @return the uid of the process, or -1 if the process is not running.
* @hide pending API council review
*/
+ @UnsupportedAppUsage
public static final int getUidForPid(int pid) {
String[] procStatusLabels = { "Uid:" };
long[] procStatusValues = new long[1];
@@ -662,6 +672,7 @@
* @return the parent process id of the process, or -1 if the process is not running.
* @hide
*/
+ @UnsupportedAppUsage
public static final int getParentPid(int pid) {
String[] procStatusLabels = { "PPid:" };
long[] procStatusValues = new long[1];
@@ -765,6 +776,7 @@
*
* Always sets cpusets.
*/
+ @UnsupportedAppUsage
public static final native void setProcessGroup(int pid, int group)
throws IllegalArgumentException, SecurityException;
@@ -906,6 +918,7 @@
*
* {@hide}
*/
+ @UnsupportedAppUsage
public static final native void setArgV0(String text);
/**
@@ -956,50 +969,67 @@
public static final native void sendSignalQuiet(int pid, int signal);
/** @hide */
+ @UnsupportedAppUsage
public static final native long getFreeMemory();
/** @hide */
+ @UnsupportedAppUsage
public static final native long getTotalMemory();
/** @hide */
+ @UnsupportedAppUsage
public static final native void readProcLines(String path,
String[] reqFields, long[] outSizes);
/** @hide */
+ @UnsupportedAppUsage
public static final native int[] getPids(String path, int[] lastArray);
/** @hide */
+ @UnsupportedAppUsage
public static final int PROC_TERM_MASK = 0xff;
/** @hide */
+ @UnsupportedAppUsage
public static final int PROC_ZERO_TERM = 0;
/** @hide */
+ @UnsupportedAppUsage
public static final int PROC_SPACE_TERM = (int)' ';
/** @hide */
+ @UnsupportedAppUsage
public static final int PROC_TAB_TERM = (int)'\t';
/** @hide */
+ @UnsupportedAppUsage
public static final int PROC_COMBINE = 0x100;
/** @hide */
+ @UnsupportedAppUsage
public static final int PROC_PARENS = 0x200;
/** @hide */
+ @UnsupportedAppUsage
public static final int PROC_QUOTES = 0x400;
/** @hide */
public static final int PROC_CHAR = 0x800;
/** @hide */
+ @UnsupportedAppUsage
public static final int PROC_OUT_STRING = 0x1000;
/** @hide */
+ @UnsupportedAppUsage
public static final int PROC_OUT_LONG = 0x2000;
/** @hide */
+ @UnsupportedAppUsage
public static final int PROC_OUT_FLOAT = 0x4000;
/** @hide */
+ @UnsupportedAppUsage
public static final native boolean readProcFile(String file, int[] format,
String[] outStrings, long[] outLongs, float[] outFloats);
/** @hide */
+ @UnsupportedAppUsage
public static final native boolean parseProcLine(byte[] buffer, int startIndex,
int endIndex, int[] format, String[] outStrings, long[] outLongs, float[] outFloats);
/** @hide */
+ @UnsupportedAppUsage
public static final native int[] getPidsForCommands(String[] cmds);
/**
@@ -1010,6 +1040,7 @@
* or -1 if the value cannot be determined
* @hide
*/
+ @UnsupportedAppUsage
public static final native long getPss(int pid);
/**
diff --git a/core/java/android/os/RecoverySystem.java b/core/java/android/os/RecoverySystem.java
index 3ee54ce..6a01e56 100644
--- a/core/java/android/os/RecoverySystem.java
+++ b/core/java/android/os/RecoverySystem.java
@@ -22,6 +22,7 @@
import android.annotation.SuppressLint;
import android.annotation.SystemApi;
import android.annotation.SystemService;
+import android.annotation.UnsupportedAppUsage;
import android.app.PendingIntent;
import android.content.BroadcastReceiver;
import android.content.ContentResolver;
@@ -355,6 +356,7 @@
*
* @return the verification result.
*/
+ @UnsupportedAppUsage
private static boolean verifyPackageCompatibility(InputStream inputStream) throws IOException {
ArrayList<String> list = new ArrayList<>();
ZipInputStream zis = new ZipInputStream(inputStream);
diff --git a/core/java/android/os/Registrant.java b/core/java/android/os/Registrant.java
index 705cc5d..8fb123a 100644
--- a/core/java/android/os/Registrant.java
+++ b/core/java/android/os/Registrant.java
@@ -16,6 +16,7 @@
package android.os;
+import android.annotation.UnsupportedAppUsage;
import android.os.Handler;
import android.os.Message;
@@ -24,6 +25,7 @@
/** @hide */
public class Registrant
{
+ @UnsupportedAppUsage
public
Registrant(Handler h, int what, Object obj)
{
@@ -32,6 +34,7 @@
userObj = obj;
}
+ @UnsupportedAppUsage
public void
clear()
{
@@ -39,12 +42,14 @@
userObj = null;
}
+ @UnsupportedAppUsage
public void
notifyRegistrant()
{
internalNotifyRegistrant (null, null);
}
+ @UnsupportedAppUsage
public void
notifyResult(Object result)
{
@@ -60,6 +65,7 @@
/**
* This makes a copy of @param ar
*/
+ @UnsupportedAppUsage
public void
notifyRegistrant(AsyncResult ar)
{
@@ -88,6 +94,7 @@
* NOTE: May return null if weak reference has been collected
*/
+ @UnsupportedAppUsage
public Message
messageForRegistrant()
{
diff --git a/core/java/android/os/RegistrantList.java b/core/java/android/os/RegistrantList.java
index 9ab61f5..6e562ff 100644
--- a/core/java/android/os/RegistrantList.java
+++ b/core/java/android/os/RegistrantList.java
@@ -16,6 +16,7 @@
package android.os;
+import android.annotation.UnsupportedAppUsage;
import android.os.Handler;
import java.util.ArrayList;
@@ -25,12 +26,14 @@
{
ArrayList registrants = new ArrayList(); // of Registrant
+ @UnsupportedAppUsage
public synchronized void
add(Handler h, int what, Object obj)
{
add(new Registrant(h, what, obj));
}
+ @UnsupportedAppUsage
public synchronized void
addUnique(Handler h, int what, Object obj)
{
@@ -39,6 +42,7 @@
add(new Registrant(h, what, obj));
}
+ @UnsupportedAppUsage
public synchronized void
add(Registrant r)
{
@@ -46,6 +50,7 @@
registrants.add(r);
}
+ @UnsupportedAppUsage
public synchronized void
removeCleared()
{
@@ -58,6 +63,7 @@
}
}
+ @UnsupportedAppUsage
public synchronized int
size()
{
@@ -79,6 +85,7 @@
}
}
+ @UnsupportedAppUsage
public /*synchronized*/ void
notifyRegistrants()
{
@@ -91,6 +98,7 @@
internalNotifyRegistrants (null, exception);
}
+ @UnsupportedAppUsage
public /*synchronized*/ void
notifyResult(Object result)
{
@@ -98,12 +106,14 @@
}
+ @UnsupportedAppUsage
public /*synchronized*/ void
notifyRegistrants(AsyncResult ar)
{
internalNotifyRegistrants(ar.result, ar.exception);
}
+ @UnsupportedAppUsage
public synchronized void
remove(Handler h)
{
diff --git a/core/java/android/os/RemoteCallbackList.java b/core/java/android/os/RemoteCallbackList.java
index bbb8a7b..b13e68d 100644
--- a/core/java/android/os/RemoteCallbackList.java
+++ b/core/java/android/os/RemoteCallbackList.java
@@ -16,6 +16,7 @@
package android.os;
+import android.annotation.UnsupportedAppUsage;
import android.util.ArrayMap;
import android.util.Slog;
@@ -53,6 +54,7 @@
public class RemoteCallbackList<E extends IInterface> {
private static final String TAG = "RemoteCallbackList";
+ @UnsupportedAppUsage
/*package*/ ArrayMap<IBinder, Callback> mCallbacks
= new ArrayMap<IBinder, Callback>();
private Object[] mActiveBroadcast;
diff --git a/core/java/android/os/RemoteException.java b/core/java/android/os/RemoteException.java
index 4e8b971..2e673a8 100644
--- a/core/java/android/os/RemoteException.java
+++ b/core/java/android/os/RemoteException.java
@@ -16,6 +16,7 @@
package android.os;
+import android.annotation.UnsupportedAppUsage;
import android.util.AndroidException;
/**
@@ -54,6 +55,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public RuntimeException rethrowFromSystemServer() {
if (this instanceof DeadObjectException) {
throw new RuntimeException(new DeadSystemException());
diff --git a/core/java/android/os/SELinux.java b/core/java/android/os/SELinux.java
index a96618a..8ffafe4 100644
--- a/core/java/android/os/SELinux.java
+++ b/core/java/android/os/SELinux.java
@@ -42,12 +42,14 @@
* Determine whether SELinux is disabled or enabled.
* @return a boolean indicating whether SELinux is enabled.
*/
+ @UnsupportedAppUsage
public static final native boolean isSELinuxEnabled();
/**
* Determine whether SELinux is permissive or enforcing.
* @return a boolean indicating whether SELinux is enforcing.
*/
+ @UnsupportedAppUsage
public static final native boolean isSELinuxEnforced();
/**
@@ -91,6 +93,7 @@
* Gets the security context of the current process.
* @return a String representing the security context of the current process.
*/
+ @UnsupportedAppUsage
public static final native String getContext();
/**
@@ -98,6 +101,7 @@
* @param pid an int representing the process id to check.
* @return a String representing the security context of the given pid.
*/
+ @UnsupportedAppUsage
public static final native String getPidContext(int pid);
/**
@@ -108,6 +112,7 @@
* @param perm The permission name.
* @return a boolean indicating whether permission was granted.
*/
+ @UnsupportedAppUsage
public static final native boolean checkSELinuxAccess(String scon, String tcon, String tclass, String perm);
/**
@@ -167,6 +172,7 @@
*
* @return a boolean indicating whether the relabeling succeeded.
*/
+ @UnsupportedAppUsage
public static boolean restoreconRecursive(File file) {
try {
return native_restorecon(file.getCanonicalPath(), SELINUX_ANDROID_RESTORECON_RECURSE);
diff --git a/core/java/android/os/ServiceManager.java b/core/java/android/os/ServiceManager.java
index 165276d..b2ba928 100644
--- a/core/java/android/os/ServiceManager.java
+++ b/core/java/android/os/ServiceManager.java
@@ -16,6 +16,7 @@
package android.os;
+import android.annotation.UnsupportedAppUsage;
import android.util.Log;
import com.android.internal.annotations.GuardedBy;
@@ -30,11 +31,13 @@
private static final String TAG = "ServiceManager";
private static final Object sLock = new Object();
+ @UnsupportedAppUsage
private static IServiceManager sServiceManager;
/**
* Cache for the "well known" services, such as WM and AM.
*/
+ @UnsupportedAppUsage
private static HashMap<String, IBinder> sCache = new HashMap<String, IBinder>();
/**
@@ -98,6 +101,7 @@
"getService()",
});
+ @UnsupportedAppUsage
private static IServiceManager getIServiceManager() {
if (sServiceManager != null) {
return sServiceManager;
@@ -115,6 +119,7 @@
* @param name the name of the service to get
* @return a reference to the service, or <code>null</code> if the service doesn't exist
*/
+ @UnsupportedAppUsage
public static IBinder getService(String name) {
try {
IBinder service = sCache.get(name);
@@ -151,6 +156,7 @@
* @param name the name of the new service
* @param service the service object
*/
+ @UnsupportedAppUsage
public static void addService(String name, IBinder service) {
addService(name, service, false, IServiceManager.DUMP_FLAG_PRIORITY_DEFAULT);
}
@@ -164,6 +170,7 @@
* @param allowIsolated set to true to allow isolated sandboxed processes
* to access this service
*/
+ @UnsupportedAppUsage
public static void addService(String name, IBinder service, boolean allowIsolated) {
addService(name, service, allowIsolated, IServiceManager.DUMP_FLAG_PRIORITY_DEFAULT);
}
@@ -178,6 +185,7 @@
* @param dumpPriority supported dump priority levels as a bitmask
* to access this service
*/
+ @UnsupportedAppUsage
public static void addService(String name, IBinder service, boolean allowIsolated,
int dumpPriority) {
try {
@@ -191,6 +199,7 @@
* Retrieve an existing service called @a name from the
* service manager. Non-blocking.
*/
+ @UnsupportedAppUsage
public static IBinder checkService(String name) {
try {
IBinder service = sCache.get(name);
@@ -210,6 +219,7 @@
* @return an array of all currently running services, or <code>null</code> in
* case of an exception
*/
+ @UnsupportedAppUsage
public static String[] listServices() {
try {
return getIServiceManager().listServices(IServiceManager.DUMP_FLAG_PRIORITY_ALL);
diff --git a/core/java/android/os/ServiceManagerNative.java b/core/java/android/os/ServiceManagerNative.java
index 589b8c4..b7c026c 100644
--- a/core/java/android/os/ServiceManagerNative.java
+++ b/core/java/android/os/ServiceManagerNative.java
@@ -16,6 +16,7 @@
package android.os;
+import android.annotation.UnsupportedAppUsage;
import java.util.ArrayList;
@@ -30,6 +31,7 @@
* Cast a Binder object into a service manager interface, generating
* a proxy if needed.
*/
+ @UnsupportedAppUsage
static public IServiceManager asInterface(IBinder obj)
{
if (obj == null) {
@@ -117,6 +119,7 @@
return mRemote;
}
+ @UnsupportedAppUsage
public IBinder getService(String name) throws RemoteException {
Parcel data = Parcel.obtain();
Parcel reply = Parcel.obtain();
@@ -196,5 +199,6 @@
data.recycle();
}
+ @UnsupportedAppUsage
private IBinder mRemote;
}
diff --git a/core/java/android/os/ServiceSpecificException.java b/core/java/android/os/ServiceSpecificException.java
index 3b0f26ae..03d5d3e 100644
--- a/core/java/android/os/ServiceSpecificException.java
+++ b/core/java/android/os/ServiceSpecificException.java
@@ -15,6 +15,7 @@
*/
package android.os;
+import android.annotation.Nullable;
import android.annotation.SystemApi;
/**
@@ -34,7 +35,7 @@
public class ServiceSpecificException extends RuntimeException {
public final int errorCode;
- public ServiceSpecificException(int errorCode, String message) {
+ public ServiceSpecificException(int errorCode, @Nullable String message) {
super(message);
this.errorCode = errorCode;
}
diff --git a/core/java/android/os/SharedMemory.java b/core/java/android/os/SharedMemory.java
index e6c7a17..6025c34 100644
--- a/core/java/android/os/SharedMemory.java
+++ b/core/java/android/os/SharedMemory.java
@@ -18,6 +18,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.system.ErrnoException;
import android.system.Os;
import android.system.OsConstants;
@@ -156,6 +157,7 @@
*
* @hide Exposed for native ASharedMemory_dupFromJava()
*/
+ @UnsupportedAppUsage
public int getFd() {
return mFileDescriptor.getInt$();
}
diff --git a/core/java/android/os/ShellCommand.java b/core/java/android/os/ShellCommand.java
index fa05a5e..0d61a60 100644
--- a/core/java/android/os/ShellCommand.java
+++ b/core/java/android/os/ShellCommand.java
@@ -16,6 +16,7 @@
package android.os;
+import android.annotation.UnsupportedAppUsage;
import android.util.Slog;
import com.android.internal.util.FastPrintWriter;
@@ -300,6 +301,7 @@
}
}
+ @UnsupportedAppUsage
public String peekNextArg() {
if (mCurArgData != null) {
return mCurArgData;
diff --git a/core/java/android/os/StatFs.java b/core/java/android/os/StatFs.java
index 4e0b238..881d0b4 100644
--- a/core/java/android/os/StatFs.java
+++ b/core/java/android/os/StatFs.java
@@ -16,6 +16,7 @@
package android.os;
+import android.annotation.UnsupportedAppUsage;
import android.system.ErrnoException;
import android.system.Os;
import android.system.StructStatVfs;
@@ -25,6 +26,7 @@
* wrapper for Unix statvfs().
*/
public class StatFs {
+ @UnsupportedAppUsage
private StructStatVfs mStat;
/**
diff --git a/core/java/android/os/StrictMode.java b/core/java/android/os/StrictMode.java
index f224550..b396f75 100644
--- a/core/java/android/os/StrictMode.java
+++ b/core/java/android/os/StrictMode.java
@@ -19,6 +19,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.TestApi;
+import android.annotation.UnsupportedAppUsage;
import android.app.ActivityManager;
import android.app.ActivityThread;
import android.app.IActivityManager;
@@ -448,6 +449,7 @@
/** The default, lax policy which doesn't catch anything. */
public static final ThreadPolicy LAX = new ThreadPolicy(0, null, null);
+ @UnsupportedAppUsage
final int mask;
final OnThreadViolationListener mListener;
final Executor mCallbackExecutor;
@@ -738,6 +740,7 @@
/** The default, lax policy which doesn't catch anything. */
public static final VmPolicy LAX = new VmPolicy(0, EMPTY_CLASS_LIMIT_MAP, null, null);
+ @UnsupportedAppUsage
final int mask;
final OnVmViolationListener mListener;
final Executor mCallbackExecutor;
@@ -783,6 +786,7 @@
* </pre>
*/
public static final class Builder {
+ @UnsupportedAppUsage
private int mMask;
private OnVmViolationListener mListener;
private Executor mExecutor;
@@ -1173,6 +1177,7 @@
* @return the bitmask of all the DETECT_* and PENALTY_* bits currently enabled
* @hide
*/
+ @UnsupportedAppUsage
public static int getThreadPolicyMask() {
return BlockGuard.getThreadPolicy().getPolicyMask();
}
@@ -1372,6 +1377,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static void enableDeathOnFileUriExposure() {
sVmPolicy =
new VmPolicy(
@@ -1389,6 +1395,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static void disableDeathOnFileUriExposure() {
sVmPolicy =
new VmPolicy(
@@ -1426,6 +1433,7 @@
}
}
+ @UnsupportedAppUsage
private static final ThreadLocal<ArrayList<ViolationInfo>> violationsBeingTimed =
new ThreadLocal<ArrayList<ViolationInfo>>() {
@Override
@@ -1840,6 +1848,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public static void conditionallyCheckInstanceCounts() {
VmPolicy policy = getVmPolicy();
int policySize = policy.classInstanceLimit.size();
@@ -1996,6 +2005,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public static void onWebViewMethodCalledOnWrongThread(Throwable originStack) {
onVmPolicyViolation(new WebViewMethodCalledOnWrongThreadViolation(originStack));
}
@@ -2063,6 +2073,7 @@
}
// Map from VM violation fingerprint to uptime millis.
+ @UnsupportedAppUsage
private static final HashMap<Integer, Long> sLastVmViolationTime = new HashMap<>();
/** @hide */
@@ -2188,6 +2199,7 @@
* Binder for its current (native) thread-local policy value and synchronize it to libcore's
* (Java) thread-local policy value.
*/
+ @UnsupportedAppUsage
private static void onBinderStrictModePolicyChange(int newPolicy) {
setBlockGuardPolicy(newPolicy);
}
@@ -2224,6 +2236,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public void finish() {
ThreadSpanState state = mContainerState;
synchronized (state) {
@@ -2295,6 +2308,7 @@
}
};
+ @UnsupportedAppUsage
private static Singleton<IWindowManager> sWindowManager =
new Singleton<IWindowManager>() {
protected IWindowManager create() {
@@ -2315,6 +2329,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static Span enterCriticalSpan(String name) {
if (Build.IS_USER) {
return NO_OP_SPAN;
@@ -2424,6 +2439,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public static void incrementExpectedActivityCount(Class klass) {
if (klass == null) {
return;
diff --git a/core/java/android/os/SystemClock.java b/core/java/android/os/SystemClock.java
index b254166..e695a1b 100644
--- a/core/java/android/os/SystemClock.java
+++ b/core/java/android/os/SystemClock.java
@@ -17,6 +17,7 @@
package android.os;
import android.annotation.NonNull;
+import android.annotation.UnsupportedAppUsage;
import android.app.IAlarmManager;
import android.content.Context;
import android.util.Slog;
@@ -104,6 +105,7 @@
/**
* This class is uninstantiable.
*/
+ @UnsupportedAppUsage
private SystemClock() {
// This space intentionally left blank.
}
@@ -241,6 +243,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
@CriticalNative
public static native long currentThreadTimeMicro();
@@ -251,6 +254,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
@CriticalNative
public static native long currentTimeMicro();
diff --git a/core/java/android/os/SystemProperties.java b/core/java/android/os/SystemProperties.java
index 7d3ba6a..abb47b4 100644
--- a/core/java/android/os/SystemProperties.java
+++ b/core/java/android/os/SystemProperties.java
@@ -20,6 +20,7 @@
import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.annotation.TestApi;
+import android.annotation.UnsupportedAppUsage;
import android.util.Log;
import android.util.MutableInt;
@@ -46,11 +47,13 @@
* uses reflection to read this whenever text is selected (http://b/36095274).
* @hide
*/
+ @UnsupportedAppUsage
public static final int PROP_NAME_MAX = Integer.MAX_VALUE;
/** @hide */
public static final int PROP_VALUE_MAX = 91;
+ @UnsupportedAppUsage
@GuardedBy("sChangeCallbacks")
private static final ArrayList<Runnable> sChangeCallbacks = new ArrayList<Runnable>();
@@ -78,9 +81,11 @@
}
}
+ @UnsupportedAppUsage
private static native String native_get(String key);
private static native String native_get(String key, String def);
private static native int native_get_int(String key, int def);
+ @UnsupportedAppUsage
private static native long native_get_long(String key, long def);
private static native boolean native_get_boolean(String key, boolean def);
private static native void native_set(String key, String def);
@@ -174,6 +179,7 @@
* @throws IllegalArgumentException if the {@code val} exceeds 91 characters
* @hide
*/
+ @UnsupportedAppUsage
public static void set(@NonNull String key, @Nullable String val) {
if (val != null && !val.startsWith("ro.") && val.length() > PROP_VALUE_MAX) {
throw new IllegalArgumentException("value of system property '" + key
@@ -190,6 +196,7 @@
* changes.
* @hide
*/
+ @UnsupportedAppUsage
public static void addChangeCallback(@NonNull Runnable callback) {
synchronized (sChangeCallbacks) {
if (sChangeCallbacks.size() == 0) {
@@ -222,10 +229,12 @@
* Notifies listeners that a system property has changed
* @hide
*/
+ @UnsupportedAppUsage
public static void reportSyspropChanged() {
native_report_sysprop_change();
}
+ @UnsupportedAppUsage
private SystemProperties() {
}
}
diff --git a/core/java/android/os/SystemService.java b/core/java/android/os/SystemService.java
index 41e7546..968c761 100644
--- a/core/java/android/os/SystemService.java
+++ b/core/java/android/os/SystemService.java
@@ -18,6 +18,7 @@
import com.google.android.collect.Maps;
+import android.annotation.UnsupportedAppUsage;
import java.util.HashMap;
import java.util.concurrent.TimeoutException;
@@ -58,11 +59,13 @@
}
/** Request that the init daemon start a named service. */
+ @UnsupportedAppUsage
public static void start(String name) {
SystemProperties.set("ctl.start", name);
}
/** Request that the init daemon stop a named service. */
+ @UnsupportedAppUsage
public static void stop(String name) {
SystemProperties.set("ctl.stop", name);
}
diff --git a/core/java/android/os/SystemVibrator.java b/core/java/android/os/SystemVibrator.java
index f776c17..c5c1139 100644
--- a/core/java/android/os/SystemVibrator.java
+++ b/core/java/android/os/SystemVibrator.java
@@ -16,6 +16,7 @@
package android.os;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.media.AudioAttributes;
import android.util.Log;
@@ -31,10 +32,12 @@
private final IVibratorService mService;
private final Binder mToken = new Binder();
+ @UnsupportedAppUsage
public SystemVibrator() {
mService = IVibratorService.Stub.asInterface(ServiceManager.getService("vibrator"));
}
+ @UnsupportedAppUsage
public SystemVibrator(Context context) {
super(context);
mService = IVibratorService.Stub.asInterface(ServiceManager.getService("vibrator"));
diff --git a/core/java/android/os/Trace.java b/core/java/android/os/Trace.java
index 583f060..38e6842 100644
--- a/core/java/android/os/Trace.java
+++ b/core/java/android/os/Trace.java
@@ -18,6 +18,7 @@
import com.android.internal.os.Zygote;
+import android.annotation.UnsupportedAppUsage;
import dalvik.annotation.optimization.FastNative;
/**
@@ -50,6 +51,7 @@
/** @hide */
public static final long TRACE_TAG_INPUT = 1L << 2;
/** @hide */
+ @UnsupportedAppUsage
public static final long TRACE_TAG_VIEW = 1L << 3;
/** @hide */
public static final long TRACE_TAG_WEBVIEW = 1L << 4;
@@ -68,6 +70,7 @@
/** @hide */
public static final long TRACE_TAG_HAL = 1L << 11;
/** @hide */
+ @UnsupportedAppUsage
public static final long TRACE_TAG_APP = 1L << 12;
/** @hide */
public static final long TRACE_TAG_RESOURCES = 1L << 13;
@@ -100,10 +103,12 @@
private static final int MAX_SECTION_NAME_LEN = 127;
// Must be volatile to avoid word tearing.
+ @UnsupportedAppUsage
private static volatile long sEnabledTags = TRACE_TAG_NOT_READY;
private static int sZygoteDebugFlags = 0;
+ @UnsupportedAppUsage
private static native long nativeGetEnabledTags();
private static native void nativeSetAppTracingAllowed(boolean allowed);
private static native void nativeSetTracingEnabled(boolean allowed);
@@ -167,6 +172,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static boolean isTagEnabled(long traceTag) {
long tags = sEnabledTags;
if (tags == TRACE_TAG_NOT_READY) {
@@ -184,6 +190,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static void traceCounter(long traceTag, String counterName, int counterValue) {
if (isTagEnabled(traceTag)) {
nativeTraceCounter(traceTag, counterName, counterValue);
@@ -196,6 +203,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static void setAppTracingAllowed(boolean allowed) {
nativeSetAppTracingAllowed(allowed);
@@ -231,6 +239,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static void traceBegin(long traceTag, String methodName) {
if (isTagEnabled(traceTag)) {
nativeTraceBegin(traceTag, methodName);
@@ -245,6 +254,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static void traceEnd(long traceTag) {
if (isTagEnabled(traceTag)) {
nativeTraceEnd(traceTag);
@@ -264,6 +274,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static void asyncTraceBegin(long traceTag, String methodName, int cookie) {
if (isTagEnabled(traceTag)) {
nativeAsyncTraceBegin(traceTag, methodName, cookie);
@@ -281,6 +292,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static void asyncTraceEnd(long traceTag, String methodName, int cookie) {
if (isTagEnabled(traceTag)) {
nativeAsyncTraceEnd(traceTag, methodName, cookie);
diff --git a/core/java/android/os/UEventObserver.java b/core/java/android/os/UEventObserver.java
index 69a3922..dc98c42 100644
--- a/core/java/android/os/UEventObserver.java
+++ b/core/java/android/os/UEventObserver.java
@@ -16,6 +16,7 @@
package android.os;
+import android.annotation.UnsupportedAppUsage;
import android.util.Log;
import java.util.ArrayList;
@@ -49,6 +50,7 @@
private static native void nativeAddMatch(String match);
private static native void nativeRemoveMatch(String match);
+ @UnsupportedAppUsage
public UEventObserver() {
}
@@ -93,6 +95,7 @@
* are expensive to parse. For example, some devices may send one netlink message
* for each vsync period.
*/
+ @UnsupportedAppUsage
public final void startObserving(String match) {
if (match == null || match.isEmpty()) {
throw new IllegalArgumentException("match substring must be non-empty");
@@ -107,6 +110,7 @@
* This process's UEvent thread will never call onUEvent() on this
* UEventObserver after this call. Repeated calls have no effect.
*/
+ @UnsupportedAppUsage
public final void stopObserving() {
final UEventThread t = peekThread();
if (t != null) {
@@ -118,6 +122,7 @@
* Subclasses of UEventObserver should override this method to handle
* UEvents.
*/
+ @UnsupportedAppUsage
public abstract void onUEvent(UEvent event);
/**
@@ -146,10 +151,12 @@
}
}
+ @UnsupportedAppUsage
public String get(String key) {
return mMap.get(key);
}
+ @UnsupportedAppUsage
public String get(String key, String defaultValue) {
String result = mMap.get(key);
return (result == null ? defaultValue : result);
diff --git a/core/java/android/os/UpdateLock.java b/core/java/android/os/UpdateLock.java
index 4060326..ea273ce 100644
--- a/core/java/android/os/UpdateLock.java
+++ b/core/java/android/os/UpdateLock.java
@@ -16,6 +16,7 @@
package android.os;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.util.Log;
@@ -50,6 +51,7 @@
* locker releases theirs. The broadcast is sticky but is sent only to
* registered receivers.
*/
+ @UnsupportedAppUsage
public static final String UPDATE_LOCK_CHANGED = "android.os.UpdateLock.UPDATE_LOCK_CHANGED";
/**
@@ -58,6 +60,7 @@
* update operation. True means that updates are okay right now; false indicates
* that perhaps later would be a better time.
*/
+ @UnsupportedAppUsage
public static final String NOW_IS_CONVENIENT = "nowisconvenient";
/**
@@ -66,6 +69,7 @@
* in the System.currentTimeMillis() time base, which may be non-monotonic especially
* around reboots.
*/
+ @UnsupportedAppUsage
public static final String TIMESTAMP = "timestamp";
/**
@@ -90,6 +94,7 @@
/**
* Is this lock currently held?
*/
+ @UnsupportedAppUsage
public boolean isHeld() {
synchronized (mToken) {
return mHeld;
@@ -99,6 +104,7 @@
/**
* Acquire an update lock.
*/
+ @UnsupportedAppUsage
public void acquire() {
if (DEBUG) {
Log.v(TAG, "acquire() : " + this, new RuntimeException("here"));
@@ -125,6 +131,7 @@
/**
* Release this update lock.
*/
+ @UnsupportedAppUsage
public void release() {
if (DEBUG) Log.v(TAG, "release() : " + this, new RuntimeException("here"));
checkService();
diff --git a/core/java/android/os/UserHandle.java b/core/java/android/os/UserHandle.java
index de41ce2..1a2b971 100644
--- a/core/java/android/os/UserHandle.java
+++ b/core/java/android/os/UserHandle.java
@@ -19,6 +19,7 @@
import android.annotation.AppIdInt;
import android.annotation.SystemApi;
import android.annotation.TestApi;
+import android.annotation.UnsupportedAppUsage;
import android.annotation.UserIdInt;
import java.io.PrintWriter;
@@ -32,9 +33,11 @@
/**
* @hide Range of uids allocated for a user.
*/
+ @UnsupportedAppUsage
public static final int PER_USER_RANGE = 100000;
/** @hide A user id to indicate all users on the device */
+ @UnsupportedAppUsage
public static final @UserIdInt int USER_ALL = -1;
/** @hide A user handle to indicate all users on the device */
@@ -43,6 +46,7 @@
public static final UserHandle ALL = new UserHandle(USER_ALL);
/** @hide A user id to indicate the currently active user */
+ @UnsupportedAppUsage
public static final @UserIdInt int USER_CURRENT = -2;
/** @hide A user handle to indicate the current user of the device */
@@ -53,14 +57,17 @@
/** @hide A user id to indicate that we would like to send to the current
* user, but if this is calling from a user process then we will send it
* to the caller's user instead of failing with a security exception */
+ @UnsupportedAppUsage
public static final @UserIdInt int USER_CURRENT_OR_SELF = -3;
/** @hide A user handle to indicate that we would like to send to the current
* user, but if this is calling from a user process then we will send it
* to the caller's user instead of failing with a security exception */
+ @UnsupportedAppUsage
public static final UserHandle CURRENT_OR_SELF = new UserHandle(USER_CURRENT_OR_SELF);
/** @hide An undefined user id */
+ @UnsupportedAppUsage
public static final @UserIdInt int USER_NULL = -10000;
/**
@@ -68,6 +75,7 @@
* @deprecated Consider using either {@link UserHandle#USER_SYSTEM} constant or
* check the target user's flag {@link android.content.pm.UserInfo#isAdmin}.
*/
+ @UnsupportedAppUsage
@Deprecated
public static final @UserIdInt int USER_OWNER = 0;
@@ -76,13 +84,16 @@
* @deprecated Consider using either {@link UserHandle#SYSTEM} constant or
* check the target user's flag {@link android.content.pm.UserInfo#isAdmin}.
*/
+ @UnsupportedAppUsage
@Deprecated
public static final UserHandle OWNER = new UserHandle(USER_OWNER);
/** @hide A user id constant to indicate the "system" user of the device */
+ @UnsupportedAppUsage
public static final @UserIdInt int USER_SYSTEM = 0;
/** @hide A user serial constant to indicate the "system" user of the device */
+ @UnsupportedAppUsage
public static final int USER_SERIAL_SYSTEM = 0;
/** @hide A user handle to indicate the "system" user of the device */
@@ -94,21 +105,29 @@
* @hide Enable multi-user related side effects. Set this to false if
* there are problems with single user use-cases.
*/
+ @UnsupportedAppUsage
public static final boolean MU_ENABLED = true;
/** @hide */
+ @UnsupportedAppUsage
public static final int ERR_GID = -1;
/** @hide */
+ @UnsupportedAppUsage
public static final int AID_ROOT = android.os.Process.ROOT_UID;
/** @hide */
+ @UnsupportedAppUsage
public static final int AID_APP_START = android.os.Process.FIRST_APPLICATION_UID;
/** @hide */
+ @UnsupportedAppUsage
public static final int AID_APP_END = android.os.Process.LAST_APPLICATION_UID;
/** @hide */
+ @UnsupportedAppUsage
public static final int AID_SHARED_GID_START = android.os.Process.FIRST_SHARED_APPLICATION_GID;
/** @hide */
+ @UnsupportedAppUsage
public static final int AID_CACHE_GID_START = android.os.Process.FIRST_APPLICATION_CACHE_GID;
+ @UnsupportedAppUsage
final int mHandle;
/**
@@ -128,6 +147,7 @@
* @return whether the appId is the same for both uids
* @hide
*/
+ @UnsupportedAppUsage
public static boolean isSameApp(int uid1, int uid2) {
return getAppId(uid1) == getAppId(uid2);
}
@@ -136,6 +156,7 @@
* Whether a UID is an "isolated" UID.
* @hide
*/
+ @UnsupportedAppUsage
public static boolean isIsolated(int uid) {
if (uid > 0) {
final int appId = getAppId(uid);
@@ -150,6 +171,7 @@
* "it's system", because of isolated UIDs. Use {@link #isCore} for that.
* @hide
*/
+ @UnsupportedAppUsage
public static boolean isApp(int uid) {
if (uid > 0) {
final int appId = getAppId(uid);
@@ -185,6 +207,7 @@
* Returns the user id for a given uid.
* @hide
*/
+ @UnsupportedAppUsage
public static @UserIdInt int getUserId(int uid) {
if (MU_ENABLED) {
return uid / PER_USER_RANGE;
@@ -194,6 +217,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public static @UserIdInt int getCallingUserId() {
return getUserId(Binder.getCallingUid());
}
@@ -213,6 +237,7 @@
* Returns the uid that is composed from the userId and the appId.
* @hide
*/
+ @UnsupportedAppUsage
public static int getUid(@UserIdInt int userId, @AppIdInt int appId) {
if (MU_ENABLED) {
return userId * PER_USER_RANGE + (appId % PER_USER_RANGE);
@@ -259,6 +284,7 @@
* Returns the app id for a given shared app gid. Returns -1 if the ID is invalid.
* @hide
*/
+ @UnsupportedAppUsage
public static @AppIdInt int getAppIdFromSharedAppGid(int gid) {
final int appId = getAppId(gid) + Process.FIRST_APPLICATION_UID
- Process.FIRST_SHARED_APPLICATION_GID;
@@ -394,6 +420,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public UserHandle(int h) {
mHandle = h;
}
diff --git a/core/java/android/os/UserManager.java b/core/java/android/os/UserManager.java
index b591851..3edd06b 100644
--- a/core/java/android/os/UserManager.java
+++ b/core/java/android/os/UserManager.java
@@ -25,6 +25,7 @@
import android.annotation.SystemApi;
import android.annotation.SystemService;
import android.annotation.TestApi;
+import android.annotation.UnsupportedAppUsage;
import android.annotation.UserIdInt;
import android.annotation.WorkerThread;
import android.app.Activity;
@@ -69,6 +70,7 @@
public class UserManager {
private static final String TAG = "UserManager";
+ @UnsupportedAppUsage
private final IUserManager mService;
private final Context mContext;
@@ -781,6 +783,7 @@
* @see #getUserRestrictions()
* @hide
*/
+ @UnsupportedAppUsage
public static final String DISALLOW_RECORD_AUDIO = "no_record_audio";
/**
@@ -1123,6 +1126,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public static UserManager get(Context context) {
return (UserManager) context.getSystemService(Context.USER_SERVICE);
}
@@ -1188,6 +1192,7 @@
* @return the user handle of this process.
* @hide
*/
+ @UnsupportedAppUsage
public @UserIdInt int getUserHandle() {
return UserHandle.myUserId();
}
@@ -1259,6 +1264,7 @@
* Returns whether the caller is running as an admin user. There can be more than one admin
* user.
*/
+ @UnsupportedAppUsage
public boolean isAdminUser() {
return isUserAdmin(UserHandle.myUserId());
}
@@ -1268,6 +1274,7 @@
* Returns whether the provided user is an admin user. There can be more than one admin
* user.
*/
+ @UnsupportedAppUsage
public boolean isUserAdmin(@UserIdInt int userId) {
UserInfo user = getUserInfo(userId);
return user != null && user.isAdmin();
@@ -1277,6 +1284,7 @@
* @hide
* @deprecated Use {@link #isRestrictedProfile()}
*/
+ @UnsupportedAppUsage
@Deprecated
public boolean isLinkedUser() {
return isRestrictedProfile();
@@ -1328,6 +1336,7 @@
* @return whether user is a guest user.
* @hide
*/
+ @UnsupportedAppUsage
public boolean isGuestUser(int id) {
UserInfo user = getUserInfo(id);
return user != null && user.isGuest();
@@ -1534,6 +1543,7 @@
}
/** {@hide} */
+ @UnsupportedAppUsage
public boolean isUserUnlocked(@UserIdInt int userId) {
try {
return mService.isUserUnlocked(userId);
@@ -1562,6 +1572,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public long getUserStartRealtime() {
try {
return mService.getUserStartRealtime();
@@ -1576,6 +1587,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public long getUserUnlockRealtime() {
try {
return mService.getUserUnlockRealtime();
@@ -1591,6 +1603,7 @@
* @return the UserInfo object for a specific user.
* @hide
*/
+ @UnsupportedAppUsage
public UserInfo getUserInfo(@UserIdInt int userHandle) {
try {
return mService.getUserInfo(userHandle);
@@ -1670,6 +1683,7 @@
* @param restrictionKey the string key representing the restriction
* @param userHandle the UserHandle of the user for whom to retrieve the restrictions.
*/
+ @UnsupportedAppUsage
public boolean hasBaseUserRestriction(String restrictionKey, UserHandle userHandle) {
try {
return mService.hasBaseUserRestriction(restrictionKey, userHandle.getIdentifier());
@@ -1752,6 +1766,7 @@
* @param restrictionKey the string key representing the restriction
* @param userHandle the UserHandle of the user for whom to retrieve the restrictions.
*/
+ @UnsupportedAppUsage
public boolean hasUserRestriction(String restrictionKey, UserHandle userHandle) {
try {
return mService.hasUserRestriction(restrictionKey,
@@ -1812,6 +1827,7 @@
* @return the UserInfo object for the created user, or null if the user could not be created.
* @hide
*/
+ @UnsupportedAppUsage
public UserInfo createUser(String name, int flags) {
UserInfo user = null;
try {
@@ -1860,6 +1876,7 @@
* could not be created.
* @hide
*/
+ @UnsupportedAppUsage
public UserInfo createProfileForUser(String name, int flags, @UserIdInt int userHandle) {
return createProfileForUser(name, flags, userHandle, null);
}
@@ -2148,6 +2165,7 @@
* @return the list of users that exist on the device.
* @hide
*/
+ @UnsupportedAppUsage
public List<UserInfo> getUsers() {
try {
return mService.getUsers(false);
@@ -2273,6 +2291,7 @@
* @return the list of profiles.
* @hide
*/
+ @UnsupportedAppUsage
public List<UserInfo> getProfiles(@UserIdInt int userHandle) {
try {
return mService.getProfiles(userHandle, false /* enabledOnly */);
@@ -2306,6 +2325,7 @@
* @return the list of profiles.
* @hide
*/
+ @UnsupportedAppUsage
public List<UserInfo> getEnabledProfiles(@UserIdInt int userHandle) {
try {
return mService.getProfiles(userHandle, true /* enabledOnly */);
@@ -2351,6 +2371,7 @@
* @see #getProfileIds(int, boolean)
* @hide
*/
+ @UnsupportedAppUsage
public int[] getProfileIdsWithDisabled(@UserIdInt int userId) {
return getProfileIds(userId, false /* enabledOnly */);
}
@@ -2384,6 +2405,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public UserInfo getProfileParent(@UserIdInt int userHandle) {
try {
return mService.getProfileParent(userHandle);
@@ -2532,6 +2554,7 @@
* @return the list of users that were created.
* @hide
*/
+ @UnsupportedAppUsage
public @NonNull List<UserInfo> getUsers(boolean excludeDying) {
try {
return mService.getUsers(excludeDying);
@@ -2546,6 +2569,7 @@
* @param userHandle the integer handle of the user, where 0 is the primary user.
* @hide
*/
+ @UnsupportedAppUsage
public boolean removeUser(@UserIdInt int userHandle) {
try {
return mService.removeUser(userHandle);
@@ -2607,6 +2631,7 @@
* @see com.android.internal.util.UserIcons#getDefaultUserIcon for a default.
* @hide
*/
+ @UnsupportedAppUsage
public Bitmap getUserIcon(@UserIdInt int userHandle) {
try {
ParcelFileDescriptor fd = mService.getUserIcon(userHandle);
@@ -2632,6 +2657,7 @@
* @hide
* @return a value greater than or equal to 1
*/
+ @UnsupportedAppUsage
public static int getMaxSupportedUsers() {
// Don't allow multiple users on certain builds
if (android.os.Build.ID.startsWith("JVP")) return 1;
@@ -2681,6 +2707,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public static boolean isDeviceInDemoMode(Context context) {
return Settings.Global.getInt(context.getContentResolver(),
Settings.Global.DEVICE_DEMO_MODE, 0) > 0;
@@ -2693,6 +2720,7 @@
* @return a serial number associated with that user, or -1 if the userHandle is not valid.
* @hide
*/
+ @UnsupportedAppUsage
public int getUserSerialNumber(@UserIdInt int userHandle) {
try {
return mService.getUserSerialNumber(userHandle);
@@ -2710,6 +2738,7 @@
* is not valid.
* @hide
*/
+ @UnsupportedAppUsage
public @UserIdInt int getUserHandle(int userSerialNumber) {
try {
return mService.getUserHandle(userSerialNumber);
diff --git a/core/java/android/os/Vibrator.java b/core/java/android/os/Vibrator.java
index d2d8f1e..0e92e35 100644
--- a/core/java/android/os/Vibrator.java
+++ b/core/java/android/os/Vibrator.java
@@ -19,6 +19,7 @@
import android.annotation.IntDef;
import android.annotation.RequiresPermission;
import android.annotation.SystemService;
+import android.annotation.UnsupportedAppUsage;
import android.app.ActivityThread;
import android.content.Context;
import android.media.AudioAttributes;
@@ -82,6 +83,7 @@
/**
* @hide to prevent subclassing from outside of the framework
*/
+ @UnsupportedAppUsage
public Vibrator() {
mPackageName = ActivityThread.currentPackageName();
final Context ctx = ActivityThread.currentActivityThread().getSystemContext();
diff --git a/core/java/android/os/VintfObject.java b/core/java/android/os/VintfObject.java
index fb22194..c63dc05 100644
--- a/core/java/android/os/VintfObject.java
+++ b/core/java/android/os/VintfObject.java
@@ -16,6 +16,7 @@
package android.os;
+import android.annotation.UnsupportedAppUsage;
import java.util.Map;
@@ -33,6 +34,7 @@
* If any error in getting one of the manifests, it is not included in
* the list.
*/
+ @UnsupportedAppUsage
public static native String[] report();
/**
@@ -66,11 +68,13 @@
* ["android.hidl.manager@1.0", "android.hardware.camera.device@1.0",
* "android.hardware.camera.device@3.2"]. There are no duplicates.
*/
+ @UnsupportedAppUsage
public static native String[] getHalNamesAndVersions();
/**
* @return the BOARD_SEPOLICY_VERS build flag available in device manifest.
*/
+ @UnsupportedAppUsage
public static native String getSepolicyVersion();
/**
@@ -79,6 +83,7 @@
* [("27", ["libjpeg.so", "libbase.so"]),
* ("28", ["libjpeg.so", "libbase.so"])]
*/
+ @UnsupportedAppUsage
public static native Map<String, String[]> getVndkSnapshots();
/**
@@ -86,5 +91,6 @@
* indicating the FCM version that the device manifest implements. Null if
* device manifest doesn't specify this number (for legacy devices).
*/
+ @UnsupportedAppUsage
public static native Long getTargetFrameworkCompatibilityMatrixVersion();
}
diff --git a/core/java/android/os/VintfRuntimeInfo.java b/core/java/android/os/VintfRuntimeInfo.java
index 29698b9..77e61bc 100644
--- a/core/java/android/os/VintfRuntimeInfo.java
+++ b/core/java/android/os/VintfRuntimeInfo.java
@@ -16,6 +16,8 @@
package android.os;
+import android.annotation.UnsupportedAppUsage;
+
/**
* Java API for ::android::vintf::RuntimeInfo. Methods return null / 0 on any error.
*
@@ -32,31 +34,38 @@
/**
* @return content of /proc/cpuinfo
*/
+ @UnsupportedAppUsage
public static native String getCpuInfo();
/**
* @return os name extracted from uname() native call
*/
+ @UnsupportedAppUsage
public static native String getOsName();
/**
* @return node name extracted from uname() native call
*/
+ @UnsupportedAppUsage
public static native String getNodeName();
/**
* @return os release extracted from uname() native call
*/
+ @UnsupportedAppUsage
public static native String getOsRelease();
/**
* @return os version extracted from uname() native call
*/
+ @UnsupportedAppUsage
public static native String getOsVersion();
/**
* @return hardware id extracted from uname() native call
*/
+ @UnsupportedAppUsage
public static native String getHardwareId();
/**
* @return kernel version extracted from uname() native call. Format is
* {@code x.y.z}.
*/
+ @UnsupportedAppUsage
public static native String getKernelVersion();
/**
* @return libavb version in OS. Format is {@code x.y}.
diff --git a/core/java/android/os/WorkSource.java b/core/java/android/os/WorkSource.java
index 3270719..43f579d 100644
--- a/core/java/android/os/WorkSource.java
+++ b/core/java/android/os/WorkSource.java
@@ -2,6 +2,7 @@
import android.annotation.Nullable;
import android.annotation.SystemApi;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.os.WorkSourceProto;
import android.provider.Settings;
@@ -23,8 +24,11 @@
static final String TAG = "WorkSource";
static final boolean DEBUG = false;
+ @UnsupportedAppUsage
int mNum;
+ @UnsupportedAppUsage
int[] mUids;
+ @UnsupportedAppUsage
String[] mNames;
private ArrayList<WorkChain> mChains;
@@ -83,6 +87,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public WorkSource(int uid) {
mNum = 1;
mUids = new int[] { uid, 0 };
@@ -101,6 +106,7 @@
mChains = null;
}
+ @UnsupportedAppUsage
WorkSource(Parcel in) {
mNum = in.readInt();
mUids = in.createIntArray();
@@ -127,16 +133,19 @@
}
/** @hide */
+ @UnsupportedAppUsage
public int size() {
return mNum;
}
/** @hide */
+ @UnsupportedAppUsage
public int get(int index) {
return mUids[index];
}
/** @hide */
+ @UnsupportedAppUsage
public String getName(int index) {
return mNames != null ? mNames[index] : null;
}
@@ -327,6 +336,7 @@
* @deprecated for internal use only. WorkSources are opaque and no external callers should need
* to be aware of internal differences.
*/
+ @UnsupportedAppUsage
@Deprecated
public WorkSource[] setReturningDiffs(WorkSource other) {
synchronized (sTmpWorkSource) {
@@ -378,6 +388,7 @@
* @hide
* @deprecated meant for unit testing use only. Will be removed in a future API revision.
*/
+ @UnsupportedAppUsage
@Deprecated
public WorkSource addReturningNewbs(WorkSource other) {
synchronized (sTmpWorkSource) {
@@ -388,6 +399,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public boolean add(int uid) {
if (mNum <= 0) {
mNames = null;
@@ -407,6 +419,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public boolean add(int uid, String name) {
if (mNum <= 0) {
insert(0, uid, name);
diff --git a/core/java/android/os/ZygoteProcess.java b/core/java/android/os/ZygoteProcess.java
index 66ace2d..e8f4641 100644
--- a/core/java/android/os/ZygoteProcess.java
+++ b/core/java/android/os/ZygoteProcess.java
@@ -16,6 +16,7 @@
package android.os;
+import android.annotation.UnsupportedAppUsage;
import android.net.LocalSocket;
import android.net.LocalSocketAddress;
import android.util.Log;
@@ -37,10 +38,12 @@
import java.util.UUID;
/*package*/ class ZygoteStartFailedEx extends Exception {
+ @UnsupportedAppUsage
ZygoteStartFailedEx(String s) {
super(s);
}
+ @UnsupportedAppUsage
ZygoteStartFailedEx(Throwable cause) {
super(cause);
}
diff --git a/core/java/android/service/euicc/EuiccService.java b/core/java/android/service/euicc/EuiccService.java
index 4f321dc..4564d3a 100644
--- a/core/java/android/service/euicc/EuiccService.java
+++ b/core/java/android/service/euicc/EuiccService.java
@@ -106,15 +106,27 @@
public static final String ACTION_PROVISION_EMBEDDED_SUBSCRIPTION =
"android.service.euicc.action.PROVISION_EMBEDDED_SUBSCRIPTION";
- /** @see android.telephony.euicc.EuiccManager#ACTION_TOGGLE_SUBSCRIPTION_PRIVILEGED */
+ /**
+ * @see android.telephony.euicc.EuiccManager#ACTION_TOGGLE_SUBSCRIPTION_PRIVILEGED. This is
+ * a protected intent that can only be sent by the system, and requires the
+ * {@link android.Manifest.permission#BIND_EUICC_SERVICE} permission.
+ */
public static final String ACTION_TOGGLE_SUBSCRIPTION_PRIVILEGED =
"android.service.euicc.action.TOGGLE_SUBSCRIPTION_PRIVILEGED";
- /** @see android.telephony.euicc.EuiccManager#ACTION_DELETE_SUBSCRIPTION_PRIVILEGED */
+ /**
+ * @see android.telephony.euicc.EuiccManager#ACTION_DELETE_SUBSCRIPTION_PRIVILEGED. This is
+ * a protected intent that can only be sent by the system, and requires the
+ * {@link android.Manifest.permission#BIND_EUICC_SERVICE} permission.
+ */
public static final String ACTION_DELETE_SUBSCRIPTION_PRIVILEGED =
"android.service.euicc.action.DELETE_SUBSCRIPTION_PRIVILEGED";
- /** @see android.telephony.euicc.EuiccManager#ACTION_RENAME_SUBSCRIPTION_PRIVILEGED */
+ /**
+ * @see android.telephony.euicc.EuiccManager#ACTION_RENAME_SUBSCRIPTION_PRIVILEGED. This is
+ * a protected intent that can only be sent by the system, and requires the
+ * {@link android.Manifest.permission#BIND_EUICC_SERVICE} permission.
+ */
public static final String ACTION_RENAME_SUBSCRIPTION_PRIVILEGED =
"android.service.euicc.action.RENAME_SUBSCRIPTION_PRIVILEGED";
diff --git a/core/java/android/service/euicc/GetEuiccProfileInfoListResult.java b/core/java/android/service/euicc/GetEuiccProfileInfoListResult.java
index 464d136..9f2b522 100644
--- a/core/java/android/service/euicc/GetEuiccProfileInfoListResult.java
+++ b/core/java/android/service/euicc/GetEuiccProfileInfoListResult.java
@@ -97,9 +97,10 @@
if (this.result == EuiccService.RESULT_OK) {
this.mProfiles = profiles;
} else {
- if (profiles != null) {
+ // For error case, profiles is either null or 0 size.
+ if (profiles != null && profiles.length > 0) {
throw new IllegalArgumentException(
- "Error result with non-null profiles: " + result);
+ "Error result with non-empty profiles: " + result);
}
this.mProfiles = null;
}
diff --git a/core/java/com/android/internal/os/ZygoteInit.java b/core/java/com/android/internal/os/ZygoteInit.java
index e132abd..c630351 100644
--- a/core/java/com/android/internal/os/ZygoteInit.java
+++ b/core/java/com/android/internal/os/ZygoteInit.java
@@ -125,6 +125,12 @@
private static boolean sPreloadComplete;
+ /**
+ * Cached classloader to use for the system server. Will only be populated in the system
+ * server process.
+ */
+ private static ClassLoader sCachedSystemServerClassLoader = null;
+
static void preload(TimingsTraceLog bootTimingsTraceLog) {
Log.d(TAG, "begin preload");
bootTimingsTraceLog.traceBegin("BeginPreload");
@@ -446,7 +452,13 @@
final String systemServerClasspath = Os.getenv("SYSTEMSERVERCLASSPATH");
if (systemServerClasspath != null) {
- performSystemServerDexOpt(systemServerClasspath);
+ if (performSystemServerDexOpt(systemServerClasspath)) {
+ // Throw away the cached classloader. If we compiled here, the classloader would
+ // not have had AoT-ed artifacts.
+ // Note: This only works in a very special environment where selinux enforcement is
+ // disabled, e.g., Mac builds.
+ sCachedSystemServerClassLoader = null;
+ }
// Capturing profiles is only supported for debug or eng builds since selinux normally
// prevents it.
boolean profileSystemServer = SystemProperties.getBoolean(
@@ -479,10 +491,9 @@
throw new IllegalStateException("Unexpected return from WrapperInit.execApplication");
} else {
- ClassLoader cl = null;
- if (systemServerClasspath != null) {
- cl = createPathClassLoader(systemServerClasspath, parsedArgs.mTargetSdkVersion);
-
+ createSystemServerClassLoader();
+ ClassLoader cl = sCachedSystemServerClassLoader;
+ if (cl != null) {
Thread.currentThread().setContextClassLoader(cl);
}
@@ -497,6 +508,24 @@
}
/**
+ * Create the classloader for the system server and store it in
+ * {@link sCachedSystemServerClassLoader}. This function may be called through JNI in
+ * system server startup, when the runtime is in a critically low state. Do not do
+ * extended computation etc here.
+ */
+ private static void createSystemServerClassLoader() {
+ if (sCachedSystemServerClassLoader != null) {
+ return;
+ }
+ final String systemServerClasspath = Os.getenv("SYSTEMSERVERCLASSPATH");
+ // TODO: Should we run optimization here?
+ if (systemServerClasspath != null) {
+ sCachedSystemServerClassLoader = createPathClassLoader(systemServerClasspath,
+ VMRuntime.SDK_VERSION_CUR_DEVELOPMENT);
+ }
+ }
+
+ /**
* Note that preparing the profiles for system server does not require special selinux
* permissions. From the installer perspective the system server is a regular package which can
* capture profile information.
@@ -560,15 +589,16 @@
/**
* Performs dex-opt on the elements of {@code classPath}, if needed. We choose the instruction
- * set of the current runtime.
+ * set of the current runtime. If something was compiled, return true.
*/
- private static void performSystemServerDexOpt(String classPath) {
+ private static boolean performSystemServerDexOpt(String classPath) {
final String[] classPathElements = classPath.split(":");
final IInstalld installd = IInstalld.Stub
.asInterface(ServiceManager.getService("installd"));
final String instructionSet = VMRuntime.getRuntime().vmInstructionSet();
String classPathForElement = "";
+ boolean compiledSomething = false;
for (String classPathElement : classPathElements) {
// System server is fully AOTed and never profiled
// for profile guided compilation.
@@ -610,6 +640,7 @@
uuid, classLoaderContext, seInfo, false /* downgrade */,
targetSdkVersion, /*profileName*/ null, /*dexMetadataPath*/ null,
"server-dexopt");
+ compiledSomething = true;
} catch (RemoteException | ServiceSpecificException e) {
// Ignore (but log), we need this on the classpath for fallback mode.
Log.w(TAG, "Failed compiling classpath element for system server: "
@@ -620,6 +651,8 @@
classPathForElement = encodeSystemServerClassPath(
classPathForElement, classPathElement);
}
+
+ return compiledSomething;
}
/**
diff --git a/core/jni/Android.bp b/core/jni/Android.bp
index f9813fd..6024f68 100644
--- a/core/jni/Android.bp
+++ b/core/jni/Android.bp
@@ -134,7 +134,6 @@
"android/graphics/GIFMovie.cpp",
"android/graphics/GraphicBuffer.cpp",
"android/graphics/Graphics.cpp",
- "android/graphics/HarfBuzzNGFaceSkia.cpp",
"android/graphics/ImageDecoder.cpp",
"android/graphics/Interpolator.cpp",
"android/graphics/MaskFilter.cpp",
diff --git a/core/jni/AndroidRuntime.cpp b/core/jni/AndroidRuntime.cpp
index 388285a..79850d0 100644
--- a/core/jni/AndroidRuntime.cpp
+++ b/core/jni/AndroidRuntime.cpp
@@ -1112,6 +1112,12 @@
return;
}
+ const char* tzdataRootDir = getenv("ANDROID_TZDATA_ROOT");
+ if (tzdataRootDir == NULL) {
+ LOG_FATAL("No tz data directory specified with ANDROID_TZDATA_ROOT environment variable.");
+ return;
+ }
+
//const char* kernelHack = getenv("LD_ASSUME_KERNEL");
//ALOGD("Found LD_ASSUME_KERNEL='%s'\n", kernelHack);
diff --git a/core/jni/android/graphics/HarfBuzzNGFaceSkia.cpp b/core/jni/android/graphics/HarfBuzzNGFaceSkia.cpp
deleted file mode 100644
index dcb7874..0000000
--- a/core/jni/android/graphics/HarfBuzzNGFaceSkia.cpp
+++ /dev/null
@@ -1,181 +0,0 @@
-/*
- * Copyright (c) 2012 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#define LOG_TAG "TextLayoutCache"
-
-#include "HarfBuzzNGFaceSkia.h"
-
-#include <stdlib.h>
-
-#include <log/log.h>
-
-#include <SkPaint.h>
-#include <SkPath.h>
-#include <SkPoint.h>
-#include <SkRect.h>
-#include <SkTypeface.h>
-
-#include <hb.h>
-
-namespace android {
-
-static const bool kDebugGlyphs = false;
-
-// Our implementation of the callbacks which Harfbuzz requires by using Skia
-// calls. See the Harfbuzz source for references about what these callbacks do.
-
-struct HarfBuzzFontData {
- explicit HarfBuzzFontData(SkPaint* paint) : m_paint(paint) { }
- SkPaint* m_paint;
-};
-
-static void SkiaGetGlyphWidthAndExtents(SkPaint* paint, hb_codepoint_t codepoint, hb_position_t* width, hb_glyph_extents_t* extents)
-{
- ALOG_ASSERT(codepoint <= 0xFFFF);
- paint->setTextEncoding(SkPaint::kGlyphID_TextEncoding);
-
- SkScalar skWidth;
- SkRect skBounds;
- uint16_t glyph = codepoint;
-
- paint->getTextWidths(&glyph, sizeof(glyph), &skWidth, &skBounds);
- if (kDebugGlyphs) {
- ALOGD("returned glyph for %i: width = %f", codepoint, skWidth);
- }
- if (width)
- *width = SkScalarToHBFixed(skWidth);
- if (extents) {
- // Invert y-axis because Skia is y-grows-down but we set up harfbuzz to be y-grows-up.
- extents->x_bearing = SkScalarToHBFixed(skBounds.fLeft);
- extents->y_bearing = SkScalarToHBFixed(-skBounds.fTop);
- extents->width = SkScalarToHBFixed(skBounds.width());
- extents->height = SkScalarToHBFixed(-skBounds.height());
- }
-}
-
-static hb_bool_t harfbuzzGetGlyph(hb_font_t* hbFont, void* fontData, hb_codepoint_t unicode, hb_codepoint_t variationSelector, hb_codepoint_t* glyph, void* userData)
-{
- HarfBuzzFontData* hbFontData = reinterpret_cast<HarfBuzzFontData*>(fontData);
- SkPaint* paint = hbFontData->m_paint;
- paint->setTextEncoding(SkPaint::kUTF32_TextEncoding);
-
- if (unicode > 0x10ffff) {
- unicode = 0xfffd;
- }
- SkUnichar unichar = unicode;
-
- uint16_t glyph16;
- paint->textToGlyphs(&unichar, sizeof(unichar), &glyph16);
- *glyph = glyph16;
- return !!*glyph;
-}
-
-static hb_position_t harfbuzzGetGlyphHorizontalAdvance(hb_font_t* hbFont, void* fontData, hb_codepoint_t glyph, void* userData)
-{
- HarfBuzzFontData* hbFontData = reinterpret_cast<HarfBuzzFontData*>(fontData);
- hb_position_t advance = 0;
-
- SkiaGetGlyphWidthAndExtents(hbFontData->m_paint, glyph, &advance, 0);
- return advance;
-}
-
-static hb_bool_t harfbuzzGetGlyphHorizontalOrigin(hb_font_t* hbFont, void* fontData, hb_codepoint_t glyph, hb_position_t* x, hb_position_t* y, void* userData)
-{
- // Just return true, following the way that Harfbuzz-FreeType
- // implementation does.
- return true;
-}
-
-static hb_bool_t harfbuzzGetGlyphExtents(hb_font_t* hbFont, void* fontData, hb_codepoint_t glyph, hb_glyph_extents_t* extents, void* userData)
-{
- HarfBuzzFontData* hbFontData = reinterpret_cast<HarfBuzzFontData*>(fontData);
-
- SkiaGetGlyphWidthAndExtents(hbFontData->m_paint, glyph, 0, extents);
- return true;
-}
-
-static hb_font_funcs_t* harfbuzzSkiaGetFontFuncs()
-{
- static hb_font_funcs_t* harfbuzzSkiaFontFuncs = 0;
-
- // We don't set callback functions which we can't support.
- // Harfbuzz will use the fallback implementation if they aren't set.
- if (!harfbuzzSkiaFontFuncs) {
- harfbuzzSkiaFontFuncs = hb_font_funcs_create();
- hb_font_funcs_set_glyph_func(harfbuzzSkiaFontFuncs, harfbuzzGetGlyph, 0, 0);
- hb_font_funcs_set_glyph_h_advance_func(harfbuzzSkiaFontFuncs, harfbuzzGetGlyphHorizontalAdvance, 0, 0);
- hb_font_funcs_set_glyph_h_origin_func(harfbuzzSkiaFontFuncs, harfbuzzGetGlyphHorizontalOrigin, 0, 0);
- hb_font_funcs_set_glyph_extents_func(harfbuzzSkiaFontFuncs, harfbuzzGetGlyphExtents, 0, 0);
- hb_font_funcs_make_immutable(harfbuzzSkiaFontFuncs);
- }
- return harfbuzzSkiaFontFuncs;
-}
-
-hb_blob_t* harfbuzzSkiaReferenceTable(hb_face_t* face, hb_tag_t tag, void* userData)
-{
- SkTypeface* typeface = reinterpret_cast<SkTypeface*>(userData);
-
- const size_t tableSize = typeface->getTableSize(tag);
- if (!tableSize)
- return 0;
-
- char* buffer = reinterpret_cast<char*>(malloc(tableSize));
- if (!buffer)
- return 0;
- size_t actualSize = typeface->getTableData(tag, 0, tableSize, buffer);
- if (tableSize != actualSize) {
- free(buffer);
- return 0;
- }
-
- return hb_blob_create(const_cast<char*>(buffer), tableSize,
- HB_MEMORY_MODE_WRITABLE, buffer, free);
-}
-
-static void destroyHarfBuzzFontData(void* data) {
- delete (HarfBuzzFontData*)data;
-}
-
-hb_font_t* createFont(hb_face_t* face, SkPaint* paint, float sizeX, float sizeY) {
- hb_font_t* font = hb_font_create(face);
-
- // Note: this needs to be reworked when we do subpixels
- int x_ppem = floor(sizeX + 0.5);
- int y_ppem = floor(sizeY + 0.5);
- hb_font_set_ppem(font, x_ppem, y_ppem);
- hb_font_set_scale(font, HBFloatToFixed(sizeX), HBFloatToFixed(sizeY));
-
- HarfBuzzFontData* data = new HarfBuzzFontData(paint);
- hb_font_set_funcs(font, harfbuzzSkiaGetFontFuncs(), data, destroyHarfBuzzFontData);
-
- return font;
-}
-
-} // namespace android
diff --git a/core/jni/android/graphics/HarfBuzzNGFaceSkia.h b/core/jni/android/graphics/HarfBuzzNGFaceSkia.h
deleted file mode 100644
index 3308d5d..0000000
--- a/core/jni/android/graphics/HarfBuzzNGFaceSkia.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright 2011, The Android Open Source Project
- * Copyright 2011, Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef _ANDROID_GRAPHICS_HARF_BUZZ_NG_FACE_SKIA_H_
-#define _ANDROID_GRAPHICS_HARF_BUZZ_NG_FACE_SKIA_H_
-
-#include <SkScalar.h>
-#include <SkPaint.h>
-
-#include <hb.h>
-
-namespace android {
-
-static inline float
-HBFixedToFloat (hb_position_t v)
-{
- return scalbnf (v, -8);
-}
-
-static inline hb_position_t
-HBFloatToFixed (float v)
-{
- return scalbnf (v, +8);
-}
-
-static inline hb_position_t SkScalarToHBFixed(SkScalar value) {
- return HBFloatToFixed(SkScalarToFloat(value));
-}
-
-hb_blob_t* harfbuzzSkiaReferenceTable(hb_face_t* face, hb_tag_t tag, void* userData);
-
-hb_font_t* createFont(hb_face_t* face, SkPaint* paint, float sizeX, float sizeY);
-
-} // namespace android
-
-#endif // _ANDROID_GRAPHICS_HARF_BUZZ_NG_FACE_SKIA_H_
diff --git a/core/jni/com_android_internal_os_Zygote.cpp b/core/jni/com_android_internal_os_Zygote.cpp
index 8216b61..d8c68b4 100644
--- a/core/jni/com_android_internal_os_Zygote.cpp
+++ b/core/jni/com_android_internal_os_Zygote.cpp
@@ -108,11 +108,15 @@
static pid_t gSystemServerPid = 0;
-static const char kZygoteClassName[] = "com/android/internal/os/Zygote";
+static constexpr const char* kZygoteClassName = "com/android/internal/os/Zygote";
static jclass gZygoteClass;
static jmethodID gCallPostForkSystemServerHooks;
static jmethodID gCallPostForkChildHooks;
+static constexpr const char* kZygoteInitClassName = "com/android/internal/os/ZygoteInit";
+static jclass gZygoteInitClass;
+static jmethodID gCreateSystemServerClassLoader;
+
static bool g_is_security_enforced = true;
/**
@@ -1047,6 +1051,15 @@
fail_fn("Error calling post fork system server hooks.");
}
+ // Prefetch the classloader for the system server. This is done early to
+ // allow a tie-down of the proper system server selinux domain.
+ env->CallStaticVoidMethod(gZygoteInitClass, gCreateSystemServerClassLoader);
+ if (env->ExceptionCheck()) {
+ // Be robust here. The Java code will attempt to create the classloader
+ // at a later point (but may not have rights to use AoT artifacts).
+ env->ExceptionClear();
+ }
+
// TODO(oth): Remove hardcoded label here (b/117874058).
static const char* kSystemServerLabel = "u:r:system_server:s0";
if (selinux_android_setcon(kSystemServerLabel) != 0) {
@@ -1566,6 +1579,13 @@
gCallPostForkChildHooks = GetStaticMethodIDOrDie(env, gZygoteClass, "callPostForkChildHooks",
"(IZZLjava/lang/String;)V");
- return RegisterMethodsOrDie(env, "com/android/internal/os/Zygote", gMethods, NELEM(gMethods));
+ gZygoteInitClass = MakeGlobalRefOrDie(env, FindClassOrDie(env, kZygoteInitClassName));
+ gCreateSystemServerClassLoader = GetStaticMethodIDOrDie(env, gZygoteInitClass,
+ "createSystemServerClassLoader",
+ "()V");
+
+ RegisterMethodsOrDie(env, "com/android/internal/os/Zygote", gMethods, NELEM(gMethods));
+
+ return JNI_OK;
}
} // namespace android
diff --git a/keystore/java/android/security/keystore/AndroidKeyStoreSpi.java b/keystore/java/android/security/keystore/AndroidKeyStoreSpi.java
index 105af6e..51c4252 100644
--- a/keystore/java/android/security/keystore/AndroidKeyStoreSpi.java
+++ b/keystore/java/android/security/keystore/AndroidKeyStoreSpi.java
@@ -16,7 +16,6 @@
package android.security.keystore;
-import libcore.util.EmptyArray;
import android.security.Credentials;
import android.security.GateKeeper;
import android.security.KeyStore;
@@ -31,6 +30,8 @@
import android.security.keystore.WrappedKeyEntry;
import android.util.Log;
+import libcore.util.EmptyArray;
+
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
@@ -123,7 +124,14 @@
final Certificate[] caList;
- final byte[] caBytes = mKeyStore.get(Credentials.CA_CERTIFICATE + alias, mUid);
+ // Suppress the key not found warning for this call. It seems that this error is exclusively
+ // being thrown when there is a self signed certificate chain, so when the keystore service
+ // attempts to query for the CA details, it obviously fails to find them and returns a
+ // key not found exception. This is WAI, and throwing a stack trace here can be very
+ // misleading since the trace is not clear.
+ final byte[] caBytes = mKeyStore.get(Credentials.CA_CERTIFICATE + alias,
+ mUid,
+ true /* suppressKeyNotFoundWarning */);
if (caBytes != null) {
final Collection<X509Certificate> caChain = toCertificates(caBytes);
diff --git a/media/OWNERS b/media/OWNERS
index eb26367..72c8952 100644
--- a/media/OWNERS
+++ b/media/OWNERS
@@ -3,7 +3,9 @@
elaurent@google.com
etalvala@google.com
gkasten@google.com
+hdmoon@google.com
hunga@google.com
+insun@google.com
jaewan@google.com
jmtrivi@google.com
jsharkey@android.com
diff --git a/media/java/android/media/MediaHTTPConnection.java b/media/java/android/media/MediaHTTPConnection.java
index d724762..3838a999 100644
--- a/media/java/android/media/MediaHTTPConnection.java
+++ b/media/java/android/media/MediaHTTPConnection.java
@@ -37,6 +37,7 @@
import java.net.UnknownServiceException;
import java.util.HashMap;
import java.util.Map;
+import java.util.concurrent.atomic.AtomicReference;
/** @hide */
public class MediaHTTPConnection extends IMediaHTTPConnection.Stub {
@@ -46,27 +47,23 @@
// connection timeout - 30 sec
private static final int CONNECT_TIMEOUT_MS = 30 * 1000;
- @UnsupportedAppUsage
- private long mCurrentOffset = -1;
- @UnsupportedAppUsage
- private URL mURL = null;
- @UnsupportedAppUsage
- private Map<String, String> mHeaders = null;
- @UnsupportedAppUsage
- private HttpURLConnection mConnection = null;
- @UnsupportedAppUsage
- private long mTotalSize = -1;
- private InputStream mInputStream = null;
-
- @UnsupportedAppUsage
- private boolean mAllowCrossDomainRedirect = true;
- @UnsupportedAppUsage
- private boolean mAllowCrossProtocolRedirect = true;
-
// from com.squareup.okhttp.internal.http
private final static int HTTP_TEMP_REDIRECT = 307;
private final static int MAX_REDIRECTS = 20;
+ class ConnectionState {
+ public HttpURLConnection mConnection = null;
+ public InputStream mInputStream = null;
+ public long mCurrentOffset = -1;
+ public Map<String, String> mHeaders = null;
+ public URL mURL = null;
+ public long mTotalSize = -1;
+ public boolean mAllowCrossDomainRedirect = true;
+ public boolean mAllowCrossProtocolRedirect = true;
+ }
+ private final AtomicReference<ConnectionState> mConnectionStateHolder =
+ new AtomicReference<ConnectionState>();
+
@UnsupportedAppUsage
public MediaHTTPConnection() {
CookieHandler cookieHandler = CookieHandler.getDefault();
@@ -84,13 +81,23 @@
Log.d(TAG, "connect: uri=" + uri + ", headers=" + headers);
}
+ ConnectionState connectionState = mConnectionStateHolder.get();
+ synchronized (this) {
+ if (connectionState == null) {
+ connectionState = new ConnectionState();
+ mConnectionStateHolder.set(connectionState);
+ }
+ }
+
try {
disconnect();
- mAllowCrossDomainRedirect = true;
- mURL = new URL(uri);
- mHeaders = convertHeaderStringToMap(headers);
+ connectionState.mAllowCrossDomainRedirect = true;
+ connectionState.mURL = new URL(uri);
+ connectionState.mHeaders = convertHeaderStringToMap(headers, connectionState);
} catch (MalformedURLException e) {
return null;
+ } finally {
+ mConnectionStateHolder.set(connectionState);
}
return native_getIMemory();
@@ -106,18 +113,21 @@
}
/* returns true iff header is internal */
- private boolean filterOutInternalHeaders(String key, String val) {
+ private boolean filterOutInternalHeaders(
+ String key, String val, ConnectionState connectionState) {
if ("android-allow-cross-domain-redirect".equalsIgnoreCase(key)) {
- mAllowCrossDomainRedirect = parseBoolean(val);
+ connectionState.mAllowCrossDomainRedirect = parseBoolean(val);
// cross-protocol redirects are also controlled by this flag
- mAllowCrossProtocolRedirect = mAllowCrossDomainRedirect;
+ connectionState.mAllowCrossProtocolRedirect =
+ connectionState.mAllowCrossDomainRedirect;
} else {
return false;
}
return true;
}
- private Map<String, String> convertHeaderStringToMap(String headers) {
+ private Map<String, String> convertHeaderStringToMap(String headers,
+ ConnectionState connectionState) {
HashMap<String, String> map = new HashMap<String, String>();
String[] pairs = headers.split("\r\n");
@@ -127,7 +137,7 @@
String key = pair.substring(0, colonPos);
String val = pair.substring(colonPos + 1);
- if (!filterOutInternalHeaders(key, val)) {
+ if (!filterOutInternalHeaders(key, val, connectionState)) {
map.put(key, val);
}
}
@@ -139,25 +149,28 @@
@Override
@UnsupportedAppUsage
public void disconnect() {
- teardownConnection();
- mHeaders = null;
- mURL = null;
+ ConnectionState connectionState = mConnectionStateHolder.getAndSet(null);
+ if (connectionState != null) {
+ teardownConnection(connectionState);
+ connectionState.mHeaders = null;
+ connectionState.mURL = null;
+ }
}
- private void teardownConnection() {
- if (mConnection != null) {
- if (mInputStream != null) {
+ private void teardownConnection(ConnectionState connectionState) {
+ if (connectionState.mConnection != null) {
+ if (connectionState.mInputStream != null) {
try {
- mInputStream.close();
+ connectionState.mInputStream.close();
} catch (IOException e) {
}
- mInputStream = null;
+ connectionState.mInputStream = null;
}
- mConnection.disconnect();
- mConnection = null;
+ connectionState.mConnection.disconnect();
+ connectionState.mConnection = null;
- mCurrentOffset = -1;
+ connectionState.mCurrentOffset = -1;
}
}
@@ -184,42 +197,44 @@
return false;
}
- private void seekTo(long offset) throws IOException {
- teardownConnection();
+ private void seekTo(long offset, ConnectionState connectionState) throws IOException {
+ teardownConnection(connectionState);
try {
int response;
int redirectCount = 0;
- URL url = mURL;
+ URL url = connectionState.mURL;
// do not use any proxy for localhost (127.0.0.1)
boolean noProxy = isLocalHost(url);
while (true) {
if (noProxy) {
- mConnection = (HttpURLConnection)url.openConnection(Proxy.NO_PROXY);
+ connectionState.mConnection =
+ (HttpURLConnection) url.openConnection(Proxy.NO_PROXY);
} else {
- mConnection = (HttpURLConnection)url.openConnection();
+ connectionState.mConnection = (HttpURLConnection) url.openConnection();
}
- mConnection.setConnectTimeout(CONNECT_TIMEOUT_MS);
+ connectionState.mConnection.setConnectTimeout(CONNECT_TIMEOUT_MS);
// handle redirects ourselves if we do not allow cross-domain redirect
- mConnection.setInstanceFollowRedirects(mAllowCrossDomainRedirect);
+ connectionState.mConnection.setInstanceFollowRedirects(
+ connectionState.mAllowCrossDomainRedirect);
- if (mHeaders != null) {
- for (Map.Entry<String, String> entry : mHeaders.entrySet()) {
- mConnection.setRequestProperty(
+ if (connectionState.mHeaders != null) {
+ for (Map.Entry<String, String> entry : connectionState.mHeaders.entrySet()) {
+ connectionState.mConnection.setRequestProperty(
entry.getKey(), entry.getValue());
}
}
if (offset > 0) {
- mConnection.setRequestProperty(
+ connectionState.mConnection.setRequestProperty(
"Range", "bytes=" + offset + "-");
}
- response = mConnection.getResponseCode();
+ response = connectionState.mConnection.getResponseCode();
if (response != HttpURLConnection.HTTP_MULT_CHOICE &&
response != HttpURLConnection.HTTP_MOVED_PERM &&
response != HttpURLConnection.HTTP_MOVED_TEMP &&
@@ -233,7 +248,7 @@
throw new NoRouteToHostException("Too many redirects: " + redirectCount);
}
- String method = mConnection.getRequestMethod();
+ String method = connectionState.mConnection.getRequestMethod();
if (response == HTTP_TEMP_REDIRECT &&
!method.equals("GET") && !method.equals("HEAD")) {
// "If the 307 status code is received in response to a
@@ -241,34 +256,35 @@
// automatically redirect the request"
throw new NoRouteToHostException("Invalid redirect");
}
- String location = mConnection.getHeaderField("Location");
+ String location = connectionState.mConnection.getHeaderField("Location");
if (location == null) {
throw new NoRouteToHostException("Invalid redirect");
}
- url = new URL(mURL /* TRICKY: don't use url! */, location);
+ url = new URL(connectionState.mURL /* TRICKY: don't use url! */, location);
if (!url.getProtocol().equals("https") &&
!url.getProtocol().equals("http")) {
throw new NoRouteToHostException("Unsupported protocol redirect");
}
- boolean sameProtocol = mURL.getProtocol().equals(url.getProtocol());
- if (!mAllowCrossProtocolRedirect && !sameProtocol) {
+ boolean sameProtocol =
+ connectionState.mURL.getProtocol().equals(url.getProtocol());
+ if (!connectionState.mAllowCrossProtocolRedirect && !sameProtocol) {
throw new NoRouteToHostException("Cross-protocol redirects are disallowed");
}
- boolean sameHost = mURL.getHost().equals(url.getHost());
- if (!mAllowCrossDomainRedirect && !sameHost) {
+ boolean sameHost = connectionState.mURL.getHost().equals(url.getHost());
+ if (!connectionState.mAllowCrossDomainRedirect && !sameHost) {
throw new NoRouteToHostException("Cross-domain redirects are disallowed");
}
if (response != HTTP_TEMP_REDIRECT) {
// update effective URL, unless it is a Temporary Redirect
- mURL = url;
+ connectionState.mURL = url;
}
}
- if (mAllowCrossDomainRedirect) {
+ if (connectionState.mAllowCrossDomainRedirect) {
// remember the current, potentially redirected URL if redirects
// were handled by HttpURLConnection
- mURL = mConnection.getURL();
+ connectionState.mURL = connectionState.mConnection.getURL();
}
if (response == HttpURLConnection.HTTP_PARTIAL) {
@@ -276,10 +292,9 @@
// because what we want is not just the length of the range
// returned but the size of the full content if available.
- String contentRange =
- mConnection.getHeaderField("Content-Range");
+ String contentRange = connectionState.mConnection.getHeaderField("Content-Range");
- mTotalSize = -1;
+ connectionState.mTotalSize = -1;
if (contentRange != null) {
// format is "bytes xxx-yyy/zzz
// where "zzz" is the total number of bytes of the
@@ -291,7 +306,7 @@
contentRange.substring(lastSlashPos + 1);
try {
- mTotalSize = Long.parseLong(total);
+ connectionState.mTotalSize = Long.parseLong(total);
} catch (NumberFormatException e) {
}
}
@@ -299,7 +314,7 @@
} else if (response != HttpURLConnection.HTTP_OK) {
throw new IOException();
} else {
- mTotalSize = mConnection.getContentLength();
+ connectionState.mTotalSize = connectionState.mConnection.getContentLength();
}
if (offset > 0 && response != HttpURLConnection.HTTP_PARTIAL) {
@@ -308,14 +323,14 @@
throw new ProtocolException();
}
- mInputStream =
- new BufferedInputStream(mConnection.getInputStream());
+ connectionState.mInputStream =
+ new BufferedInputStream(connectionState.mConnection.getInputStream());
- mCurrentOffset = offset;
+ connectionState.mCurrentOffset = offset;
} catch (IOException e) {
- mTotalSize = -1;
- teardownConnection();
- mCurrentOffset = -1;
+ connectionState.mTotalSize = -1;
+ teardownConnection(connectionState);
+ connectionState.mCurrentOffset = -1;
throw e;
}
@@ -324,10 +339,14 @@
@Override
@UnsupportedAppUsage
public int readAt(long offset, int size) {
- return native_readAt(offset, size);
+ ConnectionState connectionState = mConnectionStateHolder.get();
+ if (connectionState != null) {
+ return native_readAt(offset, size, connectionState);
+ }
+ return -1;
}
- private int readAt(long offset, byte[] data, int size) {
+ private int readAt(long offset, byte[] data, int size, ConnectionState connectionState) {
StrictMode.ThreadPolicy policy =
new StrictMode.ThreadPolicy.Builder().permitAll().build();
@@ -335,12 +354,12 @@
try {
synchronized(this) {
- if (offset != mCurrentOffset) {
- seekTo(offset);
+ if (offset != connectionState.mCurrentOffset) {
+ seekTo(offset, connectionState);
}
}
- int n = mInputStream.read(data, 0, size);
+ int n = connectionState.mInputStream.read(data, 0, size);
if (n == -1) {
// InputStream signals EOS using a -1 result, our semantics
@@ -348,7 +367,7 @@
n = 0;
}
- mCurrentOffset += n;
+ connectionState.mCurrentOffset += n;
if (VERBOSE) {
Log.d(TAG, "readAt " + offset + " / " + size + " => " + n);
@@ -380,35 +399,47 @@
@Override
public synchronized long getSize() {
- if (mConnection == null) {
- try {
- seekTo(0);
- } catch (IOException e) {
- return -1;
+ ConnectionState connectionState = mConnectionStateHolder.get();
+ if (connectionState != null) {
+ if (connectionState.mConnection == null) {
+ try {
+ seekTo(0, connectionState);
+ } catch (IOException e) {
+ return -1;
+ }
}
+ return connectionState.mTotalSize;
}
- return mTotalSize;
+ return -1;
}
@Override
@UnsupportedAppUsage
public synchronized String getMIMEType() {
- if (mConnection == null) {
- try {
- seekTo(0);
- } catch (IOException e) {
- return "application/octet-stream";
+ ConnectionState connectionState = mConnectionStateHolder.get();
+ if (connectionState != null) {
+ if (connectionState.mConnection == null) {
+ try {
+ seekTo(0, connectionState);
+ } catch (IOException e) {
+ return "application/octet-stream";
+ }
}
+ return connectionState.mConnection.getContentType();
}
- return mConnection.getContentType();
+ return null;
}
@Override
@UnsupportedAppUsage
public String getUri() {
- return mURL.toString();
+ ConnectionState connectionState = mConnectionStateHolder.get();
+ if (connectionState != null) {
+ return connectionState.mURL.toString();
+ }
+ return null;
}
@Override
@@ -421,7 +452,7 @@
private native final void native_finalize();
private native final IBinder native_getIMemory();
- private native final int native_readAt(long offset, int size);
+ private native int native_readAt(long offset, int size, ConnectionState connectionState);
static {
System.loadLibrary("media_jni");
diff --git a/media/jni/android_media_MediaHTTPConnection.cpp b/media/jni/android_media_MediaHTTPConnection.cpp
index 365e045..d28c15c 100644
--- a/media/jni/android_media_MediaHTTPConnection.cpp
+++ b/media/jni/android_media_MediaHTTPConnection.cpp
@@ -109,7 +109,8 @@
gFields.context = env->GetFieldID(clazz.get(), "mNativeContext", "J");
CHECK(gFields.context != NULL);
- gFields.readAtMethodID = env->GetMethodID(clazz.get(), "readAt", "(J[BI)I");
+ gFields.readAtMethodID = env->GetMethodID(
+ clazz.get(), "readAt", "(J[BILandroid/media/MediaHTTPConnection$ConnectionState;)I");
}
static void android_media_MediaHTTPConnection_native_setup(
@@ -132,7 +133,7 @@
}
static jint android_media_MediaHTTPConnection_native_readAt(
- JNIEnv *env, jobject thiz, jlong offset, jint size) {
+ JNIEnv *env, jobject thiz, jlong offset, jint size, jobject connectionState) {
sp<JMediaHTTPConnection> conn = getObject(env, thiz);
if (size > JMediaHTTPConnection::kBufferSize) {
size = JMediaHTTPConnection::kBufferSize;
@@ -141,7 +142,7 @@
jbyteArray byteArrayObj = conn->getByteArrayObj();
jint n = env->CallIntMethod(
- thiz, gFields.readAtMethodID, offset, byteArrayObj, size);
+ thiz, gFields.readAtMethodID, offset, byteArrayObj, size, connectionState);
if (n > 0) {
env->GetByteArrayRegion(
@@ -158,7 +159,7 @@
{ "native_getIMemory", "()Landroid/os/IBinder;",
(void *)android_media_MediaHTTPConnection_native_getIMemory },
- { "native_readAt", "(JI)I",
+ { "native_readAt", "(JILandroid/media/MediaHTTPConnection$ConnectionState;)I",
(void *)android_media_MediaHTTPConnection_native_readAt },
{ "native_init", "()V",
diff --git a/packages/CaptivePortalLogin/src/com/android/captiveportallogin/CaptivePortalLoginActivity.java b/packages/CaptivePortalLogin/src/com/android/captiveportallogin/CaptivePortalLoginActivity.java
index 2c9b6eb..9488afb 100644
--- a/packages/CaptivePortalLogin/src/com/android/captiveportallogin/CaptivePortalLoginActivity.java
+++ b/packages/CaptivePortalLogin/src/com/android/captiveportallogin/CaptivePortalLoginActivity.java
@@ -53,6 +53,7 @@
import android.webkit.CookieManager;
import android.webkit.SslErrorHandler;
import android.webkit.WebChromeClient;
+import android.webkit.WebResourceRequest;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
@@ -408,8 +409,7 @@
TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 1,
getResources().getDisplayMetrics());
private int mPagesLoaded;
- // the host of the page that this webview is currently loading. Can be null when undefined.
- private String mHostname;
+ private String mMainFrameUrl;
// If we haven't finished cleaning up the history, don't allow going back.
public boolean allowBack() {
@@ -435,7 +435,6 @@
}
final URL url = makeURL(urlString);
Log.d(TAG, "onPageStarted: " + sanitizeURL(url));
- mHostname = host(url);
// For internally generated pages, leave URL bar listing prior URL as this is the URL
// the page refers to.
if (!urlString.startsWith(INTERNAL_ASSETS)) {
@@ -479,17 +478,28 @@
return Integer.toString((int)dp) + "px";
}
+ // Check if webview is trying to load the main frame and record its url.
+ @Override
+ public boolean shouldOverrideUrlLoading(WebView view, WebResourceRequest request) {
+ if (request.isForMainFrame()) {
+ mMainFrameUrl = request.getUrl().toString();
+ }
+ return false;
+ }
+
// A web page consisting of a large broken lock icon to indicate SSL failure.
@Override
public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) {
- final URL url = makeURL(error.getUrl());
- final String host = host(url);
+ final URL errorUrl = makeURL(error.getUrl());
+ final URL mainFrameUrl = makeURL(mMainFrameUrl);
Log.d(TAG, String.format("SSL error: %s, url: %s, certificate: %s",
- sslErrorName(error), sanitizeURL(url), error.getCertificate()));
- if (url == null || !Objects.equals(host, mHostname)) {
- // Ignore ssl errors for resources coming from a different hostname than the page
- // that we are currently loading, and only cancel the request.
+ sslErrorName(error), sanitizeURL(errorUrl), error.getCertificate()));
+ if (errorUrl == null
+ // Ignore SSL errors from resources by comparing the main frame url with SSL
+ // error url.
+ || !errorUrl.equals(mainFrameUrl)) {
+ Log.d(TAG, "onReceivedSslError: mMainFrameUrl = " + mMainFrameUrl);
handler.cancel();
return;
}
diff --git a/packages/NetworkStack/Android.bp b/packages/NetworkStack/Android.bp
index 190247a..8872147 100644
--- a/packages/NetworkStack/Android.bp
+++ b/packages/NetworkStack/Android.bp
@@ -25,6 +25,7 @@
":services-networkstack-shared-srcs",
],
static_libs: [
+ "ipmemorystore-client",
"netd_aidl_interface-java",
"networkstack-aidl-interfaces-java",
"datastallprotosnano",
diff --git a/packages/NetworkStack/jarjar-rules-shared.txt b/packages/NetworkStack/jarjar-rules-shared.txt
index a8c712a..7346b1a 100644
--- a/packages/NetworkStack/jarjar-rules-shared.txt
+++ b/packages/NetworkStack/jarjar-rules-shared.txt
@@ -8,12 +8,3 @@
rule android.net.DhcpResultsParcelable* @0
rule android.net.DhcpResults* android.net.networkstack.DhcpResults@1
rule android.net.LocalLog* android.net.networkstack.LocalLog@1
-
-# TODO: remove from framework dependencies, then remove here
-rule android.net.InterfaceConfigurationParcel* android.net.networkstack.InterfaceConfigurationParcel@1
-rule android.net.TetherStatsParcel* android.net.networkstack.TetherStatsParcel@1
-
-# Used by UidRange, which is used by framework classes such as NetworkCapabilities.
-rule android.net.UidRangeParcel* android.net.networkstack.UidRangeParcel@1
-# TODO: move TcpKeepalivePacketData to services.net and delete
-rule android.net.TcpKeepalivePacketDataParcelable* android.net.networkstack.TcpKeepalivePacketDataParcelable@1
\ No newline at end of file
diff --git a/packages/NetworkStack/src/android/net/NetworkStackIpMemoryStore.java b/packages/NetworkStack/src/android/net/NetworkStackIpMemoryStore.java
new file mode 100644
index 0000000..475f826
--- /dev/null
+++ b/packages/NetworkStack/src/android/net/NetworkStackIpMemoryStore.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2019 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.net;
+
+import android.annotation.NonNull;
+import android.content.Context;
+
+/**
+ * service used to communicate with the ip memory store service in network stack,
+ * which is running in the same module.
+ * @see com.android.server.connectivity.ipmemorystore.IpMemoryStoreService
+ * @hide
+ */
+public class NetworkStackIpMemoryStore extends IpMemoryStoreClient {
+ @NonNull private final IIpMemoryStore mService;
+
+ public NetworkStackIpMemoryStore(@NonNull final Context context,
+ @NonNull final IIpMemoryStore service) {
+ super(context);
+ mService = service;
+ }
+
+ @Override
+ @NonNull
+ protected IIpMemoryStore getService() {
+ return mService;
+ }
+}
diff --git a/packages/NetworkStack/src/android/net/dhcp/DhcpServingParams.java b/packages/NetworkStack/src/android/net/dhcp/DhcpServingParams.java
index 3cd2aa4..230b693 100644
--- a/packages/NetworkStack/src/android/net/dhcp/DhcpServingParams.java
+++ b/packages/NetworkStack/src/android/net/dhcp/DhcpServingParams.java
@@ -329,7 +329,7 @@
if (mLinkMtu != MTU_UNSET && (mLinkMtu < IPV4_MIN_MTU || mLinkMtu > IPV4_MAX_MTU)) {
throw new InvalidParameterException("Invalid link MTU: " + mLinkMtu);
}
- if (!mServerAddr.isIPv4()) {
+ if (!mServerAddr.isIpv4()) {
throw new InvalidParameterException("serverAddr must be IPv4");
}
if (mServerAddr.getPrefixLength() < MIN_PREFIX_LENGTH
diff --git a/packages/NetworkStack/src/android/net/ip/IpClient.java b/packages/NetworkStack/src/android/net/ip/IpClient.java
index b1f6d24..61dc966 100644
--- a/packages/NetworkStack/src/android/net/ip/IpClient.java
+++ b/packages/NetworkStack/src/android/net/ip/IpClient.java
@@ -18,8 +18,6 @@
import static android.net.RouteInfo.RTN_UNICAST;
import static android.net.shared.IpConfigurationParcelableUtil.toStableParcelable;
-import static android.net.shared.LinkPropertiesParcelableUtil.fromStableParcelable;
-import static android.net.shared.LinkPropertiesParcelableUtil.toStableParcelable;
import static com.android.server.util.PermissionUtil.checkNetworkStackCallingPermission;
@@ -31,9 +29,9 @@
import android.net.IpPrefix;
import android.net.LinkAddress;
import android.net.LinkProperties;
+import android.net.NetworkStackIpMemoryStore;
import android.net.ProvisioningConfigurationParcelable;
import android.net.ProxyInfo;
-import android.net.ProxyInfoParcelable;
import android.net.RouteInfo;
import android.net.TcpKeepalivePacketDataParcelable;
import android.net.apf.ApfCapabilities;
@@ -64,6 +62,7 @@
import com.android.internal.util.StateMachine;
import com.android.internal.util.WakeupMessage;
import com.android.server.NetworkObserverRegistry;
+import com.android.server.NetworkStackService.NetworkStackServiceManager;
import java.io.FileDescriptor;
import java.io.PrintWriter;
@@ -103,6 +102,7 @@
// One holds StateMachine logs and the other connectivity packet logs.
private static final ConcurrentHashMap<String, SharedLog> sSmLogs = new ConcurrentHashMap<>();
private static final ConcurrentHashMap<String, LocalLog> sPktLogs = new ConcurrentHashMap<>();
+ private final NetworkStackIpMemoryStore mIpMemoryStore;
/**
* Dump all state machine and connectivity packet logs to the specified writer.
@@ -201,7 +201,7 @@
public void onProvisioningSuccess(LinkProperties newLp) {
log("onProvisioningSuccess({" + newLp + "})");
try {
- mCallback.onProvisioningSuccess(toStableParcelable(newLp));
+ mCallback.onProvisioningSuccess(newLp);
} catch (RemoteException e) {
log("Failed to call onProvisioningSuccess", e);
}
@@ -210,7 +210,7 @@
public void onProvisioningFailure(LinkProperties newLp) {
log("onProvisioningFailure({" + newLp + "})");
try {
- mCallback.onProvisioningFailure(toStableParcelable(newLp));
+ mCallback.onProvisioningFailure(newLp);
} catch (RemoteException e) {
log("Failed to call onProvisioningFailure", e);
}
@@ -219,7 +219,7 @@
public void onLinkPropertiesChange(LinkProperties newLp) {
log("onLinkPropertiesChange({" + newLp + "})");
try {
- mCallback.onLinkPropertiesChange(toStableParcelable(newLp));
+ mCallback.onLinkPropertiesChange(newLp);
} catch (RemoteException e) {
log("Failed to call onLinkPropertiesChange", e);
}
@@ -391,13 +391,14 @@
}
public IpClient(Context context, String ifName, IIpClientCallbacks callback,
- NetworkObserverRegistry observerRegistry) {
- this(context, ifName, callback, observerRegistry, new Dependencies());
+ NetworkObserverRegistry observerRegistry, NetworkStackServiceManager nssManager) {
+ this(context, ifName, callback, observerRegistry, nssManager, new Dependencies());
}
@VisibleForTesting
IpClient(Context context, String ifName, IIpClientCallbacks callback,
- NetworkObserverRegistry observerRegistry, Dependencies deps) {
+ NetworkObserverRegistry observerRegistry, NetworkStackServiceManager nssManager,
+ Dependencies deps) {
super(IpClient.class.getSimpleName() + "." + ifName);
Preconditions.checkNotNull(ifName);
Preconditions.checkNotNull(callback);
@@ -411,6 +412,8 @@
mShutdownLatch = new CountDownLatch(1);
mCm = mContext.getSystemService(ConnectivityManager.class);
mObserverRegistry = observerRegistry;
+ mIpMemoryStore =
+ new NetworkStackIpMemoryStore(context, nssManager.getIpMemoryStoreService());
sSmLogs.putIfAbsent(mInterfaceName, new SharedLog(MAX_LOG_RECORDS, mTag));
mLog = sSmLogs.get(mInterfaceName);
@@ -525,9 +528,9 @@
IpClient.this.setTcpBufferSizes(tcpBufferSizes);
}
@Override
- public void setHttpProxy(ProxyInfoParcelable proxyInfo) {
+ public void setHttpProxy(ProxyInfo proxyInfo) {
checkNetworkStackCallingPermission();
- IpClient.this.setHttpProxy(fromStableParcelable(proxyInfo));
+ IpClient.this.setHttpProxy(proxyInfo);
}
@Override
public void setMulticastFilter(boolean enabled) {
@@ -831,7 +834,7 @@
static boolean isProvisioned(LinkProperties lp, InitialConfiguration config) {
// For historical reasons, we should connect even if all we have is
// an IPv4 address and nothing else.
- if (lp.hasIPv4Address() || lp.isProvisioned()) {
+ if (lp.hasIpv4Address() || lp.isProvisioned()) {
return true;
}
if (config == null) {
@@ -875,9 +878,9 @@
delta = PROV_CHANGE_LOST_PROVISIONING;
}
- final boolean lostIPv6 = oldLp.isIPv6Provisioned() && !newLp.isIPv6Provisioned();
- final boolean lostIPv4Address = oldLp.hasIPv4Address() && !newLp.hasIPv4Address();
- final boolean lostIPv6Router = oldLp.hasIPv6DefaultRoute() && !newLp.hasIPv6DefaultRoute();
+ final boolean lostIPv6 = oldLp.isIpv6Provisioned() && !newLp.isIpv6Provisioned();
+ final boolean lostIPv4Address = oldLp.hasIpv4Address() && !newLp.hasIpv4Address();
+ final boolean lostIPv6Router = oldLp.hasIpv6DefaultRoute() && !newLp.hasIpv6DefaultRoute();
// If bad wifi avoidance is disabled, then ignore IPv6 loss of
// provisioning. Otherwise, when a hotspot that loses Internet
@@ -917,7 +920,7 @@
// If the previous link properties had a global IPv6 address and an
// IPv6 default route then also consider the loss of that default route
// to be a loss of provisioning. See b/27962810.
- if (oldLp.hasGlobalIPv6Address() && (lostIPv6Router && !ignoreIPv6ProvisioningLoss)) {
+ if (oldLp.hasGlobalIpv6Address() && (lostIPv6Router && !ignoreIPv6ProvisioningLoss)) {
delta = PROV_CHANGE_LOST_PROVISIONING;
}
@@ -1153,7 +1156,7 @@
private boolean applyInitialConfig(InitialConfiguration config) {
// TODO: also support specifying a static IPv4 configuration in InitialConfiguration.
- for (LinkAddress addr : findAll(config.ipAddresses, LinkAddress::isIPv6)) {
+ for (LinkAddress addr : findAll(config.ipAddresses, LinkAddress::isIpv6)) {
if (!mInterfaceCtrl.addAddress(addr)) return false;
}
@@ -1371,7 +1374,7 @@
}
private boolean readyToProceed() {
- return (!mLinkProperties.hasIPv4Address() && !mLinkProperties.hasGlobalIPv6Address());
+ return (!mLinkProperties.hasIpv4Address() && !mLinkProperties.hasGlobalIpv6Address());
}
}
diff --git a/packages/NetworkStack/src/android/net/ip/IpReachabilityMonitor.java b/packages/NetworkStack/src/android/net/ip/IpReachabilityMonitor.java
index 76a0338..e73cba6 100644
--- a/packages/NetworkStack/src/android/net/ip/IpReachabilityMonitor.java
+++ b/packages/NetworkStack/src/android/net/ip/IpReachabilityMonitor.java
@@ -316,8 +316,8 @@
}
final boolean lostProvisioning =
- (mLinkProperties.isIPv4Provisioned() && !whatIfLp.isIPv4Provisioned())
- || (mLinkProperties.isIPv6Provisioned() && !whatIfLp.isIPv6Provisioned());
+ (mLinkProperties.isIpv4Provisioned() && !whatIfLp.isIpv4Provisioned())
+ || (mLinkProperties.isIpv6Provisioned() && !whatIfLp.isIpv6Provisioned());
if (lostProvisioning) {
final String logMsg = "FAILURE: LOST_PROVISIONING, " + event;
diff --git a/packages/NetworkStack/src/com/android/server/NetworkStackService.java b/packages/NetworkStack/src/com/android/server/NetworkStackService.java
index 72955bb..19e9108 100644
--- a/packages/NetworkStack/src/com/android/server/NetworkStackService.java
+++ b/packages/NetworkStack/src/com/android/server/NetworkStackService.java
@@ -19,7 +19,6 @@
import static android.net.dhcp.IDhcpServer.STATUS_INVALID_ARGUMENT;
import static android.net.dhcp.IDhcpServer.STATUS_SUCCESS;
import static android.net.dhcp.IDhcpServer.STATUS_UNKNOWN_ERROR;
-import static android.net.shared.NetworkParcelableUtil.fromStableParcelable;
import static com.android.server.util.PermissionUtil.checkDumpPermission;
import static com.android.server.util.PermissionUtil.checkNetworkStackCallingPermission;
@@ -30,12 +29,13 @@
import android.content.Context;
import android.content.Intent;
import android.net.ConnectivityManager;
+import android.net.IIpMemoryStore;
+import android.net.IIpMemoryStoreCallbacks;
import android.net.INetd;
import android.net.INetworkMonitor;
import android.net.INetworkMonitorCallbacks;
import android.net.INetworkStackConnector;
import android.net.Network;
-import android.net.NetworkParcelable;
import android.net.PrivateDnsConfigParcel;
import android.net.dhcp.DhcpServer;
import android.net.dhcp.DhcpServingParams;
@@ -51,6 +51,7 @@
import com.android.internal.annotations.GuardedBy;
import com.android.internal.util.IndentingPrintWriter;
import com.android.server.connectivity.NetworkMonitor;
+import com.android.server.connectivity.ipmemorystore.IpMemoryStoreService;
import java.io.FileDescriptor;
import java.io.PrintWriter;
@@ -88,7 +89,19 @@
return makeConnector(this);
}
- private static class NetworkStackConnector extends INetworkStackConnector.Stub {
+ /**
+ * An interface for internal clients of the network stack service that can return
+ * or create inline instances of the service it manages.
+ */
+ public interface NetworkStackServiceManager {
+ /**
+ * Get an instance of the IpMemoryStoreService.
+ */
+ IIpMemoryStore getIpMemoryStoreService();
+ }
+
+ private static class NetworkStackConnector extends INetworkStackConnector.Stub
+ implements NetworkStackServiceManager {
private static final int NUM_VALIDATION_LOG_LINES = 20;
private final Context mContext;
private final INetd mNetd;
@@ -96,6 +109,7 @@
private final ConnectivityManager mCm;
@GuardedBy("mIpClients")
private final ArrayList<WeakReference<IpClient>> mIpClients = new ArrayList<>();
+ private final IpMemoryStoreService mIpMemoryStoreService;
private static final int MAX_VALIDATION_LOGS = 10;
@GuardedBy("mValidationLogs")
@@ -118,6 +132,7 @@
(IBinder) context.getSystemService(Context.NETD_SERVICE));
mObserverRegistry = new NetworkObserverRegistry();
mCm = context.getSystemService(ConnectivityManager.class);
+ mIpMemoryStoreService = new IpMemoryStoreService(context);
try {
mObserverRegistry.register(mNetd);
@@ -152,18 +167,16 @@
}
@Override
- public void makeNetworkMonitor(
- NetworkParcelable network, String name, INetworkMonitorCallbacks cb)
+ public void makeNetworkMonitor(Network network, String name, INetworkMonitorCallbacks cb)
throws RemoteException {
- final Network parsedNetwork = fromStableParcelable(network);
- final SharedLog log = addValidationLogs(parsedNetwork, name);
- final NetworkMonitor nm = new NetworkMonitor(mContext, cb, parsedNetwork, log);
+ final SharedLog log = addValidationLogs(network, name);
+ final NetworkMonitor nm = new NetworkMonitor(mContext, cb, network, log);
cb.onNetworkMonitorCreated(new NetworkMonitorImpl(nm));
}
@Override
public void makeIpClient(String ifName, IIpClientCallbacks cb) throws RemoteException {
- final IpClient ipClient = new IpClient(mContext, ifName, cb, mObserverRegistry);
+ final IpClient ipClient = new IpClient(mContext, ifName, cb, mObserverRegistry, this);
synchronized (mIpClients) {
final Iterator<WeakReference<IpClient>> it = mIpClients.iterator();
@@ -180,6 +193,17 @@
}
@Override
+ public IIpMemoryStore getIpMemoryStoreService() {
+ return mIpMemoryStoreService;
+ }
+
+ @Override
+ public void fetchIpMemoryStore(@NonNull final IIpMemoryStoreCallbacks cb)
+ throws RemoteException {
+ cb.onIpMemoryStoreFetched(mIpMemoryStoreService);
+ }
+
+ @Override
protected void dump(@NonNull FileDescriptor fd, @NonNull PrintWriter fout,
@Nullable String[] args) {
checkDumpPermission();
@@ -253,9 +277,9 @@
}
@Override
- public void notifyAcceptPartialConnectivity() {
+ public void setAcceptPartialConnectivity() {
checkNetworkStackCallingPermission();
- mNm.notifyAcceptPartialConnectivity();
+ mNm.setAcceptPartialConnectivity();
}
@Override
diff --git a/packages/NetworkStack/src/com/android/server/connectivity/NetworkMonitor.java b/packages/NetworkStack/src/com/android/server/connectivity/NetworkMonitor.java
index bcfc412..48d9d7b 100644
--- a/packages/NetworkStack/src/com/android/server/connectivity/NetworkMonitor.java
+++ b/packages/NetworkStack/src/com/android/server/connectivity/NetworkMonitor.java
@@ -72,7 +72,7 @@
import android.provider.Settings;
import android.telephony.AccessNetworkConstants;
import android.telephony.CellSignalStrength;
-import android.telephony.NetworkRegistrationState;
+import android.telephony.NetworkRegistrationInfo;
import android.telephony.ServiceState;
import android.telephony.SignalStrength;
import android.telephony.TelephonyManager;
@@ -319,7 +319,8 @@
private final DnsStallDetector mDnsStallDetector;
private long mLastProbeTime;
// Set to true if data stall is suspected and reset to false after metrics are sent to statsd.
- private boolean mCollectDataStallMetrics = false;
+ private boolean mCollectDataStallMetrics;
+ private boolean mAcceptPartialConnectivity;
public NetworkMonitor(Context context, INetworkMonitorCallbacks cb, Network network,
SharedLog validationLog) {
@@ -386,10 +387,11 @@
}
/**
- * ConnectivityService notifies NetworkMonitor that the user accepts partial connectivity and
- * NetworkMonitor should ignore the https probe.
+ * ConnectivityService notifies NetworkMonitor that the user already accepted partial
+ * connectivity previously, so NetworkMonitor can validate the network even if it has partial
+ * connectivity.
*/
- public void notifyAcceptPartialConnectivity() {
+ public void setAcceptPartialConnectivity() {
sendMessage(EVENT_ACCEPT_PARTIAL_CONNECTIVITY);
}
@@ -651,9 +653,11 @@
case EVENT_DNS_NOTIFICATION:
mDnsStallDetector.accumulateConsecutiveDnsTimeoutCount(message.arg1);
break;
+ // Set mAcceptPartialConnectivity to true and if network start evaluating or
+ // re-evaluating and get the result of partial connectivity, ProbingState will
+ // disable HTTPS probe and transition to EvaluatingPrivateDnsState.
case EVENT_ACCEPT_PARTIAL_CONNECTIVITY:
- mUseHttps = false;
- transitionTo(mEvaluatingPrivateDnsState);
+ mAcceptPartialConnectivity = true;
break;
default:
break;
@@ -849,6 +853,14 @@
// ignore any re-evaluation requests. After, restart the
// evaluation process via EvaluatingState#enter.
return (mEvaluateAttempts < IGNORE_REEVALUATE_ATTEMPTS) ? HANDLED : NOT_HANDLED;
+ // Disable HTTPS probe and transition to EvaluatingPrivateDnsState because:
+ // 1. Network is connected and finish the network validation.
+ // 2. NetworkMonitor detects network is partial connectivity and user accepts it.
+ case EVENT_ACCEPT_PARTIAL_CONNECTIVITY:
+ mAcceptPartialConnectivity = true;
+ mUseHttps = false;
+ transitionTo(mEvaluatingPrivateDnsState);
+ return HANDLED;
default:
return NOT_HANDLED;
}
@@ -1081,7 +1093,12 @@
logNetworkEvent(NetworkEvent.NETWORK_PARTIAL_CONNECTIVITY);
notifyNetworkTested(NETWORK_TEST_RESULT_PARTIAL_CONNECTIVITY,
probeResult.redirectUrl);
- transitionTo(mWaitingForNextProbeState);
+ if (mAcceptPartialConnectivity) {
+ mUseHttps = false;
+ transitionTo(mEvaluatingPrivateDnsState);
+ } else {
+ transitionTo(mWaitingForNextProbeState);
+ }
} else {
logNetworkEvent(NetworkEvent.NETWORK_VALIDATION_FAILED);
notifyNetworkTested(NETWORK_TEST_RESULT_INVALID, probeResult.redirectUrl);
@@ -1615,8 +1632,8 @@
return;
}
// See if the data sub is registered for PS services on cell.
- final NetworkRegistrationState nrs = dataSs.getNetworkRegistrationState(
- NetworkRegistrationState.DOMAIN_PS,
+ final NetworkRegistrationInfo nrs = dataSs.getNetworkRegistrationInfo(
+ NetworkRegistrationInfo.DOMAIN_PS,
AccessNetworkConstants.TRANSPORT_TYPE_WWAN);
latencyBroadcast.putExtra(
NetworkMonitorUtils.EXTRA_CELL_ID,
diff --git a/services/ipmemorystore/java/com/android/server/net/ipmemorystore/IpMemoryStoreDatabase.java b/packages/NetworkStack/src/com/android/server/connectivity/ipmemorystore/IpMemoryStoreDatabase.java
similarity index 99%
rename from services/ipmemorystore/java/com/android/server/net/ipmemorystore/IpMemoryStoreDatabase.java
rename to packages/NetworkStack/src/com/android/server/connectivity/ipmemorystore/IpMemoryStoreDatabase.java
index bbecc63..4d4ceed 100644
--- a/services/ipmemorystore/java/com/android/server/net/ipmemorystore/IpMemoryStoreDatabase.java
+++ b/packages/NetworkStack/src/com/android/server/connectivity/ipmemorystore/IpMemoryStoreDatabase.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.android.server.net.ipmemorystore;
+package com.android.server.connectivity.ipmemorystore;
import static android.net.shared.Inet4AddressUtils.inet4AddressToIntHTH;
import static android.net.shared.Inet4AddressUtils.intToInet4AddressHTH;
diff --git a/services/ipmemorystore/java/com/android/server/net/ipmemorystore/IpMemoryStoreService.java b/packages/NetworkStack/src/com/android/server/connectivity/ipmemorystore/IpMemoryStoreService.java
similarity index 98%
rename from services/ipmemorystore/java/com/android/server/net/ipmemorystore/IpMemoryStoreService.java
rename to packages/NetworkStack/src/com/android/server/connectivity/ipmemorystore/IpMemoryStoreService.java
index d43dc6a..f801b35 100644
--- a/services/ipmemorystore/java/com/android/server/net/ipmemorystore/IpMemoryStoreService.java
+++ b/packages/NetworkStack/src/com/android/server/connectivity/ipmemorystore/IpMemoryStoreService.java
@@ -14,14 +14,14 @@
* limitations under the License.
*/
-package com.android.server.net.ipmemorystore;
+package com.android.server.connectivity.ipmemorystore;
import static android.net.ipmemorystore.Status.ERROR_DATABASE_CANNOT_BE_OPENED;
import static android.net.ipmemorystore.Status.ERROR_GENERIC;
import static android.net.ipmemorystore.Status.ERROR_ILLEGAL_ARGUMENT;
import static android.net.ipmemorystore.Status.SUCCESS;
-import static com.android.server.net.ipmemorystore.IpMemoryStoreDatabase.EXPIRY_ERROR;
+import static com.android.server.connectivity.ipmemorystore.IpMemoryStoreDatabase.EXPIRY_ERROR;
import android.annotation.NonNull;
import android.annotation.Nullable;
@@ -40,7 +40,6 @@
import android.net.ipmemorystore.SameL3NetworkResponse;
import android.net.ipmemorystore.Status;
import android.net.ipmemorystore.StatusParcelable;
-import android.net.ipmemorystore.Utils;
import android.os.RemoteException;
import android.util.Log;
diff --git a/services/ipmemorystore/java/com/android/server/net/ipmemorystore/RelevanceUtils.java b/packages/NetworkStack/src/com/android/server/connectivity/ipmemorystore/RelevanceUtils.java
similarity index 99%
rename from services/ipmemorystore/java/com/android/server/net/ipmemorystore/RelevanceUtils.java
rename to packages/NetworkStack/src/com/android/server/connectivity/ipmemorystore/RelevanceUtils.java
index aa45400..38d5544 100644
--- a/services/ipmemorystore/java/com/android/server/net/ipmemorystore/RelevanceUtils.java
+++ b/packages/NetworkStack/src/com/android/server/connectivity/ipmemorystore/RelevanceUtils.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.android.server.net.ipmemorystore;
+package com.android.server.connectivity.ipmemorystore;
import com.android.internal.annotations.VisibleForTesting;
diff --git a/core/java/android/net/ipmemorystore/Utils.java b/packages/NetworkStack/src/com/android/server/connectivity/ipmemorystore/Utils.java
similarity index 94%
rename from core/java/android/net/ipmemorystore/Utils.java
rename to packages/NetworkStack/src/com/android/server/connectivity/ipmemorystore/Utils.java
index b361aca..9cbf490 100644
--- a/core/java/android/net/ipmemorystore/Utils.java
+++ b/packages/NetworkStack/src/com/android/server/connectivity/ipmemorystore/Utils.java
@@ -14,10 +14,11 @@
* limitations under the License.
*/
-package android.net.ipmemorystore;
+package com.android.server.connectivity.ipmemorystore;
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.net.ipmemorystore.Blob;
/** {@hide} */
public class Utils {
diff --git a/packages/NetworkStack/tests/src/android/net/ip/IpClientTest.java b/packages/NetworkStack/tests/src/android/net/ip/IpClientTest.java
index bd488ea..eee12d6 100644
--- a/packages/NetworkStack/tests/src/android/net/ip/IpClientTest.java
+++ b/packages/NetworkStack/tests/src/android/net/ip/IpClientTest.java
@@ -16,13 +16,10 @@
package android.net.ip;
-import static android.net.shared.LinkPropertiesParcelableUtil.fromStableParcelable;
-
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
-import static org.mockito.ArgumentMatchers.argThat;
import static org.mockito.Mockito.any;
import static org.mockito.Mockito.anyString;
import static org.mockito.Mockito.eq;
@@ -54,6 +51,7 @@
import com.android.internal.R;
import com.android.server.NetworkObserver;
import com.android.server.NetworkObserverRegistry;
+import com.android.server.NetworkStackService;
import org.junit.Before;
import org.junit.Test;
@@ -93,6 +91,7 @@
@Mock private AlarmManager mAlarm;
@Mock private IpClient.Dependencies mDependencies;
@Mock private ContentResolver mContentResolver;
+ @Mock private NetworkStackService.NetworkStackServiceManager mNetworkStackServiceManager;
private NetworkObserver mObserver;
private InterfaceParams mIfParams;
@@ -121,7 +120,8 @@
private IpClient makeIpClient(String ifname) throws Exception {
setTestInterfaceParams(ifname);
- final IpClient ipc = new IpClient(mContext, ifname, mCb, mObserverRegistry, mDependencies);
+ final IpClient ipc = new IpClient(mContext, ifname, mCb, mObserverRegistry,
+ mNetworkStackServiceManager, mDependencies);
verify(mNetd, timeout(TEST_TIMEOUT_MS).times(1)).interfaceSetEnableIPv6(ifname, false);
verify(mNetd, timeout(TEST_TIMEOUT_MS).times(1)).interfaceClearAddrs(ifname);
ArgumentCaptor<NetworkObserver> arg = ArgumentCaptor.forClass(NetworkObserver.class);
@@ -145,8 +145,8 @@
public void testNullInterfaceNameMostDefinitelyThrows() throws Exception {
setTestInterfaceParams(null);
try {
- final IpClient ipc = new IpClient(
- mContext, null, mCb, mObserverRegistry, mDependencies);
+ final IpClient ipc = new IpClient(mContext, null, mCb, mObserverRegistry,
+ mNetworkStackServiceManager, mDependencies);
ipc.shutdown();
fail();
} catch (NullPointerException npe) {
@@ -159,8 +159,8 @@
final String ifname = "lo";
setTestInterfaceParams(ifname);
try {
- final IpClient ipc = new IpClient(
- mContext, ifname, null, mObserverRegistry, mDependencies);
+ final IpClient ipc = new IpClient(mContext, ifname, null, mObserverRegistry,
+ mNetworkStackServiceManager, mDependencies);
ipc.shutdown();
fail();
} catch (NullPointerException npe) {
@@ -171,16 +171,16 @@
@Test
public void testInvalidInterfaceDoesNotThrow() throws Exception {
setTestInterfaceParams(TEST_IFNAME);
- final IpClient ipc = new IpClient(
- mContext, TEST_IFNAME, mCb, mObserverRegistry, mDependencies);
+ final IpClient ipc = new IpClient(mContext, TEST_IFNAME, mCb, mObserverRegistry,
+ mNetworkStackServiceManager, mDependencies);
ipc.shutdown();
}
@Test
public void testInterfaceNotFoundFailsImmediately() throws Exception {
setTestInterfaceParams(null);
- final IpClient ipc = new IpClient(
- mContext, TEST_IFNAME, mCb, mObserverRegistry, mDependencies);
+ final IpClient ipc = new IpClient(mContext, TEST_IFNAME, mCb, mObserverRegistry,
+ mNetworkStackServiceManager, mDependencies);
ipc.startProvisioning(new ProvisioningConfiguration());
verify(mCb, times(1)).onProvisioningFailure(any());
ipc.shutdown();
@@ -207,8 +207,7 @@
verify(mNetd, timeout(TEST_TIMEOUT_MS).times(1)).interfaceSetEnableIPv6(iface, false);
verify(mNetd, timeout(TEST_TIMEOUT_MS).times(1)).interfaceClearAddrs(iface);
verify(mCb, timeout(TEST_TIMEOUT_MS).times(1))
- .onLinkPropertiesChange(argThat(
- lp -> fromStableParcelable(lp).equals(makeEmptyLinkProperties(iface))));
+ .onLinkPropertiesChange(makeEmptyLinkProperties(iface));
}
@Test
@@ -253,15 +252,13 @@
mObserver.onInterfaceAddressUpdated(new LinkAddress(addresses[lastAddr]), iface);
LinkProperties want = linkproperties(links(addresses), routes(prefixes));
want.setInterfaceName(iface);
- verify(mCb, timeout(TEST_TIMEOUT_MS).times(1)).onProvisioningSuccess(argThat(
- lp -> fromStableParcelable(lp).equals(want)));
+ verify(mCb, timeout(TEST_TIMEOUT_MS).times(1)).onProvisioningSuccess(want);
ipc.shutdown();
verify(mNetd, timeout(TEST_TIMEOUT_MS).times(1)).interfaceSetEnableIPv6(iface, false);
verify(mNetd, timeout(TEST_TIMEOUT_MS).times(1)).interfaceClearAddrs(iface);
verify(mCb, timeout(TEST_TIMEOUT_MS).times(1))
- .onLinkPropertiesChange(argThat(
- lp -> fromStableParcelable(lp).equals(makeEmptyLinkProperties(iface))));
+ .onLinkPropertiesChange(makeEmptyLinkProperties(iface));
}
@Test
diff --git a/packages/NetworkStack/tests/src/com/android/server/connectivity/NetworkMonitorTest.java b/packages/NetworkStack/tests/src/com/android/server/connectivity/NetworkMonitorTest.java
index d93aef2..d732c4e 100644
--- a/packages/NetworkStack/tests/src/com/android/server/connectivity/NetworkMonitorTest.java
+++ b/packages/NetworkStack/tests/src/com/android/server/connectivity/NetworkMonitorTest.java
@@ -583,7 +583,7 @@
verify(mCallbacks, timeout(HANDLER_TIMEOUT_MS).times(1))
.notifyNetworkTested(NETWORK_TEST_RESULT_PARTIAL_CONNECTIVITY, null);
- nm.notifyAcceptPartialConnectivity();
+ nm.setAcceptPartialConnectivity();
verify(mCallbacks, timeout(HANDLER_TIMEOUT_MS).times(1))
.notifyNetworkTested(NETWORK_TEST_RESULT_VALID, null);
}
diff --git a/tests/net/java/com/android/server/net/ipmemorystore/IpMemoryStoreServiceTest.java b/packages/NetworkStack/tests/src/com/android/server/connectivity/ipmemorystore/IpMemoryStoreServiceTest.java
similarity index 99%
rename from tests/net/java/com/android/server/net/ipmemorystore/IpMemoryStoreServiceTest.java
rename to packages/NetworkStack/tests/src/com/android/server/connectivity/ipmemorystore/IpMemoryStoreServiceTest.java
index be10680..d0e58b8 100644
--- a/tests/net/java/com/android/server/net/ipmemorystore/IpMemoryStoreServiceTest.java
+++ b/packages/NetworkStack/tests/src/com/android/server/connectivity/ipmemorystore/IpMemoryStoreServiceTest.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.android.server.net.ipmemorystore;
+package com.android.server.connectivity.ipmemorystore;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
diff --git a/tests/net/java/com/android/server/net/ipmemorystore/RelevanceUtilsTests.java b/packages/NetworkStack/tests/src/com/android/server/connectivity/ipmemorystore/RelevanceUtilsTests.java
similarity index 97%
rename from tests/net/java/com/android/server/net/ipmemorystore/RelevanceUtilsTests.java
rename to packages/NetworkStack/tests/src/com/android/server/connectivity/ipmemorystore/RelevanceUtilsTests.java
index 7413b91..3d3aabc 100644
--- a/tests/net/java/com/android/server/net/ipmemorystore/RelevanceUtilsTests.java
+++ b/packages/NetworkStack/tests/src/com/android/server/connectivity/ipmemorystore/RelevanceUtilsTests.java
@@ -14,9 +14,9 @@
* limitations under the License.
*/
-package com.android.server.net.ipmemorystore;
+package com.android.server.connectivity.ipmemorystore;
-import static com.android.server.net.ipmemorystore.RelevanceUtils.CAPPED_RELEVANCE;
+import static com.android.server.connectivity.ipmemorystore.RelevanceUtils.CAPPED_RELEVANCE;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
diff --git a/packages/SettingsLib/res/values/strings.xml b/packages/SettingsLib/res/values/strings.xml
index 23e13c2..d5b1217 100644
--- a/packages/SettingsLib/res/values/strings.xml
+++ b/packages/SettingsLib/res/values/strings.xml
@@ -97,6 +97,9 @@
<!-- Summary for Connected wifi network without internet -->
<string name="wifi_connected_no_internet">Connected, no internet</string>
+ <!-- Summary for connected wifi network with partial internet connectivity [CHAR LIMIT=50] -->
+ <string name="wifi_limited_connection">Limited connection</string>
+
<!-- Wi-Fi status indicating that the current network is connected, but has no internet access. -->
<string name="wifi_status_no_internet">No internet</string>
diff --git a/packages/SettingsLib/src/com/android/settingslib/wifi/AccessPoint.java b/packages/SettingsLib/src/com/android/settingslib/wifi/AccessPoint.java
index b9c7601..0d3b7a3 100644
--- a/packages/SettingsLib/src/com/android/settingslib/wifi/AccessPoint.java
+++ b/packages/SettingsLib/src/com/android/settingslib/wifi/AccessPoint.java
@@ -48,7 +48,6 @@
import android.os.ServiceManager;
import android.os.SystemClock;
import android.os.UserHandle;
-import androidx.annotation.NonNull;
import android.text.Spannable;
import android.text.SpannableString;
import android.text.TextUtils;
@@ -56,6 +55,8 @@
import android.util.ArraySet;
import android.util.Log;
+import androidx.annotation.NonNull;
+
import com.android.internal.annotations.VisibleForTesting;
import com.android.settingslib.R;
import com.android.settingslib.utils.ThreadUtils;
@@ -1243,6 +1244,9 @@
int id = context.getResources()
.getIdentifier("network_available_sign_in", "string", "android");
return context.getString(id);
+ } else if (nc.hasCapability(
+ NetworkCapabilities.NET_CAPABILITY_PARTIAL_CONNECTIVITY)) {
+ return context.getString(R.string.wifi_limited_connection);
} else if (!nc.hasCapability(NetworkCapabilities.NET_CAPABILITY_VALIDATED)) {
return context.getString(R.string.wifi_connected_no_internet);
}
diff --git a/packages/SettingsLib/src/com/android/settingslib/wifi/WifiStatusTracker.java b/packages/SettingsLib/src/com/android/settingslib/wifi/WifiStatusTracker.java
index fe0b35b..faefc0f 100644
--- a/packages/SettingsLib/src/com/android/settingslib/wifi/WifiStatusTracker.java
+++ b/packages/SettingsLib/src/com/android/settingslib/wifi/WifiStatusTracker.java
@@ -11,6 +11,7 @@
package com.android.settingslib.wifi;
import static android.net.NetworkCapabilities.NET_CAPABILITY_CAPTIVE_PORTAL;
+import static android.net.NetworkCapabilities.NET_CAPABILITY_PARTIAL_CONNECTIVITY;
import static android.net.NetworkCapabilities.NET_CAPABILITY_VALIDATED;
import android.content.Context;
@@ -151,6 +152,9 @@
if (networkCapabilities.hasCapability(NET_CAPABILITY_CAPTIVE_PORTAL)) {
statusLabel = mContext.getString(R.string.wifi_status_sign_in_required);
return;
+ } else if (networkCapabilities.hasCapability(NET_CAPABILITY_PARTIAL_CONNECTIVITY)) {
+ statusLabel = mContext.getString(R.string.wifi_limited_connection);
+ return;
} else if (!networkCapabilities.hasCapability(NET_CAPABILITY_VALIDATED)) {
statusLabel = mContext.getString(R.string.wifi_status_no_internet);
return;
diff --git a/packages/SystemUI/res/drawable/ic_5g_mobiledata.xml b/packages/SystemUI/res/drawable/ic_5g_mobiledata.xml
new file mode 100644
index 0000000..2aa6e57f
--- /dev/null
+++ b/packages/SystemUI/res/drawable/ic_5g_mobiledata.xml
@@ -0,0 +1,27 @@
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="14dp"
+ android:height="17dp"
+ android:viewportWidth="14"
+ android:viewportHeight="17">
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M13.9,12.24l-0.22,0.27c-0.63,0.73 -1.55,1.1 -2.76,1.1c-1.08,0 -1.92,-0.36 -2.53,-1.07s-0.93,-1.72 -0.94,-3.02V7.56c0,-1.39 0.28,-2.44 0.84,-3.13s1.39,-1.04 2.51,-1.04c0.95,0 1.69,0.26 2.23,0.79s0.83,1.28 0.89,2.26h-1.25c-0.05,-0.62 -0.22,-1.1 -0.52,-1.45s-0.74,-0.52 -1.34,-0.52c-0.72,0 -1.24,0.23 -1.57,0.7S8.72,6.37 8.71,7.4v2.03c0,1 0.19,1.77 0.57,2.31c0.38,0.54 0.93,0.8 1.65,0.8c0.67,0 1.19,-0.16 1.54,-0.49l0.18,-0.17V9.59h-1.82V8.52h3.07V12.24z"/>
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M1.15,8.47l0.43,-4.96h4.33v1.17H2.6L2.37,7.39C2.78,7.1 3.22,6.96 3.69,6.96c0.77,0 1.38,0.3 1.83,0.9s0.66,1.41 0.66,2.43c0,1.03 -0.24,1.84 -0.72,2.43S4.32,13.6 3.48,13.6c-0.75,0 -1.36,-0.24 -1.83,-0.73s-0.74,-1.16 -0.81,-2.02h1.13c0.07,0.57 0.23,1 0.49,1.29c0.26,0.29 0.59,0.43 1.01,0.43c0.47,0 0.84,-0.2 1.1,-0.61c0.26,-0.41 0.4,-0.96 0.4,-1.65c0,-0.65 -0.14,-1.18 -0.43,-1.59S3.88,8.09 3.4,8.09c-0.4,0 -0.72,0.1 -0.96,0.31L2.11,8.73L1.15,8.47z"/>
+</vector>
diff --git a/packages/SystemUI/res/drawable/ic_5g_plus_mobiledata.xml b/packages/SystemUI/res/drawable/ic_5g_plus_mobiledata.xml
new file mode 100644
index 0000000..10bbcc7
--- /dev/null
+++ b/packages/SystemUI/res/drawable/ic_5g_plus_mobiledata.xml
@@ -0,0 +1,33 @@
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:viewportWidth="22"
+ android:viewportHeight="17"
+ android:width="22dp"
+ android:height="17dp">
+ <group>
+ <group>
+ <path android:fillColor="#FF000000"
+ android:pathData="M1.03 8.47l0.43-4.96h4.33v1.17H2.48L2.25 7.39C2.66 7.1 3.1 6.96 3.57 6.96c0.77 0 1.38 0.3 1.83 0.9 s0.66 1.41 0.66 2.43c0 1.03-0.24 1.84-0.72 2.43S4.2 13.6 3.36 13.6c-0.75 0-1.36-0.24-1.83-0.73s-0.74-1.16-0.81-2.02h1.13 c0.07 0.57 0.23 1 0.49 1.29s0.59 0.43 1.01 0.43c0.47 0 0.84-0.2 1.1-0.61c0.26-0.41 0.4-0.96 0.4-1.65 c0-0.65-0.14-1.18-0.43-1.59S3.76 8.09 3.28 8.09c-0.4 0-0.72 0.1-0.96 0.31L1.99 8.73L1.03 8.47z"/>
+ </group>
+ <group>
+ <path android:fillColor="#FF000000"
+ android:pathData="M 18.93,5.74 L 18.93,3.39 L 17.63,3.39 L 17.63,5.74 L 15.28,5.74 L 15.28,7.04 L 17.63,7.04 L 17.63,9.39 L 18.93,9.39 L 18.93,7.04 L 21.28,7.04 L 21.28,5.74 z"/>
+ </group>
+ <path android:fillColor="#FF000000"
+ android:pathData="M13.78 12.24l-0.22 0.27c-0.63 0.73-1.55 1.1-2.76 1.1c-1.08 0-1.92-0.36-2.53-1.07s-0.93-1.72-0.94-3.02V7.56 c0-1.39 0.28-2.44 0.84-3.13s1.39-1.04 2.51-1.04c0.95 0 1.69 0.26 2.23 0.79s0.83 1.28 0.89 2.26h-1.25 c-0.05-0.62-0.22-1.1-0.52-1.45s-0.74-0.52-1.34-0.52c-0.72 0-1.24 0.23-1.57 0.7S8.6 6.37 8.59 7.4v2.03c0 1 0.19 1.77 0.57 2.31 c0.38 0.54 0.93 0.8 1.65 0.8c0.67 0 1.19-0.16 1.54-0.49l0.18-0.17V9.59h-1.82V8.52h3.07V12.24z"/>
+ </group>
+</vector>
diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml
index 997b50b..4437f49 100644
--- a/packages/SystemUI/res/values/strings.xml
+++ b/packages/SystemUI/res/values/strings.xml
@@ -390,6 +390,12 @@
<!-- Content description of the data connection type LTE+. [CHAR LIMIT=NONE] -->
<string name="data_connection_lte_plus">LTE+</string>
+ <!-- Content description of the data connection type 5G. [CHAR LIMIT=NONE] -->
+ <string name="data_connection_5g" translate="false">5G</string>
+
+ <!-- Content description of the data connection type 5G+. [CHAR LIMIT=NONE] -->
+ <string name="data_connection_5g_plus" translate="false">5G+</string>
+
<!-- Content description of the data connection type CDMA. [CHAR LIMIT=NONE] -->
<string name="data_connection_cdma">1X</string>
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSAnimator.java b/packages/SystemUI/src/com/android/systemui/qs/QSAnimator.java
index 2a4bb60..7148351 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QSAnimator.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSAnimator.java
@@ -127,12 +127,12 @@
@Override
public void onTuningChanged(String key, String newValue) {
if (ALLOW_FANCY_ANIMATION.equals(key)) {
- mAllowFancy = newValue == null || Integer.parseInt(newValue) != 0;
+ mAllowFancy = TunerService.parseIntegerSwitch(newValue, true);
if (!mAllowFancy) {
clearAnimationState();
}
} else if (MOVE_FULL_ROWS.equals(key)) {
- mFullRows = newValue == null || Integer.parseInt(newValue) != 0;
+ mFullRows = TunerService.parseIntegerSwitch(newValue, true);
} else if (QuickQSPanel.NUM_QUICK_TILES.equals(key)) {
mNumQuickTiles = mQuickQsPanel.getNumQuickTiles(mQs.getContext());
clearAnimationState();
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java b/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java
index 3fc258b..bdc73d9 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java
@@ -191,7 +191,7 @@
}
private void updateViewVisibilityForTuningValue(View view, @Nullable String newValue) {
- view.setVisibility(newValue == null || Integer.parseInt(newValue) != 0 ? VISIBLE : GONE);
+ view.setVisibility(TunerService.parseIntegerSwitch(newValue, true) ? VISIBLE : GONE);
}
public void openDetails(String subPanel) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/Clock.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/Clock.java
index 8517d90..9c2060d 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/Clock.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/Clock.java
@@ -274,7 +274,7 @@
@Override
public void onTuningChanged(String key, String newValue) {
if (CLOCK_SECONDS.equals(key)) {
- mShowSeconds = newValue != null && Integer.parseInt(newValue) != 0;
+ mShowSeconds = TunerService.parseIntegerSwitch(newValue, false);
updateShowSeconds();
} else {
setClockVisibleByUser(!StatusBarIconController.getIconBlacklist(newValue)
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java
index a046675..2f7e3b18 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java
@@ -22,6 +22,7 @@
import android.os.Handler;
import android.os.Looper;
import android.provider.Settings.Global;
+import android.telephony.NetworkRegistrationInfo;
import android.telephony.PhoneStateListener;
import android.telephony.ServiceState;
import android.telephony.SignalStrength;
@@ -457,7 +458,13 @@
mCurrentState.level = mSignalStrength.getLevel();
}
}
- if (mNetworkToIconLookup.indexOfKey(mDataNetType) >= 0) {
+
+ // When the device is camped on a 5G Non-Standalone network, the data network type is still
+ // LTE. In this case, we first check which 5G icon should be shown.
+ MobileIconGroup nr5GIconGroup = getNr5GIconGroup();
+ if (nr5GIconGroup != null) {
+ mCurrentState.iconGroup = nr5GIconGroup;
+ } else if (mNetworkToIconLookup.indexOfKey(mDataNetType) >= 0) {
mCurrentState.iconGroup = mNetworkToIconLookup.get(mDataNetType);
} else {
mCurrentState.iconGroup = mDefaultIcons;
@@ -484,6 +491,36 @@
notifyListenersIfNecessary();
}
+ private MobileIconGroup getNr5GIconGroup() {
+ if (mServiceState == null) return null;
+
+ int nrState = mServiceState.getNrState();
+ if (nrState == NetworkRegistrationInfo.NR_STATE_CONNECTED) {
+ // Check if the NR 5G is using millimeter wave and the icon is config.
+ if (mServiceState.getNrFrequencyRange() == ServiceState.FREQUENCY_RANGE_MMWAVE) {
+ if (mConfig.nr5GIconMap.containsKey(Config.NR_CONNECTED_MMWAVE)) {
+ return mConfig.nr5GIconMap.get(Config.NR_CONNECTED_MMWAVE);
+ }
+ }
+
+ // If NR 5G is not using millimeter wave or there is no icon for millimeter wave, we
+ // check the normal 5G icon.
+ if (mConfig.nr5GIconMap.containsKey(Config.NR_CONNECTED)) {
+ return mConfig.nr5GIconMap.get(Config.NR_CONNECTED);
+ }
+ } else if (nrState == NetworkRegistrationInfo.NR_STATE_NOT_RESTRICTED) {
+ if (mConfig.nr5GIconMap.containsKey(Config.NR_NOT_RESTRICTED)) {
+ return mConfig.nr5GIconMap.get(Config.NR_NOT_RESTRICTED);
+ }
+ } else if (nrState == NetworkRegistrationInfo.NR_STATE_RESTRICTED) {
+ if (mConfig.nr5GIconMap.containsKey(Config.NR_RESTRICTED)) {
+ return mConfig.nr5GIconMap.get(Config.NR_RESTRICTED);
+ }
+ }
+
+ return null;
+ }
+
private boolean isDataDisabled() {
return !mPhone.getDataEnabled(mSubscriptionInfo.getSubscriptionId());
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java
index 326147d..b83fa62 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java
@@ -16,6 +16,8 @@
package com.android.systemui.statusbar.policy;
+import static android.net.NetworkCapabilities.NET_CAPABILITY_VALIDATED;
+
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
@@ -54,18 +56,18 @@
import com.android.systemui.R;
import com.android.systemui.settings.CurrentUserTracker;
import com.android.systemui.statusbar.policy.DeviceProvisionedController.DeviceProvisionedListener;
+import com.android.systemui.statusbar.policy.MobileSignalController.MobileIconGroup;
-import com.android.systemui.statusbar.policy.MobileSignalController.MobileState;
import java.io.FileDescriptor;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.BitSet;
import java.util.Collections;
import java.util.Comparator;
+import java.util.HashMap;
import java.util.List;
import java.util.Locale;
-
-import static android.net.NetworkCapabilities.NET_CAPABILITY_VALIDATED;
+import java.util.Map;
/** Platform implementation of the network controller. **/
public class NetworkControllerImpl extends BroadcastReceiver
@@ -1026,6 +1028,13 @@
@VisibleForTesting
static class Config {
+ static final int NR_CONNECTED_MMWAVE = 1;
+ static final int NR_CONNECTED = 2;
+ static final int NR_NOT_RESTRICTED = 3;
+ static final int NR_RESTRICTED = 4;
+
+ Map<Integer, MobileIconGroup> nr5GIconMap = new HashMap<>();
+
boolean showAtLeast3G = false;
boolean alwaysShowCdmaRssi = false;
boolean show4gForLte = false;
@@ -1034,6 +1043,19 @@
boolean inflateSignalStrengths = false;
boolean alwaysShowDataRatIcon = false;
+ /**
+ * Mapping from NR 5G status string to an integer. The NR 5G status string should match
+ * those in carrier config.
+ */
+ private static final Map<String, Integer> NR_STATUS_STRING_TO_INDEX;
+ static {
+ NR_STATUS_STRING_TO_INDEX = new HashMap<>(4);
+ NR_STATUS_STRING_TO_INDEX.put("connected_mmwave", NR_CONNECTED_MMWAVE);
+ NR_STATUS_STRING_TO_INDEX.put("connected", NR_CONNECTED);
+ NR_STATUS_STRING_TO_INDEX.put("not_restricted", NR_NOT_RESTRICTED);
+ NR_STATUS_STRING_TO_INDEX.put("restricted", NR_RESTRICTED);
+ }
+
static Config readConfig(Context context) {
Config config = new Config();
Resources res = context.getResources();
@@ -1058,8 +1080,46 @@
CarrierConfigManager.KEY_SHOW_4G_FOR_LTE_DATA_ICON_BOOL);
config.hideLtePlus = b.getBoolean(
CarrierConfigManager.KEY_HIDE_LTE_PLUS_DATA_ICON_BOOL);
+ String nr5GIconConfiguration =
+ b.getString(CarrierConfigManager.KEY_5G_ICON_CONFIGURATION_STRING);
+ if (!TextUtils.isEmpty(nr5GIconConfiguration)) {
+ String[] nr5GIconConfigPairs = nr5GIconConfiguration.trim().split(",");
+ for (String pair : nr5GIconConfigPairs) {
+ add5GIconMapping(pair, config);
+ }
+ }
}
+
return config;
}
+
+ /**
+ * Add a mapping from NR 5G status to the 5G icon. All the icon resources come from
+ * {@link TelephonyIcons}.
+ *
+ * @param keyValuePair the NR 5G status and icon name separated by a colon.
+ * @param config container that used to store the parsed configs.
+ */
+ @VisibleForTesting
+ static void add5GIconMapping(String keyValuePair, Config config) {
+ String[] kv = (keyValuePair.trim().toLowerCase()).split(":");
+
+ if (kv.length != 2) {
+ if (DEBUG) Log.e(TAG, "Invalid 5G icon configuration, config = " + keyValuePair);
+ return;
+ }
+
+ String key = kv[0], value = kv[1];
+
+ // There is no icon config for the specific 5G status.
+ if (value.equals("none")) return;
+
+ if (NR_STATUS_STRING_TO_INDEX.containsKey(key)
+ && TelephonyIcons.ICON_NAME_TO_ICON.containsKey(value)) {
+ config.nr5GIconMap.put(
+ NR_STATUS_STRING_TO_INDEX.get(key),
+ TelephonyIcons.ICON_NAME_TO_ICON.get(value));
+ }
+ }
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/TelephonyIcons.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/TelephonyIcons.java
index bd76820..7347f66 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/TelephonyIcons.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/TelephonyIcons.java
@@ -19,6 +19,9 @@
import com.android.systemui.R;
import com.android.systemui.statusbar.policy.MobileSignalController.MobileIconGroup;
+import java.util.HashMap;
+import java.util.Map;
+
class TelephonyIcons {
//***** Data connection icons
static final int FLIGHT_MODE_ICON = R.drawable.stat_sys_airplane_mode;
@@ -33,6 +36,8 @@
static final int ICON_4G = R.drawable.ic_4g_mobiledata;
static final int ICON_4G_PLUS = R.drawable.ic_4g_plus_mobiledata;
static final int ICON_1X = R.drawable.ic_1x_mobiledata;
+ static final int ICON_5G = R.drawable.ic_5g_mobiledata;
+ static final int ICON_5G_PLUS = R.drawable.ic_5g_plus_mobiledata;
static final MobileIconGroup CARRIER_NETWORK_CHANGE = new MobileIconGroup(
"CARRIER_NETWORK_CHANGE",
@@ -199,6 +204,34 @@
TelephonyIcons.ICON_LTE_PLUS,
true);
+ static final MobileIconGroup NR_5G = new MobileIconGroup(
+ "5G",
+ null,
+ null,
+ AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH,
+ 0,
+ 0,
+ 0,
+ 0,
+ AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH[0],
+ R.string.data_connection_5g,
+ TelephonyIcons.ICON_5G,
+ true);
+
+ static final MobileIconGroup NR_5G_PLUS = new MobileIconGroup(
+ "5G_PLUS",
+ null,
+ null,
+ AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH,
+ 0,
+ 0,
+ 0,
+ 0,
+ AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH[0],
+ R.string.data_connection_5g_plus,
+ TelephonyIcons.ICON_5G_PLUS,
+ true);
+
static final MobileIconGroup DATA_DISABLED = new MobileIconGroup(
"DataDisabled",
null,
@@ -211,5 +244,27 @@
R.string.cell_data_off_content_description,
0,
false);
+
+ /** Mapping icon name(lower case) to the icon object. */
+ static final Map<String, MobileIconGroup> ICON_NAME_TO_ICON;
+ static {
+ ICON_NAME_TO_ICON = new HashMap<>();
+ ICON_NAME_TO_ICON.put("carrier_network_change", CARRIER_NETWORK_CHANGE);
+ ICON_NAME_TO_ICON.put("3g", THREE_G);
+ ICON_NAME_TO_ICON.put("wfc", WFC);
+ ICON_NAME_TO_ICON.put("unknown", UNKNOWN);
+ ICON_NAME_TO_ICON.put("e", E);
+ ICON_NAME_TO_ICON.put("1x", ONE_X);
+ ICON_NAME_TO_ICON.put("g", G);
+ ICON_NAME_TO_ICON.put("h", H);
+ ICON_NAME_TO_ICON.put("h+", H_PLUS);
+ ICON_NAME_TO_ICON.put("4g", FOUR_G);
+ ICON_NAME_TO_ICON.put("4g+", FOUR_G_PLUS);
+ ICON_NAME_TO_ICON.put("lte", LTE);
+ ICON_NAME_TO_ICON.put("lte+", LTE_PLUS);
+ ICON_NAME_TO_ICON.put("5g", NR_5G);
+ ICON_NAME_TO_ICON.put("5g_plus", NR_5G_PLUS);
+ ICON_NAME_TO_ICON.put("datadisable", DATA_DISABLED);
+ }
}
diff --git a/packages/SystemUI/src/com/android/systemui/tuner/TunerService.java b/packages/SystemUI/src/com/android/systemui/tuner/TunerService.java
index 3a9d1c7..35ade2c 100644
--- a/packages/SystemUI/src/com/android/systemui/tuner/TunerService.java
+++ b/packages/SystemUI/src/com/android/systemui/tuner/TunerService.java
@@ -109,4 +109,12 @@
});
dialog.show();
}
+
+ public static boolean parseIntegerSwitch(String value, boolean defaultValue) {
+ try {
+ return value != null ? Integer.parseInt(value) != 0 : defaultValue;
+ } catch (NumberFormatException e) {
+ return defaultValue;
+ }
+ }
}
diff --git a/packages/SystemUI/src/com/android/systemui/tuner/TunerSwitch.java b/packages/SystemUI/src/com/android/systemui/tuner/TunerSwitch.java
index f53d516..89049f8 100644
--- a/packages/SystemUI/src/com/android/systemui/tuner/TunerSwitch.java
+++ b/packages/SystemUI/src/com/android/systemui/tuner/TunerSwitch.java
@@ -38,7 +38,7 @@
@Override
public void onTuningChanged(String key, String newValue) {
- setChecked(newValue != null ? Integer.parseInt(newValue) != 0 : mDefault);
+ setChecked(TunerService.parseIntegerSwitch(newValue, mDefault));
}
@Override
diff --git a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogComponent.java b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogComponent.java
index dd55264..d089b2f 100644
--- a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogComponent.java
+++ b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogComponent.java
@@ -108,28 +108,23 @@
@Override
public void onTuningChanged(String key, String newValue) {
+ boolean volumeDownToEnterSilent = mVolumePolicy.volumeDownToEnterSilent;
+ boolean volumeUpToExitSilent = mVolumePolicy.volumeUpToExitSilent;
+ boolean doNotDisturbWhenSilent = mVolumePolicy.doNotDisturbWhenSilent;
+
if (VOLUME_DOWN_SILENT.equals(key)) {
- final boolean volumeDownToEnterSilent = newValue != null
- ? Integer.parseInt(newValue) != 0
- : DEFAULT_VOLUME_DOWN_TO_ENTER_SILENT;
- setVolumePolicy(volumeDownToEnterSilent,
- mVolumePolicy.volumeUpToExitSilent, mVolumePolicy.doNotDisturbWhenSilent,
- mVolumePolicy.vibrateToSilentDebounce);
+ volumeDownToEnterSilent =
+ TunerService.parseIntegerSwitch(newValue, DEFAULT_VOLUME_DOWN_TO_ENTER_SILENT);
} else if (VOLUME_UP_SILENT.equals(key)) {
- final boolean volumeUpToExitSilent = newValue != null
- ? Integer.parseInt(newValue) != 0
- : DEFAULT_VOLUME_UP_TO_EXIT_SILENT;
- setVolumePolicy(mVolumePolicy.volumeDownToEnterSilent,
- volumeUpToExitSilent, mVolumePolicy.doNotDisturbWhenSilent,
- mVolumePolicy.vibrateToSilentDebounce);
+ volumeUpToExitSilent =
+ TunerService.parseIntegerSwitch(newValue, DEFAULT_VOLUME_UP_TO_EXIT_SILENT);
} else if (VOLUME_SILENT_DO_NOT_DISTURB.equals(key)) {
- final boolean doNotDisturbWhenSilent = newValue != null
- ? Integer.parseInt(newValue) != 0
- : DEFAULT_DO_NOT_DISTURB_WHEN_SILENT;
- setVolumePolicy(mVolumePolicy.volumeDownToEnterSilent,
- mVolumePolicy.volumeUpToExitSilent, doNotDisturbWhenSilent,
- mVolumePolicy.vibrateToSilentDebounce);
+ doNotDisturbWhenSilent =
+ TunerService.parseIntegerSwitch(newValue, DEFAULT_DO_NOT_DISTURB_WHEN_SILENT);
}
+
+ setVolumePolicy(volumeDownToEnterSilent, volumeUpToExitSilent, doNotDisturbWhenSilent,
+ mVolumePolicy.vibrateToSilentDebounce);
}
private void setVolumePolicy(boolean volumeDownToEnterSilent, boolean volumeUpToExitSilent,
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerBaseTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerBaseTest.java
index 55b4d27..c1f8885 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerBaseTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerBaseTest.java
@@ -213,6 +213,11 @@
NetworkCapabilities.TRANSPORT_CELLULAR, true, true);
}
+ public void setupDefaultNr5GIconConfiguration() {
+ NetworkControllerImpl.Config.add5GIconMapping("connected_mmwave:5g_plus", mConfig);
+ NetworkControllerImpl.Config.add5GIconMapping("connected:5g", mConfig);
+ }
+
public void setConnectivityViaBroadcast(
int networkType, boolean validated, boolean isConnected) {
setConnectivityCommon(networkType, validated, isConnected);
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerDataTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerDataTest.java
index d42940a..96fad21 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerDataTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerDataTest.java
@@ -1,11 +1,14 @@
package com.android.systemui.statusbar.policy;
import static org.mockito.Matchers.anyInt;
+import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
import android.net.NetworkCapabilities;
import android.os.Looper;
+import android.telephony.NetworkRegistrationInfo;
+import android.telephony.ServiceState;
import android.telephony.TelephonyManager;
import android.test.suitebuilder.annotation.SmallTest;
import android.testing.AndroidTestingRunner;
@@ -16,6 +19,7 @@
import org.junit.Test;
import org.junit.runner.RunWith;
+import org.mockito.Mockito;
@SmallTest
@RunWith(AndroidTestingRunner.class)
@@ -141,6 +145,47 @@
}
@Test
+ public void testNr5GIcon_NrConnectedWithoutMMWave_show5GIcon() {
+ setupDefaultNr5GIconConfiguration();
+ setupDefaultSignal();
+ updateDataConnectionState(TelephonyManager.DATA_CONNECTED,
+ TelephonyManager.NETWORK_TYPE_LTE);
+ ServiceState ss = Mockito.mock(ServiceState.class);
+ doReturn(NetworkRegistrationInfo.NR_STATE_CONNECTED).when(ss).getNrState();
+ doReturn(ServiceState.FREQUENCY_RANGE_HIGH).when(ss).getNrFrequencyRange();
+ mPhoneStateListener.onServiceStateChanged(ss);
+
+ verifyDataIndicators(TelephonyIcons.ICON_5G);
+ }
+
+ @Test
+ public void testNr5GIcon_NrConnectedWithMMWave_show5GPlusIcon() {
+ setupDefaultNr5GIconConfiguration();
+ setupDefaultSignal();
+ updateDataConnectionState(TelephonyManager.DATA_CONNECTED,
+ TelephonyManager.NETWORK_TYPE_LTE);
+ ServiceState ss = Mockito.mock(ServiceState.class);
+ doReturn(NetworkRegistrationInfo.NR_STATE_CONNECTED).when(ss).getNrState();
+ doReturn(ServiceState.FREQUENCY_RANGE_MMWAVE).when(ss).getNrFrequencyRange();
+ mPhoneStateListener.onServiceStateChanged(ss);
+
+ verifyDataIndicators(TelephonyIcons.ICON_5G_PLUS);
+ }
+
+ @Test
+ public void testNr5GIcon_NrRestricted_showLteIcon() {
+ setupDefaultNr5GIconConfiguration();
+ setupDefaultSignal();
+ updateDataConnectionState(TelephonyManager.DATA_CONNECTED,
+ TelephonyManager.NETWORK_TYPE_LTE);
+ ServiceState ss = Mockito.mock(ServiceState.class);
+ doReturn(NetworkRegistrationInfo.NR_STATE_RESTRICTED).when(ss).getNrState();
+ mPhoneStateListener.onServiceStateChanged(mServiceState);
+
+ verifyDataIndicators(TelephonyIcons.ICON_LTE);
+ }
+
+ @Test
public void testDataDisabledIcon_UserNotSetup() {
setupNetworkController();
when(mMockTm.getDataEnabled(mSubId)).thenReturn(false);
@@ -222,5 +267,4 @@
true, DEFAULT_QS_SIGNAL_STRENGTH, dataIcon, false,
false);
}
-
}
diff --git a/services/Android.bp b/services/Android.bp
index a416ca0..bea51be 100644
--- a/services/Android.bp
+++ b/services/Android.bp
@@ -23,7 +23,6 @@
"services.companion",
"services.coverage",
"services.devicepolicy",
- "services.ipmemorystore",
"services.midi",
"services.net",
"services.print",
diff --git a/services/core/java/com/android/server/ConnectivityService.java b/services/core/java/com/android/server/ConnectivityService.java
index 27fc4c3..52fcd4a 100644
--- a/services/core/java/com/android/server/ConnectivityService.java
+++ b/services/core/java/com/android/server/ConnectivityService.java
@@ -41,7 +41,6 @@
import static android.net.NetworkPolicyManager.RULE_NONE;
import static android.net.NetworkPolicyManager.uidRulesToString;
import static android.net.shared.NetworkMonitorUtils.isValidationRequired;
-import static android.net.shared.NetworkParcelableUtil.toStableParcelable;
import static android.os.Process.INVALID_UID;
import static android.system.OsConstants.IPPROTO_TCP;
import static android.system.OsConstants.IPPROTO_UDP;
@@ -2175,7 +2174,7 @@
if (VDBG) log("identical MTU - not setting");
return;
}
- if (LinkProperties.isValidMtu(mtu, newLp.hasGlobalIPv6Address()) == false) {
+ if (!LinkProperties.isValidMtu(mtu, newLp.hasGlobalIpv6Address())) {
if (mtu != 0) loge("Unexpected mtu value: " + mtu + ", " + iface);
return;
}
@@ -2562,19 +2561,11 @@
final boolean partialConnectivity =
(msg.arg1 == NETWORK_TEST_RESULT_PARTIAL_CONNECTIVITY)
- // If user accepts partial connectivity network, NetworkMonitor
- // will skip https probing. It will make partial connectivity
- // network becomes valid. But user still need to know this
- // network is limited. So, it's needed to refer to
- // acceptPartialConnectivity to add
- // NET_CAPABILITY_PARTIAL_CONNECTIVITY into NetworkCapabilities
- // of this network. So that user can see "Limited connection"
- // in the settings.
|| (nai.networkMisc.acceptPartialConnectivity
&& nai.partialConnectivity);
// Once a network is determined to have partial connectivity, it cannot
// go back to full connectivity without a disconnect.
- final boolean partialConnectivityChange =
+ final boolean partialConnectivityChanged =
(partialConnectivity && !nai.partialConnectivity);
final boolean valid = (msg.arg1 == NETWORK_TEST_RESULT_VALID);
@@ -2585,17 +2576,6 @@
nai.captivePortalLoginNotified = true;
showNetworkNotification(nai, NotificationType.LOGGED_IN);
}
- // If this network has just connected and partial connectivity has just been
- // detected, tell NetworkMonitor if the user accepted partial connectivity on a
- // previous connect.
- if ((msg.arg1 == NETWORK_TEST_RESULT_PARTIAL_CONNECTIVITY)
- && nai.networkMisc.acceptPartialConnectivity) {
- try {
- nai.networkMonitor().notifyAcceptPartialConnectivity();
- } catch (RemoteException e) {
- e.rethrowFromSystemServer();
- }
- }
final String redirectUrl = (msg.obj instanceof String) ? (String) msg.obj : "";
@@ -2625,7 +2605,7 @@
mNotifier.clearNotification(nai.network.netId,
NotificationType.LOST_INTERNET);
}
- } else if (partialConnectivityChange) {
+ } else if (partialConnectivityChanged) {
nai.partialConnectivity = partialConnectivity;
updateCapabilities(nai.getCurrentScore(), nai, nai.networkCapabilities);
}
@@ -3379,8 +3359,11 @@
// Tear down the network.
teardownUnneededNetwork(nai);
} else {
+ // Inform NetworkMonitor that partial connectivity is acceptable. This will likely
+ // result in a partial connectivity result which will be processed by
+ // maybeHandleNetworkMonitorMessage.
try {
- nai.networkMonitor().notifyAcceptPartialConnectivity();
+ nai.networkMonitor().setAcceptPartialConnectivity();
} catch (RemoteException e) {
e.rethrowFromSystemServer();
}
@@ -3588,6 +3571,9 @@
// because we're already prompting the user to sign in.
if (nai == null || nai.everValidated || nai.everCaptivePortalDetected
|| !nai.networkMisc.explicitlySelected || nai.networkMisc.acceptUnvalidated
+ // TODO: Once the value of acceptPartialConnectivity is moved to IpMemoryStore,
+ // we should reevaluate how to handle acceptPartialConnectivity when network just
+ // connected.
|| nai.networkMisc.acceptPartialConnectivity) {
return;
}
@@ -5390,7 +5376,7 @@
final long token = Binder.clearCallingIdentity();
try {
getNetworkStack().makeNetworkMonitor(
- toStableParcelable(nai.network), name, new NetworkMonitorCallbacks(nai));
+ nai.network, name, new NetworkMonitorCallbacks(nai));
} finally {
Binder.restoreCallingIdentity(token);
}
@@ -6396,6 +6382,9 @@
// NetworkMonitor seeing the correct LinkProperties when starting.
// TODO: pass LinkProperties to the NetworkMonitor in the notifyNetworkConnected call.
try {
+ if (networkAgent.networkMisc.acceptPartialConnectivity) {
+ networkAgent.networkMonitor().setAcceptPartialConnectivity();
+ }
networkAgent.networkMonitor().notifyNetworkConnected();
} catch (RemoteException e) {
e.rethrowFromSystemServer();
diff --git a/services/core/java/com/android/server/DynamicAndroidService.java b/services/core/java/com/android/server/DynamicAndroidService.java
index 8488941..b02bfb1 100644
--- a/services/core/java/com/android/server/DynamicAndroidService.java
+++ b/services/core/java/com/android/server/DynamicAndroidService.java
@@ -25,6 +25,7 @@
import android.os.IDynamicAndroidService;
import android.os.RemoteException;
import android.os.ServiceManager;
+import android.os.SystemProperties;
import android.util.Slog;
/**
@@ -34,6 +35,7 @@
public class DynamicAndroidService extends IDynamicAndroidService.Stub implements DeathRecipient {
private static final String TAG = "DynamicAndroidService";
private static final String NO_SERVICE_ERROR = "no gsiservice";
+ private static final int GSID_ROUGH_TIMEOUT_MS = 8192;
private Context mContext;
private volatile IGsiService mGsiService;
@@ -66,12 +68,27 @@
private IGsiService getGsiService() throws RemoteException {
checkPermission();
- synchronized (this) {
- if (mGsiService == null) {
- mGsiService = connect(this);
- }
- return mGsiService;
+ if (!"running".equals(SystemProperties.get("init.svc.gsid"))) {
+ SystemProperties.set("ctl.start", "gsid");
}
+ for (int sleepMs = 64; sleepMs <= (GSID_ROUGH_TIMEOUT_MS << 1); sleepMs <<= 1) {
+ try {
+ Thread.sleep(sleepMs);
+ } catch (InterruptedException e) {
+ Slog.e(TAG, "Interrupted when waiting for GSID");
+ break;
+ }
+ if ("running".equals(SystemProperties.get("init.svc.gsid"))) {
+ synchronized (this) {
+ if (mGsiService == null) {
+ mGsiService = connect(this);
+ }
+ return mGsiService;
+ }
+ }
+ }
+ Slog.e(TAG, "Unable to start gsid");
+ return null;
}
private void checkPermission() {
diff --git a/services/core/java/com/android/server/NetworkManagementService.java b/services/core/java/com/android/server/NetworkManagementService.java
index a9645c4..06b85da 100644
--- a/services/core/java/com/android/server/NetworkManagementService.java
+++ b/services/core/java/com/android/server/NetworkManagementService.java
@@ -39,7 +39,6 @@
import static android.net.NetworkStats.UID_ALL;
import static android.net.TrafficStats.UID_TETHERING;
-import static com.android.server.NetworkManagementService.NetdResponseCode.TtyListResult;
import static com.android.server.NetworkManagementSocketTagger.PROP_QTAGUID_ENABLED;
import android.annotation.NonNull;
@@ -62,6 +61,7 @@
import android.net.RouteInfo;
import android.net.TetherStatsParcel;
import android.net.UidRange;
+import android.net.UidRangeParcel;
import android.net.util.NetdService;
import android.os.BatteryStats;
import android.os.Binder;
@@ -69,7 +69,6 @@
import android.os.IBinder;
import android.os.INetworkActivityListener;
import android.os.INetworkManagementService;
-import android.os.PowerManager;
import android.os.Process;
import android.os.RemoteCallbackList;
import android.os.RemoteException;
@@ -80,6 +79,7 @@
import android.os.SystemProperties;
import android.os.Trace;
import android.telephony.DataConnectionRealTimeInfo;
+import android.text.TextUtils;
import android.util.Log;
import android.util.Slog;
import android.util.SparseBooleanArray;
@@ -109,13 +109,11 @@
import java.util.HashMap;
import java.util.List;
import java.util.Map;
-import java.util.concurrent.CountDownLatch;
/**
* @hide
*/
-public class NetworkManagementService extends INetworkManagementService.Stub
- implements Watchdog.Monitor {
+public class NetworkManagementService extends INetworkManagementService.Stub {
/**
* Helper class that encapsulates NetworkManagementService dependencies and makes them
@@ -135,8 +133,6 @@
private static final String TAG = "NetworkManagement";
private static final boolean DBG = Log.isLoggable(TAG, Log.DEBUG);
- private static final String NETD_TAG = "NetdConnector";
- static final String NETD_SERVICE_NAME = "netd";
private static final int MAX_UID_RANGES_PER_COMMAND = 10;
@@ -146,44 +142,6 @@
*/
public static final String LIMIT_GLOBAL_ALERT = "globalAlert";
- static class NetdResponseCode {
- /* Keep in sync with system/netd/server/ResponseCode.h */
- public static final int InterfaceListResult = 110;
- public static final int TetherInterfaceListResult = 111;
- public static final int TetherDnsFwdTgtListResult = 112;
- public static final int TtyListResult = 113;
- public static final int TetheringStatsListResult = 114;
-
- public static final int TetherStatusResult = 210;
- public static final int IpFwdStatusResult = 211;
- public static final int InterfaceGetCfgResult = 213;
- public static final int SoftapStatusResult = 214;
- public static final int InterfaceRxCounterResult = 216;
- public static final int InterfaceTxCounterResult = 217;
- public static final int QuotaCounterResult = 220;
- public static final int TetheringStatsResult = 221;
- public static final int DnsProxyQueryResult = 222;
- public static final int ClatdStatusResult = 223;
-
- public static final int InterfaceChange = 600;
- public static final int BandwidthControl = 601;
- public static final int InterfaceClassActivity = 613;
- public static final int InterfaceAddressChange = 614;
- public static final int InterfaceDnsServerInfo = 615;
- public static final int RouteChange = 616;
- public static final int StrictCleartext = 617;
- }
-
- /**
- * String indicating a softap command.
- */
- static final String SOFT_AP_COMMAND = "softap";
-
- /**
- * String passed back to netd connector indicating softap command success.
- */
- static final String SOFT_AP_COMMAND_SUCCESS = "Ok";
-
static final int DAEMON_MSG_MOBILE_CONN_REAL_TIME_INFO = 1;
static final boolean MODIFY_OPERATION_ADD = true;
@@ -194,12 +152,6 @@
*/
private final Context mContext;
- /**
- * connector object for communicating with netd
- */
- private final NativeDaemonConnector mConnector;
-
- private final Handler mFgHandler;
private final Handler mDaemonHandler;
private final SystemServices mServices;
@@ -210,9 +162,6 @@
private IBatteryStats mBatteryStats;
- private final Thread mThread;
- private CountDownLatch mConnectedSignal = new CountDownLatch(1);
-
private final RemoteCallbackList<INetworkManagementEventObserver> mObservers =
new RemoteCallbackList<>();
@@ -304,32 +253,14 @@
* @param context Binder context for this service
*/
private NetworkManagementService(
- Context context, String socket, SystemServices services) {
+ Context context, SystemServices services) {
mContext = context;
mServices = services;
- // make sure this is on the same looper as our NativeDaemonConnector for sync purposes
- mFgHandler = new Handler(FgThread.get().getLooper());
-
- // Don't need this wake lock, since we now have a time stamp for when
- // the network actually went inactive. (It might be nice to still do this,
- // but I don't want to do it through the power manager because that pollutes the
- // battery stats history with pointless noise.)
- //PowerManager pm = (PowerManager)context.getSystemService(Context.POWER_SERVICE);
- PowerManager.WakeLock wl = null; //pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, NETD_TAG);
-
- mConnector = new NativeDaemonConnector(
- new NetdCallbackReceiver(), socket, 10, NETD_TAG, 160, wl,
- FgThread.get().getLooper());
- mThread = new Thread(mConnector, NETD_TAG);
-
mDaemonHandler = new Handler(FgThread.get().getLooper());
mNetdUnsolicitedEventListener = new NetdUnsolicitedEventListener();
- // Add ourself to the Watchdog monitors.
- Watchdog.getInstance().addMonitor(this);
-
mServices.registerLocalService(new LocalService());
synchronized (mTetheringStatsProviders) {
@@ -339,25 +270,17 @@
@VisibleForTesting
NetworkManagementService() {
- mConnector = null;
mContext = null;
mDaemonHandler = null;
- mFgHandler = null;
- mThread = null;
mServices = null;
mNetdUnsolicitedEventListener = null;
}
- static NetworkManagementService create(Context context, String socket, SystemServices services)
+ static NetworkManagementService create(Context context, SystemServices services)
throws InterruptedException {
final NetworkManagementService service =
- new NetworkManagementService(context, socket, services);
- final CountDownLatch connectedSignal = service.mConnectedSignal;
+ new NetworkManagementService(context, services);
if (DBG) Slog.d(TAG, "Creating NetworkManagementService");
- service.mThread.start();
- if (DBG) Slog.d(TAG, "Awaiting socket connection");
- connectedSignal.await();
- if (DBG) Slog.d(TAG, "Connected");
if (DBG) Slog.d(TAG, "Connecting native netd service");
service.connectNativeNetdService();
if (DBG) Slog.d(TAG, "Connected");
@@ -365,7 +288,7 @@
}
public static NetworkManagementService create(Context context) throws InterruptedException {
- return create(context, NETD_SERVICE_NAME, new SystemServices());
+ return create(context, new SystemServices());
}
public void systemReady() {
@@ -805,212 +728,6 @@
}
//
- // Netd Callback handling
- //
-
- private class NetdCallbackReceiver implements INativeDaemonConnectorCallbacks {
- @Override
- public void onDaemonConnected() {
- Slog.i(TAG, "onDaemonConnected()");
- // event is dispatched from internal NDC thread, so we prepare the
- // daemon back on main thread.
- if (mConnectedSignal != null) {
- // The system is booting and we're connecting to netd for the first time.
- mConnectedSignal.countDown();
- mConnectedSignal = null;
- } else {
- // We're reconnecting to netd after the socket connection
- // was interrupted (e.g., if it crashed).
- mFgHandler.post(new Runnable() {
- @Override
- public void run() {
- connectNativeNetdService();
- prepareNativeDaemon();
- }
- });
- }
- }
-
- @Override
- public boolean onCheckHoldWakeLock(int code) {
- return code == NetdResponseCode.InterfaceClassActivity;
- }
-
- @Override
- public boolean onEvent(int code, String raw, String[] cooked) {
- String errorMessage = String.format("Invalid event from daemon (%s)", raw);
- switch (code) {
- case NetdResponseCode.InterfaceChange:
- /*
- * a network interface change occured
- * Format: "NNN Iface added <name>"
- * "NNN Iface removed <name>"
- * "NNN Iface changed <name> <up/down>"
- * "NNN Iface linkstatus <name> <up/down>"
- */
- if (cooked.length < 4 || !cooked[1].equals("Iface")) {
- throw new IllegalStateException(errorMessage);
- }
- if (cooked[2].equals("added")) {
- notifyInterfaceAdded(cooked[3]);
- return true;
- } else if (cooked[2].equals("removed")) {
- notifyInterfaceRemoved(cooked[3]);
- return true;
- } else if (cooked[2].equals("changed") && cooked.length == 5) {
- notifyInterfaceStatusChanged(cooked[3], cooked[4].equals("up"));
- return true;
- } else if (cooked[2].equals("linkstate") && cooked.length == 5) {
- notifyInterfaceLinkStateChanged(cooked[3], cooked[4].equals("up"));
- return true;
- }
- throw new IllegalStateException(errorMessage);
- // break;
- case NetdResponseCode.BandwidthControl:
- /*
- * Bandwidth control needs some attention
- * Format: "NNN limit alert <alertName> <ifaceName>"
- */
- if (cooked.length < 5 || !cooked[1].equals("limit")) {
- throw new IllegalStateException(errorMessage);
- }
- if (cooked[2].equals("alert")) {
- notifyLimitReached(cooked[3], cooked[4]);
- return true;
- }
- throw new IllegalStateException(errorMessage);
- // break;
- case NetdResponseCode.InterfaceClassActivity:
- /*
- * An network interface class state changed (active/idle)
- * Format: "NNN IfaceClass <active/idle> <label>"
- */
- if (cooked.length < 4 || !cooked[1].equals("IfaceClass")) {
- throw new IllegalStateException(errorMessage);
- }
- long timestampNanos = 0;
- int processUid = -1;
- if (cooked.length >= 5) {
- try {
- timestampNanos = Long.parseLong(cooked[4]);
- if (cooked.length == 6) {
- processUid = Integer.parseInt(cooked[5]);
- }
- } catch(NumberFormatException ne) {}
- } else {
- timestampNanos = SystemClock.elapsedRealtimeNanos();
- }
- boolean isActive = cooked[2].equals("active");
- notifyInterfaceClassActivity(Integer.parseInt(cooked[3]),
- isActive, timestampNanos, processUid, false);
- return true;
- // break;
- case NetdResponseCode.InterfaceAddressChange:
- /*
- * A network address change occurred
- * Format: "NNN Address updated <addr> <iface> <flags> <scope>"
- * "NNN Address removed <addr> <iface> <flags> <scope>"
- */
- if (cooked.length < 7 || !cooked[1].equals("Address")) {
- throw new IllegalStateException(errorMessage);
- }
-
- String iface = cooked[4];
- LinkAddress address;
- try {
- int flags = Integer.parseInt(cooked[5]);
- int scope = Integer.parseInt(cooked[6]);
- address = new LinkAddress(cooked[3], flags, scope);
- } catch(NumberFormatException e) { // Non-numeric lifetime or scope.
- throw new IllegalStateException(errorMessage, e);
- } catch(IllegalArgumentException e) { // Malformed/invalid IP address.
- throw new IllegalStateException(errorMessage, e);
- }
-
- if (cooked[2].equals("updated")) {
- notifyAddressUpdated(iface, address);
- } else {
- notifyAddressRemoved(iface, address);
- }
- return true;
- // break;
- case NetdResponseCode.InterfaceDnsServerInfo:
- /*
- * Information about available DNS servers has been received.
- * Format: "NNN DnsInfo servers <interface> <lifetime> <servers>"
- */
- long lifetime; // Actually a 32-bit unsigned integer.
-
- if (cooked.length == 6 &&
- cooked[1].equals("DnsInfo") &&
- cooked[2].equals("servers")) {
- try {
- lifetime = Long.parseLong(cooked[4]);
- } catch (NumberFormatException e) {
- throw new IllegalStateException(errorMessage);
- }
- String[] servers = cooked[5].split(",");
- notifyInterfaceDnsServerInfo(cooked[3], lifetime, servers);
- }
- return true;
- // break;
- case NetdResponseCode.RouteChange:
- /*
- * A route has been updated or removed.
- * Format: "NNN Route <updated|removed> <dst> [via <gateway] [dev <iface>]"
- */
- if (!cooked[1].equals("Route") || cooked.length < 6) {
- throw new IllegalStateException(errorMessage);
- }
-
- String via = null;
- String dev = null;
- boolean valid = true;
- for (int i = 4; (i + 1) < cooked.length && valid; i += 2) {
- if (cooked[i].equals("dev")) {
- if (dev == null) {
- dev = cooked[i+1];
- } else {
- valid = false; // Duplicate interface.
- }
- } else if (cooked[i].equals("via")) {
- if (via == null) {
- via = cooked[i+1];
- } else {
- valid = false; // Duplicate gateway.
- }
- } else {
- valid = false; // Unknown syntax.
- }
- }
- if (valid) {
- try {
- // InetAddress.parseNumericAddress(null) inexplicably returns ::1.
- InetAddress gateway = null;
- if (via != null) gateway = InetAddress.parseNumericAddress(via);
- RouteInfo route = new RouteInfo(new IpPrefix(cooked[3]), gateway, dev);
- notifyRouteChange(cooked[2].equals("updated"), route);
- return true;
- } catch (IllegalArgumentException e) {}
- }
- throw new IllegalStateException(errorMessage);
- // break;
- case NetdResponseCode.StrictCleartext:
- final int uid = Integer.parseInt(cooked[1]);
- final byte[] firstPacket = HexDump.hexStringToByteArray(cooked[2]);
- try {
- ActivityManager.getService().notifyCleartextNetwork(uid, firstPacket);
- } catch (RemoteException ignored) {
- }
- break;
- default: break;
- }
- return false;
- }
- }
-
-
- //
// INetworkManagementService members
//
@Override
@@ -1023,6 +740,46 @@
}
}
+ /**
+ * Convert InterfaceConfiguration to InterfaceConfigurationParcel with given ifname.
+ */
+ private static InterfaceConfigurationParcel toStableParcel(InterfaceConfiguration cfg,
+ String iface) {
+ InterfaceConfigurationParcel cfgParcel = new InterfaceConfigurationParcel();
+ cfgParcel.ifName = iface;
+ String hwAddr = cfg.getHardwareAddress();
+ if (!TextUtils.isEmpty(hwAddr)) {
+ cfgParcel.hwAddr = hwAddr;
+ } else {
+ cfgParcel.hwAddr = "";
+ }
+ cfgParcel.ipv4Addr = cfg.getLinkAddress().getAddress().getHostAddress();
+ cfgParcel.prefixLength = cfg.getLinkAddress().getPrefixLength();
+ ArrayList<String> flags = new ArrayList<>();
+ for (String flag : cfg.getFlags()) {
+ flags.add(flag);
+ }
+ cfgParcel.flags = flags.toArray(new String[0]);
+
+ return cfgParcel;
+ }
+
+ /**
+ * Construct InterfaceConfiguration from InterfaceConfigurationParcel.
+ */
+ public static InterfaceConfiguration fromStableParcel(InterfaceConfigurationParcel p) {
+ InterfaceConfiguration cfg = new InterfaceConfiguration();
+ cfg.setHardwareAddress(p.hwAddr);
+
+ final InetAddress addr = NetworkUtils.numericToInetAddress(p.ipv4Addr);
+ cfg.setLinkAddress(new LinkAddress(addr, p.prefixLength));
+ for (String flag : p.flags) {
+ cfg.setFlag(flag);
+ }
+
+ return cfg;
+ }
+
@Override
public InterfaceConfiguration getInterfaceConfig(String iface) {
mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG);
@@ -1034,7 +791,7 @@
}
try {
- final InterfaceConfiguration cfg = InterfaceConfiguration.fromParcel(result);
+ final InterfaceConfiguration cfg = fromStableParcel(result);
return cfg;
} catch (IllegalArgumentException iae) {
throw new IllegalStateException("Invalid InterfaceConfigurationParcel", iae);
@@ -1049,7 +806,7 @@
throw new IllegalStateException("Null LinkAddress given");
}
- final InterfaceConfigurationParcel cfgParcel = cfg.toParcel(iface);
+ final InterfaceConfigurationParcel cfgParcel = toStableParcel(cfg, iface);
try {
mNetdService.interfaceSetCfg(cfgParcel);
@@ -1392,42 +1149,6 @@
}
@Override
- public String[] listTtys() {
- mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG);
- try {
- return NativeDaemonEvent.filterMessageList(
- mConnector.executeForList("list_ttys"), TtyListResult);
- } catch (NativeDaemonConnectorException e) {
- throw e.rethrowAsParcelableException();
- }
- }
-
- @Override
- public void attachPppd(
- String tty, String localAddr, String remoteAddr, String dns1Addr, String dns2Addr) {
- mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG);
- try {
- mConnector.execute("pppd", "attach", tty,
- NetworkUtils.numericToInetAddress(localAddr).getHostAddress(),
- NetworkUtils.numericToInetAddress(remoteAddr).getHostAddress(),
- NetworkUtils.numericToInetAddress(dns1Addr).getHostAddress(),
- NetworkUtils.numericToInetAddress(dns2Addr).getHostAddress());
- } catch (NativeDaemonConnectorException e) {
- throw e.rethrowAsParcelableException();
- }
- }
-
- @Override
- public void detachPppd(String tty) {
- mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG);
- try {
- mConnector.execute("pppd", "detach", tty);
- } catch (NativeDaemonConnectorException e) {
- throw e.rethrowAsParcelableException();
- }
- }
-
- @Override
public void addIdleTimer(String iface, int timeout, final int type) {
mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG);
@@ -1713,12 +1434,27 @@
}
}
+ private static UidRangeParcel makeUidRangeParcel(int start, int stop) {
+ UidRangeParcel range = new UidRangeParcel();
+ range.start = start;
+ range.stop = stop;
+ return range;
+ }
+
+ private static UidRangeParcel[] toStableParcels(UidRange[] ranges) {
+ UidRangeParcel[] stableRanges = new UidRangeParcel[ranges.length];
+ for (int i = 0; i < ranges.length; i++) {
+ stableRanges[i] = makeUidRangeParcel(ranges[i].start, ranges[i].stop);
+ }
+ return stableRanges;
+ }
+
@Override
public void setAllowOnlyVpnForUids(boolean add, UidRange[] uidRanges)
throws ServiceSpecificException {
mContext.enforceCallingOrSelfPermission(NETWORK_STACK, TAG);
try {
- mNetdService.networkRejectNonSecureVpn(add, uidRanges);
+ mNetdService.networkRejectNonSecureVpn(add, toStableParcels(uidRanges));
} catch (ServiceSpecificException e) {
Log.w(TAG, "setAllowOnlyVpnForUids(" + add + ", " + Arrays.toString(uidRanges) + ")"
+ ": netd command failed", e);
@@ -1887,7 +1623,7 @@
mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG);
try {
- mNetdService.networkAddUidRanges(netId, ranges);
+ mNetdService.networkAddUidRanges(netId, toStableParcels(ranges));
} catch (RemoteException | ServiceSpecificException e) {
throw new IllegalStateException(e);
}
@@ -1897,7 +1633,7 @@
public void removeVpnUidRanges(int netId, UidRange[] ranges) {
mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG);
try {
- mNetdService.networkRemoveUidRanges(netId, ranges);
+ mNetdService.networkRemoveUidRanges(netId, toStableParcels(ranges));
} catch (RemoteException | ServiceSpecificException e) {
throw new IllegalStateException(e);
}
@@ -1935,7 +1671,7 @@
private void closeSocketsForFirewallChainLocked(int chain, String chainName) {
// UID ranges to close sockets on.
- UidRange[] ranges;
+ UidRangeParcel[] ranges;
// UID ranges whose sockets we won't touch.
int[] exemptUids;
@@ -1943,10 +1679,10 @@
if (DBG) Slog.d(TAG, "Closing sockets after enabling chain " + chainName);
if (getFirewallType(chain) == FIREWALL_WHITELIST) {
// Close all sockets on all non-system UIDs...
- ranges = new UidRange[] {
+ ranges = new UidRangeParcel[] {
// TODO: is there a better way of finding all existing users? If so, we could
// specify their ranges here.
- new UidRange(Process.FIRST_APPLICATION_UID, Integer.MAX_VALUE),
+ makeUidRangeParcel(Process.FIRST_APPLICATION_UID, Integer.MAX_VALUE),
};
// ... except for the UIDs that have allow rules.
synchronized (mRulesLock) {
@@ -1973,11 +1709,11 @@
// Close sockets for every UID that has a deny rule...
synchronized (mRulesLock) {
final SparseIntArray rules = getUidFirewallRulesLR(chain);
- ranges = new UidRange[rules.size()];
+ ranges = new UidRangeParcel[rules.size()];
for (int i = 0; i < ranges.length; i++) {
if (rules.valueAt(i) == FIREWALL_RULE_DENY) {
int uid = rules.keyAt(i);
- ranges[numUids] = new UidRange(uid, uid);
+ ranges[numUids] = makeUidRangeParcel(uid, uid);
numUids++;
}
}
@@ -2232,22 +1968,10 @@
}
}
- /** {@inheritDoc} */
- @Override
- public void monitor() {
- if (mConnector != null) {
- mConnector.monitor();
- }
- }
-
@Override
protected void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
if (!DumpUtils.checkDumpPermission(mContext, TAG, pw)) return;
- pw.println("NetworkManagementService NativeDaemonConnector Log:");
- mConnector.dump(fd, pw, args);
- pw.println();
-
pw.print("mMobileActivityFromRadio="); pw.print(mMobileActivityFromRadio);
pw.print(" mLastPowerStateFromRadio="); pw.println(mLastPowerStateFromRadio);
pw.print("mNetworkActive="); pw.println(mNetworkActive);
diff --git a/services/core/java/com/android/server/TelephonyRegistry.java b/services/core/java/com/android/server/TelephonyRegistry.java
index e78ae55..fdd698f 100644
--- a/services/core/java/com/android/server/TelephonyRegistry.java
+++ b/services/core/java/com/android/server/TelephonyRegistry.java
@@ -627,6 +627,11 @@
r.callingPackage = callingPackage;
r.callerUid = Binder.getCallingUid();
r.callerPid = Binder.getCallingPid();
+ if (r.subId != SubscriptionManager.INVALID_SUBSCRIPTION_ID && r.subId != subId) {
+ throw new IllegalArgumentException(
+ "PhoneStateListener cannot concurrently listen on multiple " +
+ "subscriptions. Previously registered on subId: " + r.subId);
+ }
// Legacy applications pass SubscriptionManager.DEFAULT_SUB_ID,
// force all illegal subId to SubscriptionManager.DEFAULT_SUB_ID
if (!SubscriptionManager.isValidSubscriptionId(subId)) {
@@ -1806,7 +1811,7 @@
synchronized (mRecords) {
TelephonyManager tm = (TelephonyManager) mContext.getSystemService(
Context.TELEPHONY_SERVICE);
- mEmergencyNumberList = tm.getCurrentEmergencyNumberList();
+ mEmergencyNumberList = tm.getEmergencyNumberList();
for (Record r : mRecords) {
if (r.matchPhoneStateListenerEvent(
diff --git a/services/core/java/com/android/server/am/UserController.java b/services/core/java/com/android/server/am/UserController.java
index 4746e12..3f48e28 100644
--- a/services/core/java/com/android/server/am/UserController.java
+++ b/services/core/java/com/android/server/am/UserController.java
@@ -383,14 +383,14 @@
* Step from {@link UserState#STATE_RUNNING_LOCKED} to
* {@link UserState#STATE_RUNNING_UNLOCKING}.
*/
- private void finishUserUnlocking(final UserState uss) {
+ private boolean finishUserUnlocking(final UserState uss) {
final int userId = uss.mHandle.getIdentifier();
// Only keep marching forward if user is actually unlocked
- if (!StorageManager.isUserKeyUnlocked(userId)) return;
+ if (!StorageManager.isUserKeyUnlocked(userId)) return false;
synchronized (mLock) {
// Do not proceed if unexpected state or a stale user
if (mStartedUsers.get(userId) != uss || uss.state != STATE_RUNNING_LOCKED) {
- return;
+ return false;
}
}
uss.mUnlockProgress.start();
@@ -421,6 +421,7 @@
mHandler.obtainMessage(SYSTEM_USER_UNLOCK_MSG, userId, 0, uss)
.sendToTarget();
});
+ return true;
}
/**
@@ -1180,7 +1181,10 @@
return false;
}
- finishUserUnlocking(uss);
+ if (!finishUserUnlocking(uss)) {
+ notifyFinished(userId, listener);
+ return false;
+ }
// We just unlocked a user, so let's now attempt to unlock any
// managed profiles under that user.
diff --git a/services/core/java/com/android/server/connectivity/DefaultNetworkMetrics.java b/services/core/java/com/android/server/connectivity/DefaultNetworkMetrics.java
index e43d152..96a202f 100644
--- a/services/core/java/com/android/server/connectivity/DefaultNetworkMetrics.java
+++ b/services/core/java/com/android/server/connectivity/DefaultNetworkMetrics.java
@@ -163,8 +163,8 @@
LinkProperties lp = nai.linkProperties;
ev.netId = nai.network().netId;
ev.transports |= BitUtils.packBits(nai.networkCapabilities.getTransportTypes());
- ev.ipv4 |= lp.hasIPv4Address() && lp.hasIPv4DefaultRoute();
- ev.ipv6 |= lp.hasGlobalIPv6Address() && lp.hasIPv6DefaultRoute();
+ ev.ipv4 |= lp.hasIpv4Address() && lp.hasIpv4DefaultRoute();
+ ev.ipv6 |= lp.hasGlobalIpv6Address() && lp.hasIpv6DefaultRoute();
}
private static void printEvent(long localTimeMs, PrintWriter pw, DefaultNetworkEvent ev) {
diff --git a/services/core/java/com/android/server/connectivity/KeepaliveTracker.java b/services/core/java/com/android/server/connectivity/KeepaliveTracker.java
index 35d6860..0e3d82c 100644
--- a/services/core/java/com/android/server/connectivity/KeepaliveTracker.java
+++ b/services/core/java/com/android/server/connectivity/KeepaliveTracker.java
@@ -42,7 +42,6 @@
import android.net.SocketKeepalive.InvalidPacketException;
import android.net.SocketKeepalive.InvalidSocketException;
import android.net.TcpKeepalivePacketData;
-import android.net.TcpKeepalivePacketData.TcpSocketInfo;
import android.net.util.IpUtils;
import android.os.Binder;
import android.os.Handler;
@@ -492,19 +491,14 @@
return;
}
- TcpKeepalivePacketData packet = null;
+ final TcpKeepalivePacketData packet;
try {
- TcpSocketInfo tsi = TcpKeepaliveController.switchToRepairMode(fd);
- packet = TcpKeepalivePacketData.tcpKeepalivePacket(tsi);
+ packet = TcpKeepaliveController.getTcpKeepalivePacket(fd);
} catch (InvalidPacketException | InvalidSocketException e) {
- try {
- TcpKeepaliveController.switchOutOfRepairMode(fd);
- } catch (ErrnoException e1) {
- Log.e(TAG, "Couldn't move fd out of repair mode after failure to start keepalive");
- }
notifyErrorCallback(cb, e.error);
return;
}
+
KeepaliveInfo ki = new KeepaliveInfo(cb, nai, packet, intervalSeconds,
KeepaliveInfo.TYPE_TCP, fd);
Log.d(TAG, "Created keepalive: " + ki.toString());
diff --git a/services/core/java/com/android/server/connectivity/Nat464Xlat.java b/services/core/java/com/android/server/connectivity/Nat464Xlat.java
index 2646d76..262ba7a 100644
--- a/services/core/java/com/android/server/connectivity/Nat464Xlat.java
+++ b/services/core/java/com/android/server/connectivity/Nat464Xlat.java
@@ -107,8 +107,8 @@
// Only run clat on networks that have a global IPv6 address and don't have a native IPv4
// address.
LinkProperties lp = nai.linkProperties;
- final boolean isIpv6OnlyNetwork = (lp != null) && lp.hasGlobalIPv6Address()
- && !lp.hasIPv4Address();
+ final boolean isIpv6OnlyNetwork = (lp != null) && lp.hasGlobalIpv6Address()
+ && !lp.hasIpv4Address();
// If the network tells us it doesn't use clat, respect that.
final boolean skip464xlat = (nai.netMisc() != null) && nai.netMisc().skip464xlat;
diff --git a/services/core/java/com/android/server/connectivity/NetworkDiagnostics.java b/services/core/java/com/android/server/connectivity/NetworkDiagnostics.java
index c471f0c..948c690 100644
--- a/services/core/java/com/android/server/connectivity/NetworkDiagnostics.java
+++ b/services/core/java/com/android/server/connectivity/NetworkDiagnostics.java
@@ -34,10 +34,12 @@
import com.android.internal.util.IndentingPrintWriter;
+import libcore.io.IoUtils;
+
import java.io.Closeable;
import java.io.FileDescriptor;
-import java.io.InterruptedIOException;
import java.io.IOException;
+import java.io.InterruptedIOException;
import java.net.Inet4Address;
import java.net.Inet6Address;
import java.net.InetAddress;
@@ -48,17 +50,13 @@
import java.net.UnknownHostException;
import java.nio.ByteBuffer;
import java.nio.charset.StandardCharsets;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-import java.util.Arrays;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Random;
-
-import libcore.io.IoUtils;
-
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
/**
* NetworkDiagnostics
@@ -186,7 +184,7 @@
// TODO: we could use mLinkProperties.isReachable(TEST_DNS6) here, because we won't set any
// DNS servers for which isReachable() is false, but since this is diagnostic code, be extra
// careful.
- if (mLinkProperties.hasGlobalIPv6Address() || mLinkProperties.hasIPv6DefaultRoute()) {
+ if (mLinkProperties.hasGlobalIpv6Address() || mLinkProperties.hasIpv6DefaultRoute()) {
mLinkProperties.addDnsServer(TEST_DNS6);
}
diff --git a/services/core/java/com/android/server/connectivity/PermissionMonitor.java b/services/core/java/com/android/server/connectivity/PermissionMonitor.java
index d84a4d2..123564e 100644
--- a/services/core/java/com/android/server/connectivity/PermissionMonitor.java
+++ b/services/core/java/com/android/server/connectivity/PermissionMonitor.java
@@ -46,13 +46,11 @@
import android.util.Slog;
import android.util.SparseIntArray;
-import com.android.internal.annotations.GuardedBy;
import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.util.ArrayUtils;
import com.android.server.LocalServices;
import java.util.ArrayList;
-import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
@@ -84,20 +82,14 @@
// Keys are App IDs. Values are true for SYSTEM permission and false for NETWORK permission.
private final Map<Integer, Boolean> mApps = new HashMap<>();
- // Keys are App packageNames, Values are app uids. . We need to keep track of this information
- // because PackageListObserver#onPackageRemoved does not pass the UID.
- @GuardedBy("mPackageNameUidMap")
- private final Map<String, Integer> mPackageNameUidMap = new HashMap<>();
-
private class PackageListObserver implements PackageManagerInternal.PackageListObserver {
@Override
- public void onPackageAdded(String packageName) {
+ public void onPackageAdded(String packageName, int uid) {
final PackageInfo app = getPackageInfo(packageName);
if (app == null) {
Slog.wtf(TAG, "Failed to get information of installed package: " + packageName);
return;
}
- int uid = (app.applicationInfo != null) ? app.applicationInfo.uid : INVALID_UID;
if (uid == INVALID_UID) {
Slog.wtf(TAG, "Failed to get the uid of installed package: " + packageName
+ "uid: " + uid);
@@ -107,29 +99,21 @@
return;
}
sendPackagePermissionsForUid(uid,
- filterPermission(Arrays.asList(app.requestedPermissions)));
- synchronized (mPackageNameUidMap) {
- mPackageNameUidMap.put(packageName, uid);
- }
+ getNetdPermissionMask(app.requestedPermissions));
}
@Override
- public void onPackageRemoved(String packageName) {
- int uid;
- synchronized (mPackageNameUidMap) {
- if (!mPackageNameUidMap.containsKey(packageName)) {
- return;
- }
- uid = mPackageNameUidMap.get(packageName);
- mPackageNameUidMap.remove(packageName);
- }
+ public void onPackageRemoved(String packageName, int uid) {
int permission = 0;
+ // If there are still packages remain under the same uid, check the permission of the
+ // remaining packages. We only remove the permission for a given uid when all packages
+ // for that uid no longer have that permission.
String[] packages = mPackageManager.getPackagesForUid(uid);
if (packages != null && packages.length > 0) {
for (String name : packages) {
final PackageInfo app = getPackageInfo(name);
if (app != null && app.requestedPermissions != null) {
- permission |= filterPermission(Arrays.asList(app.requestedPermissions));
+ permission |= getNetdPermissionMask(app.requestedPermissions);
}
}
}
@@ -184,12 +168,9 @@
//TODO: unify the management of the permissions into one codepath.
if (app.requestedPermissions != null) {
- int otherNetdPerms = filterPermission(Arrays.asList(app.requestedPermissions));
+ int otherNetdPerms = getNetdPermissionMask(app.requestedPermissions);
if (otherNetdPerms != 0) {
netdPermsUids.put(uid, netdPermsUids.get(uid) | otherNetdPerms);
- synchronized (mPackageNameUidMap) {
- mPackageNameUidMap.put(app.applicationInfo.packageName, uid);
- }
}
}
}
@@ -422,13 +403,15 @@
}
}
- private static int filterPermission(List<String> requestedPermissions) {
+ private static int getNetdPermissionMask(String[] requestedPermissions) {
int permissions = 0;
- if (requestedPermissions.contains(INTERNET)) {
- permissions |= INetd.PERMISSION_INTERNET;
- }
- if (requestedPermissions.contains(UPDATE_DEVICE_STATS)) {
- permissions |= INetd.PERMISSION_UPDATE_DEVICE_STATS;
+ for (String permissionName : requestedPermissions) {
+ if (permissionName.equals(INTERNET)) {
+ permissions |= INetd.PERMISSION_INTERNET;
+ }
+ if (permissionName.equals(UPDATE_DEVICE_STATS)) {
+ permissions |= INetd.PERMISSION_UPDATE_DEVICE_STATS;
+ }
}
return permissions;
}
@@ -439,8 +422,6 @@
| MATCH_ANY_USER);
return app;
} catch (NameNotFoundException e) {
- // App not found.
- loge("NameNotFoundException " + packageName);
return null;
}
}
diff --git a/services/core/java/com/android/server/connectivity/TcpKeepaliveController.java b/services/core/java/com/android/server/connectivity/TcpKeepaliveController.java
index 3e21b5b..f4d9006 100644
--- a/services/core/java/com/android/server/connectivity/TcpKeepaliveController.java
+++ b/services/core/java/com/android/server/connectivity/TcpKeepaliveController.java
@@ -28,8 +28,10 @@
import android.annotation.NonNull;
import android.net.NetworkUtils;
+import android.net.SocketKeepalive.InvalidPacketException;
import android.net.SocketKeepalive.InvalidSocketException;
-import android.net.TcpKeepalivePacketData.TcpSocketInfo;
+import android.net.TcpKeepalivePacketData;
+import android.net.TcpKeepalivePacketDataParcelable;
import android.net.TcpRepairWindow;
import android.os.Handler;
import android.os.MessageQueue;
@@ -44,7 +46,6 @@
import com.android.server.connectivity.KeepaliveTracker.KeepaliveInfo;
import java.io.FileDescriptor;
-import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.net.SocketAddress;
import java.net.SocketException;
@@ -103,26 +104,30 @@
mFdHandlerQueue = connectivityServiceHandler.getLooper().getQueue();
}
+ /** Build tcp keepalive packet. */
+ public static TcpKeepalivePacketData getTcpKeepalivePacket(@NonNull FileDescriptor fd)
+ throws InvalidPacketException, InvalidSocketException {
+ try {
+ final TcpKeepalivePacketDataParcelable tcpDetails = switchToRepairMode(fd);
+ return TcpKeepalivePacketData.tcpKeepalivePacket(tcpDetails);
+ } catch (InvalidPacketException | InvalidSocketException e) {
+ switchOutOfRepairMode(fd);
+ throw e;
+ }
+ }
/**
- * Switch the tcp socket to repair mode and query tcp socket information.
+ * Switch the tcp socket to repair mode and query detail tcp information.
*
- * @param fd the fd of socket on which to use keepalive offload
- * @return a {@link TcpKeepalivePacketData#TcpSocketInfo} object for current
+ * @param fd the fd of socket on which to use keepalive offload.
+ * @return a {@link TcpKeepalivePacketData#TcpKeepalivePacketDataParcelable} object for current
* tcp/ip information.
*/
- // TODO : make this private. It's far too confusing that this gets called from outside
- // at a time that nobody can understand.
- public static TcpSocketInfo switchToRepairMode(FileDescriptor fd)
+ private static TcpKeepalivePacketDataParcelable switchToRepairMode(FileDescriptor fd)
throws InvalidSocketException {
if (DBG) Log.i(TAG, "switchToRepairMode to start tcp keepalive : " + fd);
+ final TcpKeepalivePacketDataParcelable tcpDetails = new TcpKeepalivePacketDataParcelable();
final SocketAddress srcSockAddr;
final SocketAddress dstSockAddr;
- final InetAddress srcAddress;
- final InetAddress dstAddress;
- final int srcPort;
- final int dstPort;
- int seq;
- final int ack;
final TcpRepairWindow trw;
// Query source address and port.
@@ -133,8 +138,8 @@
throw new InvalidSocketException(ERROR_INVALID_SOCKET, e);
}
if (srcSockAddr instanceof InetSocketAddress) {
- srcAddress = getAddress((InetSocketAddress) srcSockAddr);
- srcPort = getPort((InetSocketAddress) srcSockAddr);
+ tcpDetails.srcAddress = getAddress((InetSocketAddress) srcSockAddr);
+ tcpDetails.srcPort = getPort((InetSocketAddress) srcSockAddr);
} else {
Log.e(TAG, "Invalid or mismatched SocketAddress");
throw new InvalidSocketException(ERROR_INVALID_SOCKET);
@@ -147,8 +152,8 @@
throw new InvalidSocketException(ERROR_INVALID_SOCKET, e);
}
if (dstSockAddr instanceof InetSocketAddress) {
- dstAddress = getAddress((InetSocketAddress) dstSockAddr);
- dstPort = getPort((InetSocketAddress) dstSockAddr);
+ tcpDetails.dstAddress = getAddress((InetSocketAddress) dstSockAddr);
+ tcpDetails.dstPort = getPort((InetSocketAddress) dstSockAddr);
} else {
Log.e(TAG, "Invalid or mismatched peer SocketAddress");
throw new InvalidSocketException(ERROR_INVALID_SOCKET);
@@ -157,28 +162,37 @@
// Query sequence and ack number
dropAllIncomingPackets(fd, true);
try {
- // Enter tcp repair mode.
+ // Switch to tcp repair mode.
Os.setsockoptInt(fd, IPPROTO_TCP, TCP_REPAIR, TCP_REPAIR_ON);
+
// Check if socket is idle.
if (!isSocketIdle(fd)) {
+ Log.e(TAG, "Socket is not idle");
throw new InvalidSocketException(ERROR_SOCKET_NOT_IDLE);
}
// Query write sequence number from SEND_QUEUE.
Os.setsockoptInt(fd, IPPROTO_TCP, TCP_REPAIR_QUEUE, TCP_SEND_QUEUE);
- seq = Os.getsockoptInt(fd, IPPROTO_TCP, TCP_QUEUE_SEQ);
+ tcpDetails.seq = Os.getsockoptInt(fd, IPPROTO_TCP, TCP_QUEUE_SEQ);
// Query read sequence number from RECV_QUEUE.
Os.setsockoptInt(fd, IPPROTO_TCP, TCP_REPAIR_QUEUE, TCP_RECV_QUEUE);
- ack = Os.getsockoptInt(fd, IPPROTO_TCP, TCP_QUEUE_SEQ);
+ tcpDetails.ack = Os.getsockoptInt(fd, IPPROTO_TCP, TCP_QUEUE_SEQ);
// Switch to NO_QUEUE to prevent illegal socket read/write in repair mode.
Os.setsockoptInt(fd, IPPROTO_TCP, TCP_REPAIR_QUEUE, TCP_NO_QUEUE);
// Finally, check if socket is still idle. TODO : this check needs to move to
// after starting polling to prevent a race.
- if (!isSocketIdle(fd)) {
+ if (!isReceiveQueueEmpty(fd)) {
+ Log.e(TAG, "Fatal: receive queue of this socket is not empty");
throw new InvalidSocketException(ERROR_INVALID_SOCKET);
}
+ if (!isSendQueueEmpty(fd)) {
+ Log.e(TAG, "Socket is not idle");
+ throw new InvalidSocketException(ERROR_SOCKET_NOT_IDLE);
+ }
// Query tcp window size.
trw = NetworkUtils.getTcpRepairWindow(fd);
+ tcpDetails.rcvWnd = trw.rcvWnd;
+ tcpDetails.rcvWndScale = trw.rcvWndScale;
} catch (ErrnoException e) {
Log.e(TAG, "Exception reading TCP state from socket", e);
if (e.errno == ENOPROTOOPT) {
@@ -194,10 +208,9 @@
// Keepalive sequence number is last sequence number - 1. If it couldn't be retrieved,
// then it must be set to -1, so decrement in all cases.
- seq = seq - 1;
+ tcpDetails.seq = tcpDetails.seq - 1;
- return new TcpSocketInfo(srcAddress, srcPort, dstAddress, dstPort, seq, ack, trw.rcvWnd,
- trw.rcvWndScale);
+ return tcpDetails;
}
/**
@@ -205,10 +218,13 @@
*
* @param fd the fd of socket to switch back to normal.
*/
- // TODO : make this private.
- public static void switchOutOfRepairMode(@NonNull final FileDescriptor fd)
- throws ErrnoException {
- Os.setsockoptInt(fd, IPPROTO_TCP, TCP_REPAIR, TCP_REPAIR_OFF);
+ private static void switchOutOfRepairMode(@NonNull final FileDescriptor fd) {
+ try {
+ Os.setsockoptInt(fd, IPPROTO_TCP, TCP_REPAIR, TCP_REPAIR_OFF);
+ } catch (ErrnoException e) {
+ Log.e(TAG, "Cannot switch socket out of repair mode", e);
+ // Well, there is not much to do here to recover
+ }
}
/**
@@ -262,17 +278,12 @@
mListeners.remove(slot);
}
mFdHandlerQueue.removeOnFileDescriptorEventListener(fd);
- try {
- if (DBG) Log.d(TAG, "Moving socket out of repair mode for stop : " + fd);
- switchOutOfRepairMode(fd);
- } catch (ErrnoException e) {
- Log.e(TAG, "Cannot switch socket out of repair mode", e);
- // Well, there is not much to do here to recover
- }
+ if (DBG) Log.d(TAG, "Moving socket out of repair mode for stop : " + fd);
+ switchOutOfRepairMode(fd);
}
- private static InetAddress getAddress(InetSocketAddress inetAddr) {
- return inetAddr.getAddress();
+ private static byte [] getAddress(InetSocketAddress inetAddr) {
+ return inetAddr.getAddress().getAddress();
}
private static int getPort(InetSocketAddress inetAddr) {
diff --git a/services/core/java/com/android/server/connectivity/tethering/IPv6TetheringCoordinator.java b/services/core/java/com/android/server/connectivity/tethering/IPv6TetheringCoordinator.java
index 1000148..38eb0bc 100644
--- a/services/core/java/com/android/server/connectivity/tethering/IPv6TetheringCoordinator.java
+++ b/services/core/java/com/android/server/connectivity/tethering/IPv6TetheringCoordinator.java
@@ -17,7 +17,6 @@
package com.android.server.connectivity.tethering;
import android.net.ConnectivityManager;
-import android.net.ip.IpServer;
import android.net.IpPrefix;
import android.net.LinkAddress;
import android.net.LinkProperties;
@@ -25,6 +24,7 @@
import android.net.NetworkCapabilities;
import android.net.NetworkState;
import android.net.RouteInfo;
+import android.net.ip.IpServer;
import android.net.util.NetworkConstants;
import android.net.util.SharedLog;
import android.util.Log;
@@ -191,7 +191,7 @@
if (currentActive != null && currentActive.ipServer == ipServer) {
final LinkProperties lp = getIPv6OnlyLinkProperties(
mUpstreamNetworkState.linkProperties);
- if (lp.hasIPv6DefaultRoute() && lp.hasGlobalIPv6Address()) {
+ if (lp.hasIpv6DefaultRoute() && lp.hasGlobalIpv6Address()) {
return lp;
}
}
diff --git a/services/core/java/com/android/server/connectivity/tethering/TetheringInterfaceUtils.java b/services/core/java/com/android/server/connectivity/tethering/TetheringInterfaceUtils.java
index 6c7ff91..0ef3805 100644
--- a/services/core/java/com/android/server/connectivity/tethering/TetheringInterfaceUtils.java
+++ b/services/core/java/com/android/server/connectivity/tethering/TetheringInterfaceUtils.java
@@ -67,14 +67,14 @@
// because "[t]he 3GPP network allocates each default bearer a unique
// /64 prefix", per RFC 6459, Section 5.2.
final boolean canTether =
- (ns != null) && (ns.network != null) &&
- (ns.linkProperties != null) && (ns.networkCapabilities != null) &&
+ (ns != null) && (ns.network != null)
+ && (ns.linkProperties != null) && (ns.networkCapabilities != null)
// At least one upstream DNS server:
- ns.linkProperties.hasIPv6DnsServer() &&
+ && ns.linkProperties.hasIpv6DnsServer()
// Minimal amount of IPv6 provisioning:
- ns.linkProperties.hasGlobalIPv6Address() &&
+ && ns.linkProperties.hasGlobalIpv6Address()
// Temporary approximation of "dedicated prefix":
- ns.networkCapabilities.hasTransport(NetworkCapabilities.TRANSPORT_CELLULAR);
+ && ns.networkCapabilities.hasTransport(NetworkCapabilities.TRANSPORT_CELLULAR);
return canTether
? getInterfaceForDestination(ns.linkProperties, Inet6Address.ANY)
diff --git a/services/core/java/com/android/server/media/OWNERS b/services/core/java/com/android/server/media/OWNERS
index 8adea0e..4bc9373 100644
--- a/services/core/java/com/android/server/media/OWNERS
+++ b/services/core/java/com/android/server/media/OWNERS
@@ -1,4 +1,6 @@
-lajos@google.com
elaurent@google.com
-sungsoo@google.com
+hdmoon@google.com
+insun@google.com
jaewan@google.com
+lajos@google.com
+sungsoo@google.com
diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java
index 2f510a7..790e6e1 100644
--- a/services/core/java/com/android/server/pm/PackageManagerService.java
+++ b/services/core/java/com/android/server/pm/PackageManagerService.java
@@ -2157,7 +2157,7 @@
}
if (allNewUsers && !update) {
- notifyPackageAdded(packageName);
+ notifyPackageAdded(packageName, res.uid);
}
// Log current value of "unknown sources" setting
@@ -13728,7 +13728,7 @@
}
@Override
- public void notifyPackageAdded(String packageName) {
+ public void notifyPackageAdded(String packageName, int uid) {
final PackageListObserver[] observers;
synchronized (mPackages) {
if (mPackageListObservers.size() == 0) {
@@ -13739,12 +13739,12 @@
observers = mPackageListObservers.toArray(observerArray);
}
for (int i = observers.length - 1; i >= 0; --i) {
- observers[i].onPackageAdded(packageName);
+ observers[i].onPackageAdded(packageName, uid);
}
}
@Override
- public void notifyPackageRemoved(String packageName) {
+ public void notifyPackageRemoved(String packageName, int uid) {
final PackageListObserver[] observers;
synchronized (mPackages) {
if (mPackageListObservers.size() == 0) {
@@ -13755,7 +13755,7 @@
observers = mPackageListObservers.toArray(observerArray);
}
for (int i = observers.length - 1; i >= 0; --i) {
- observers[i].onPackageRemoved(packageName);
+ observers[i].onPackageRemoved(packageName, uid);
}
}
@@ -18562,7 +18562,8 @@
return;
}
Bundle extras = new Bundle(2);
- extras.putInt(Intent.EXTRA_UID, removedAppId >= 0 ? removedAppId : uid);
+ final int removedUid = removedAppId >= 0 ? removedAppId : uid;
+ extras.putInt(Intent.EXTRA_UID, removedUid);
extras.putBoolean(Intent.EXTRA_DATA_REMOVED, dataRemoved);
extras.putBoolean(Intent.EXTRA_DONT_KILL_APP, !killApp);
if (isUpdate || isRemovedPackageSystemUpdate) {
@@ -18583,7 +18584,7 @@
removedPackage, extras,
Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND,
null, null, broadcastUsers, instantUserIds);
- packageSender.notifyPackageRemoved(removedPackage);
+ packageSender.notifyPackageRemoved(removedPackage, removedUid);
}
}
if (removedAppId >= 0) {
@@ -24946,6 +24947,6 @@
final IIntentReceiver finishedReceiver, final int[] userIds, int[] instantUserIds);
void sendPackageAddedForNewUsers(String packageName, boolean sendBootCompleted,
boolean includeStopped, int appId, int[] userIds, int[] instantUserIds);
- void notifyPackageAdded(String packageName);
- void notifyPackageRemoved(String packageName);
+ void notifyPackageAdded(String packageName, int uid);
+ void notifyPackageRemoved(String packageName, int uid);
}
diff --git a/services/ipmemorystore/Android.bp b/services/ipmemorystore/Android.bp
deleted file mode 100644
index 013cf56..0000000
--- a/services/ipmemorystore/Android.bp
+++ /dev/null
@@ -1,4 +0,0 @@
-java_library_static {
- name: "services.ipmemorystore",
- srcs: ["java/**/*.java"],
-}
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index 4125b92..ed5928f 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -98,7 +98,6 @@
import com.android.server.media.projection.MediaProjectionManagerService;
import com.android.server.net.NetworkPolicyManagerService;
import com.android.server.net.NetworkStatsService;
-import com.android.server.net.ipmemorystore.IpMemoryStoreService;
import com.android.server.net.watchlist.NetworkWatchlistService;
import com.android.server.notification.NotificationManagerService;
import com.android.server.oemlock.OemLockService;
@@ -1135,14 +1134,6 @@
}
traceEnd();
- traceBeginAndSlog("StartIpMemoryStoreService");
- try {
- ServiceManager.addService(Context.IP_MEMORY_STORE_SERVICE,
- new IpMemoryStoreService(context));
- } catch (Throwable e) {
- reportWtf("starting IP Memory Store Service", e);
- }
- traceEnd();
traceBeginAndSlog("StartIpSecService");
try {
diff --git a/services/net/Android.bp b/services/net/Android.bp
index 8ad4d76..9e1d44b 100644
--- a/services/net/Android.bp
+++ b/services/net/Android.bp
@@ -1,3 +1,61 @@
+// AIDL interfaces between the core system and the networking mainline module.
+aidl_interface {
+ name: "ipmemorystore-aidl-interfaces",
+ local_include_dir: "java",
+ srcs: [
+ // TODO: Define and use a filegroup for these files, since they're also used in
+ // networkstack-aidl-interfaces. This does not appear to work at the moment.
+ "java/android/net/IIpMemoryStore.aidl",
+ "java/android/net/IIpMemoryStoreCallbacks.aidl",
+ "java/android/net/ipmemorystore/**/*.aidl",
+ ],
+ backend: {
+ ndk: {
+ enabled: false,
+ },
+ cpp: {
+ enabled: false,
+ },
+ },
+ api_dir: "aidl/networkstack",
+}
+
+aidl_interface {
+ name: "networkstack-aidl-interfaces",
+ local_include_dir: "java",
+ include_dirs: ["frameworks/base/core/java"], // For framework parcelables.
+ srcs: [
+ "java/android/net/ApfCapabilitiesParcelable.aidl",
+ "java/android/net/DhcpResultsParcelable.aidl",
+ "java/android/net/IIpMemoryStore.aidl",
+ "java/android/net/IIpMemoryStoreCallbacks.aidl",
+ "java/android/net/INetworkMonitor.aidl",
+ "java/android/net/INetworkMonitorCallbacks.aidl",
+ "java/android/net/INetworkStackConnector.aidl",
+ "java/android/net/INetworkStackStatusCallback.aidl",
+ "java/android/net/InitialConfigurationParcelable.aidl",
+ "java/android/net/PrivateDnsConfigParcel.aidl",
+ "java/android/net/ProvisioningConfigurationParcelable.aidl",
+ "java/android/net/StaticIpConfigurationParcelable.aidl",
+ "java/android/net/TcpKeepalivePacketDataParcelable.aidl",
+ "java/android/net/dhcp/DhcpServingParamsParcel.aidl",
+ "java/android/net/dhcp/IDhcpServer.aidl",
+ "java/android/net/dhcp/IDhcpServerCallbacks.aidl",
+ "java/android/net/ip/IIpClient.aidl",
+ "java/android/net/ip/IIpClientCallbacks.aidl",
+ "java/android/net/ipmemorystore/**/*.aidl",
+ ],
+ backend: {
+ ndk: {
+ enabled: false,
+ },
+ cpp: {
+ enabled: false,
+ },
+ },
+ api_dir: "aidl/networkstack",
+}
+
java_library_static {
name: "services.net",
srcs: ["java/**/*.java"],
@@ -7,6 +65,19 @@
]
}
+java_library_static {
+ name: "ipmemorystore-client",
+ sdk_version: "system_current",
+ srcs: [
+ ":framework-annotations",
+ "java/android/net/IpMemoryStoreClient.java",
+ "java/android/net/ipmemorystore/**.java",
+ ],
+ static_libs: [
+ "ipmemorystore-aidl-interfaces-java",
+ ]
+}
+
filegroup {
name: "services-networkstack-shared-srcs",
srcs: [
diff --git a/core/java/android/net/ApfCapabilitiesParcelable.aidl b/services/net/java/android/net/ApfCapabilitiesParcelable.aidl
similarity index 100%
rename from core/java/android/net/ApfCapabilitiesParcelable.aidl
rename to services/net/java/android/net/ApfCapabilitiesParcelable.aidl
diff --git a/core/java/android/net/DhcpResultsParcelable.aidl b/services/net/java/android/net/DhcpResultsParcelable.aidl
similarity index 100%
rename from core/java/android/net/DhcpResultsParcelable.aidl
rename to services/net/java/android/net/DhcpResultsParcelable.aidl
diff --git a/core/java/android/net/IIpMemoryStore.aidl b/services/net/java/android/net/IIpMemoryStore.aidl
similarity index 100%
rename from core/java/android/net/IIpMemoryStore.aidl
rename to services/net/java/android/net/IIpMemoryStore.aidl
diff --git a/core/java/android/net/TcpKeepalivePacketDataParcelable.aidl b/services/net/java/android/net/IIpMemoryStoreCallbacks.aidl
similarity index 79%
copy from core/java/android/net/TcpKeepalivePacketDataParcelable.aidl
copy to services/net/java/android/net/IIpMemoryStoreCallbacks.aidl
index 7329c63..53108db 100644
--- a/core/java/android/net/TcpKeepalivePacketDataParcelable.aidl
+++ b/services/net/java/android/net/IIpMemoryStoreCallbacks.aidl
@@ -16,11 +16,9 @@
package android.net;
-parcelable TcpKeepalivePacketDataParcelable {
- byte[] srcAddress;
- int srcPort;
- byte[] dstAddress;
- int dstPort;
- int seq;
- int ack;
+import android.net.IIpMemoryStore;
+
+/** {@hide} */
+oneway interface IIpMemoryStoreCallbacks {
+ void onIpMemoryStoreFetched(in IIpMemoryStore ipMemoryStore);
}
diff --git a/core/java/android/net/INetworkMonitor.aidl b/services/net/java/android/net/INetworkMonitor.aidl
similarity index 97%
rename from core/java/android/net/INetworkMonitor.aidl
rename to services/net/java/android/net/INetworkMonitor.aidl
index 5d1ab98..1b0e1d7 100644
--- a/core/java/android/net/INetworkMonitor.aidl
+++ b/services/net/java/android/net/INetworkMonitor.aidl
@@ -41,7 +41,7 @@
void start();
void launchCaptivePortalApp();
void notifyCaptivePortalAppFinished(int response);
- void notifyAcceptPartialConnectivity();
+ void setAcceptPartialConnectivity();
void forceReevaluation(int uid);
void notifyPrivateDnsChanged(in PrivateDnsConfigParcel config);
void notifyDnsResponse(int returnCode);
diff --git a/core/java/android/net/INetworkMonitorCallbacks.aidl b/services/net/java/android/net/INetworkMonitorCallbacks.aidl
similarity index 100%
rename from core/java/android/net/INetworkMonitorCallbacks.aidl
rename to services/net/java/android/net/INetworkMonitorCallbacks.aidl
diff --git a/core/java/android/net/INetworkStackConnector.aidl b/services/net/java/android/net/INetworkStackConnector.aidl
similarity index 82%
rename from core/java/android/net/INetworkStackConnector.aidl
rename to services/net/java/android/net/INetworkStackConnector.aidl
index e052488..3751c36 100644
--- a/core/java/android/net/INetworkStackConnector.aidl
+++ b/services/net/java/android/net/INetworkStackConnector.aidl
@@ -15,8 +15,9 @@
*/
package android.net;
+import android.net.IIpMemoryStoreCallbacks;
import android.net.INetworkMonitorCallbacks;
-import android.net.NetworkParcelable;
+import android.net.Network;
import android.net.dhcp.DhcpServingParamsParcel;
import android.net.dhcp.IDhcpServerCallbacks;
import android.net.ip.IIpClientCallbacks;
@@ -25,7 +26,7 @@
oneway interface INetworkStackConnector {
void makeDhcpServer(in String ifName, in DhcpServingParamsParcel params,
in IDhcpServerCallbacks cb);
- void makeNetworkMonitor(in NetworkParcelable network, String name,
- in INetworkMonitorCallbacks cb);
+ void makeNetworkMonitor(in Network network, String name, in INetworkMonitorCallbacks cb);
void makeIpClient(in String ifName, in IIpClientCallbacks callbacks);
-}
\ No newline at end of file
+ void fetchIpMemoryStore(in IIpMemoryStoreCallbacks cb);
+}
diff --git a/core/java/android/net/INetworkStackStatusCallback.aidl b/services/net/java/android/net/INetworkStackStatusCallback.aidl
similarity index 100%
rename from core/java/android/net/INetworkStackStatusCallback.aidl
rename to services/net/java/android/net/INetworkStackStatusCallback.aidl
diff --git a/core/java/android/net/InitialConfigurationParcelable.aidl b/services/net/java/android/net/InitialConfigurationParcelable.aidl
similarity index 80%
rename from core/java/android/net/InitialConfigurationParcelable.aidl
rename to services/net/java/android/net/InitialConfigurationParcelable.aidl
index bdda355..3fa88c3 100644
--- a/core/java/android/net/InitialConfigurationParcelable.aidl
+++ b/services/net/java/android/net/InitialConfigurationParcelable.aidl
@@ -16,12 +16,12 @@
package android.net;
-import android.net.IpPrefixParcelable;
-import android.net.LinkAddressParcelable;
+import android.net.IpPrefix;
+import android.net.LinkAddress;
parcelable InitialConfigurationParcelable {
- LinkAddressParcelable[] ipAddresses;
- IpPrefixParcelable[] directlyConnectedRoutes;
+ LinkAddress[] ipAddresses;
+ IpPrefix[] directlyConnectedRoutes;
String[] dnsServers;
String gateway;
}
\ No newline at end of file
diff --git a/services/net/java/android/net/IpMemoryStore.java b/services/net/java/android/net/IpMemoryStore.java
new file mode 100644
index 0000000..9248299
--- /dev/null
+++ b/services/net/java/android/net/IpMemoryStore.java
@@ -0,0 +1,62 @@
+/*
+ * Copyright (C) 2019 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.net;
+
+import android.annotation.NonNull;
+import android.content.Context;
+
+import com.android.internal.annotations.VisibleForTesting;
+
+import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.ExecutionException;
+
+/**
+ * Manager class used to communicate with the ip memory store service in the network stack,
+ * which is running in a separate module.
+ * @hide
+*/
+public class IpMemoryStore extends IpMemoryStoreClient {
+ private final CompletableFuture<IIpMemoryStore> mService;
+
+ public IpMemoryStore(@NonNull final Context context) {
+ super(context);
+ mService = new CompletableFuture<>();
+ getNetworkStackClient().fetchIpMemoryStore(
+ new IIpMemoryStoreCallbacks.Stub() {
+ @Override
+ public void onIpMemoryStoreFetched(final IIpMemoryStore memoryStore) {
+ mService.complete(memoryStore);
+ }
+ });
+ }
+
+ @Override
+ protected IIpMemoryStore getService() throws InterruptedException, ExecutionException {
+ return mService.get();
+ }
+
+ @VisibleForTesting
+ protected NetworkStackClient getNetworkStackClient() {
+ return NetworkStackClient.getInstance();
+ }
+
+ /** Gets an instance of the memory store */
+ @NonNull
+ public static IpMemoryStore getMemoryStore(final Context context) {
+ return new IpMemoryStore(context);
+ }
+}
diff --git a/core/java/android/net/IpMemoryStore.java b/services/net/java/android/net/IpMemoryStoreClient.java
similarity index 68%
rename from core/java/android/net/IpMemoryStore.java
rename to services/net/java/android/net/IpMemoryStoreClient.java
index 2f4d9bc..2f4fdbd 100644
--- a/core/java/android/net/IpMemoryStore.java
+++ b/services/net/java/android/net/IpMemoryStoreClient.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2018 The Android Open Source Project
+ * Copyright (C) 2019 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,7 +18,6 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
-import android.annotation.SystemService;
import android.content.Context;
import android.net.ipmemorystore.Blob;
import android.net.ipmemorystore.IOnBlobRetrievedListener;
@@ -27,23 +26,34 @@
import android.net.ipmemorystore.IOnSameNetworkResponseListener;
import android.net.ipmemorystore.IOnStatusListener;
import android.net.ipmemorystore.NetworkAttributes;
+import android.net.ipmemorystore.Status;
+import android.net.ipmemorystore.StatusParcelable;
import android.os.RemoteException;
+import android.util.Log;
-import com.android.internal.util.Preconditions;
+import java.util.concurrent.ExecutionException;
/**
- * The interface for system components to access the IP memory store.
- * @see com.android.server.net.ipmemorystore.IpMemoryStoreService
+ * service used to communicate with the ip memory store service in network stack,
+ * which is running in a separate module.
* @hide
*/
-@SystemService(Context.IP_MEMORY_STORE_SERVICE)
-public class IpMemoryStore {
- @NonNull final Context mContext;
- @NonNull final IIpMemoryStore mService;
+public abstract class IpMemoryStoreClient {
+ private static final String TAG = IpMemoryStoreClient.class.getSimpleName();
+ private final Context mContext;
- public IpMemoryStore(@NonNull final Context context, @NonNull final IIpMemoryStore service) {
- mContext = Preconditions.checkNotNull(context, "missing context");
- mService = Preconditions.checkNotNull(service, "missing IIpMemoryStore");
+ public IpMemoryStoreClient(@NonNull final Context context) {
+ if (context == null) throw new IllegalArgumentException("missing context");
+ mContext = context;
+ }
+
+ @NonNull
+ protected abstract IIpMemoryStore getService() throws InterruptedException, ExecutionException;
+
+ protected StatusParcelable internalErrorStatus() {
+ final StatusParcelable error = new StatusParcelable();
+ error.resultCode = Status.ERROR_UNKNOWN;
+ return error;
}
/**
@@ -66,9 +76,13 @@
@NonNull final NetworkAttributes attributes,
@Nullable final IOnStatusListener listener) {
try {
- mService.storeNetworkAttributes(l2Key, attributes.toParcelable(), listener);
+ try {
+ getService().storeNetworkAttributes(l2Key, attributes.toParcelable(), listener);
+ } catch (InterruptedException | ExecutionException m) {
+ listener.onComplete(internalErrorStatus());
+ }
} catch (RemoteException e) {
- throw e.rethrowFromSystemServer();
+ Log.e(TAG, "Error storing network attributes", e);
}
}
@@ -87,9 +101,13 @@
@NonNull final String name, @NonNull final Blob data,
@Nullable final IOnStatusListener listener) {
try {
- mService.storeBlob(l2Key, clientId, name, data, listener);
+ try {
+ getService().storeBlob(l2Key, clientId, name, data, listener);
+ } catch (InterruptedException | ExecutionException m) {
+ listener.onComplete(internalErrorStatus());
+ }
} catch (RemoteException e) {
- throw e.rethrowFromSystemServer();
+ Log.e(TAG, "Error storing blob", e);
}
}
@@ -110,9 +128,13 @@
public void findL2Key(@NonNull final NetworkAttributes attributes,
@NonNull final IOnL2KeyResponseListener listener) {
try {
- mService.findL2Key(attributes.toParcelable(), listener);
+ try {
+ getService().findL2Key(attributes.toParcelable(), listener);
+ } catch (InterruptedException | ExecutionException m) {
+ listener.onL2KeyResponse(internalErrorStatus(), null);
+ }
} catch (RemoteException e) {
- throw e.rethrowFromSystemServer();
+ Log.e(TAG, "Error finding L2 Key", e);
}
}
@@ -128,9 +150,13 @@
public void isSameNetwork(@NonNull final String l2Key1, @NonNull final String l2Key2,
@NonNull final IOnSameNetworkResponseListener listener) {
try {
- mService.isSameNetwork(l2Key1, l2Key2, listener);
+ try {
+ getService().isSameNetwork(l2Key1, l2Key2, listener);
+ } catch (InterruptedException | ExecutionException m) {
+ listener.onSameNetworkResponse(internalErrorStatus(), null);
+ }
} catch (RemoteException e) {
- throw e.rethrowFromSystemServer();
+ Log.e(TAG, "Error checking for network sameness", e);
}
}
@@ -146,9 +172,13 @@
public void retrieveNetworkAttributes(@NonNull final String l2Key,
@NonNull final IOnNetworkAttributesRetrieved listener) {
try {
- mService.retrieveNetworkAttributes(l2Key, listener);
+ try {
+ getService().retrieveNetworkAttributes(l2Key, listener);
+ } catch (InterruptedException | ExecutionException m) {
+ listener.onNetworkAttributesRetrieved(internalErrorStatus(), null, null);
+ }
} catch (RemoteException e) {
- throw e.rethrowFromSystemServer();
+ Log.e(TAG, "Error retrieving network attributes", e);
}
}
@@ -166,14 +196,13 @@
public void retrieveBlob(@NonNull final String l2Key, @NonNull final String clientId,
@NonNull final String name, @NonNull final IOnBlobRetrievedListener listener) {
try {
- mService.retrieveBlob(l2Key, clientId, name, listener);
+ try {
+ getService().retrieveBlob(l2Key, clientId, name, listener);
+ } catch (InterruptedException | ExecutionException m) {
+ listener.onBlobRetrieved(internalErrorStatus(), null, null, null);
+ }
} catch (RemoteException e) {
- throw e.rethrowFromSystemServer();
+ Log.e(TAG, "Error retrieving blob", e);
}
}
-
- /** Gets an instance of the memory store */
- public static IpMemoryStore getMemoryStore(final Context context) {
- return (IpMemoryStore) context.getSystemService(Context.IP_MEMORY_STORE_SERVICE);
- }
}
diff --git a/services/net/java/android/net/NetworkStackClient.java b/services/net/java/android/net/NetworkStackClient.java
index fe447fc..7befd087 100644
--- a/services/net/java/android/net/NetworkStackClient.java
+++ b/services/net/java/android/net/NetworkStackClient.java
@@ -120,8 +120,7 @@
*
* <p>The INetworkMonitor will be returned asynchronously through the provided callbacks.
*/
- public void makeNetworkMonitor(
- NetworkParcelable network, String name, INetworkMonitorCallbacks cb) {
+ public void makeNetworkMonitor(Network network, String name, INetworkMonitorCallbacks cb) {
requestConnector(connector -> {
try {
connector.makeNetworkMonitor(network, name, cb);
@@ -131,6 +130,21 @@
});
}
+ /**
+ * Get an instance of the IpMemoryStore.
+ *
+ * <p>The IpMemoryStore will be returned asynchronously through the provided callbacks.
+ */
+ public void fetchIpMemoryStore(IIpMemoryStoreCallbacks cb) {
+ requestConnector(connector -> {
+ try {
+ connector.fetchIpMemoryStore(cb);
+ } catch (RemoteException e) {
+ e.rethrowFromSystemServer();
+ }
+ });
+ }
+
private class NetworkStackConnection implements ServiceConnection {
@Override
public void onServiceConnected(ComponentName name, IBinder service) {
diff --git a/core/java/android/net/PrivateDnsConfigParcel.aidl b/services/net/java/android/net/PrivateDnsConfigParcel.aidl
similarity index 100%
rename from core/java/android/net/PrivateDnsConfigParcel.aidl
rename to services/net/java/android/net/PrivateDnsConfigParcel.aidl
diff --git a/core/java/android/net/ProvisioningConfigurationParcelable.aidl b/services/net/java/android/net/ProvisioningConfigurationParcelable.aidl
similarity index 94%
rename from core/java/android/net/ProvisioningConfigurationParcelable.aidl
rename to services/net/java/android/net/ProvisioningConfigurationParcelable.aidl
index 2a144f2..5b46d7f 100644
--- a/core/java/android/net/ProvisioningConfigurationParcelable.aidl
+++ b/services/net/java/android/net/ProvisioningConfigurationParcelable.aidl
@@ -19,7 +19,7 @@
import android.net.ApfCapabilitiesParcelable;
import android.net.InitialConfigurationParcelable;
-import android.net.NetworkParcelable;
+import android.net.Network;
import android.net.StaticIpConfigurationParcelable;
parcelable ProvisioningConfigurationParcelable {
@@ -33,6 +33,6 @@
ApfCapabilitiesParcelable apfCapabilities;
int provisioningTimeoutMs;
int ipv6AddrGenMode;
- NetworkParcelable network;
+ Network network;
String displayName;
}
diff --git a/core/java/android/net/StaticIpConfigurationParcelable.aidl b/services/net/java/android/net/StaticIpConfigurationParcelable.aidl
similarity index 90%
rename from core/java/android/net/StaticIpConfigurationParcelable.aidl
rename to services/net/java/android/net/StaticIpConfigurationParcelable.aidl
index 45dc021..6fffb42 100644
--- a/core/java/android/net/StaticIpConfigurationParcelable.aidl
+++ b/services/net/java/android/net/StaticIpConfigurationParcelable.aidl
@@ -17,10 +17,10 @@
package android.net;
-import android.net.LinkAddressParcelable;
+import android.net.LinkAddress;
parcelable StaticIpConfigurationParcelable {
- LinkAddressParcelable ipAddress;
+ LinkAddress ipAddress;
String gateway;
String[] dnsServers;
String domains;
diff --git a/core/java/android/net/TcpKeepalivePacketData.java b/services/net/java/android/net/TcpKeepalivePacketData.java
similarity index 78%
rename from core/java/android/net/TcpKeepalivePacketData.java
rename to services/net/java/android/net/TcpKeepalivePacketData.java
index f07dfb6..d79ad1f 100644
--- a/core/java/android/net/TcpKeepalivePacketData.java
+++ b/services/net/java/android/net/TcpKeepalivePacketData.java
@@ -25,8 +25,8 @@
import android.os.Parcelable;
import android.system.OsConstants;
-import java.net.Inet4Address;
import java.net.InetAddress;
+import java.net.UnknownHostException;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.util.Objects;
@@ -56,10 +56,10 @@
// This should only be constructed via static factory methods, such as
// tcpKeepalivePacket.
- private TcpKeepalivePacketData(TcpSocketInfo tcpDetails, byte[] data)
- throws InvalidPacketException {
- super(tcpDetails.srcAddress, tcpDetails.srcPort, tcpDetails.dstAddress,
- tcpDetails.dstPort, data);
+ private TcpKeepalivePacketData(final TcpKeepalivePacketDataParcelable tcpDetails,
+ final byte[] data) throws InvalidPacketException, UnknownHostException {
+ super(InetAddress.getByAddress(tcpDetails.srcAddress), tcpDetails.srcPort,
+ InetAddress.getByAddress(tcpDetails.dstAddress), tcpDetails.dstPort, data);
tcpSeq = tcpDetails.seq;
tcpAck = tcpDetails.ack;
// In the packet, the window is shifted right by the window scale.
@@ -71,17 +71,22 @@
* Factory method to create tcp keepalive packet structure.
*/
public static TcpKeepalivePacketData tcpKeepalivePacket(
- TcpSocketInfo tcpDetails) throws InvalidPacketException {
+ TcpKeepalivePacketDataParcelable tcpDetails) throws InvalidPacketException {
final byte[] packet;
- if ((tcpDetails.srcAddress instanceof Inet4Address)
- && (tcpDetails.dstAddress instanceof Inet4Address)) {
- packet = buildV4Packet(tcpDetails);
- } else {
- // TODO: support ipv6
+ try {
+ if ((tcpDetails.srcAddress != null) && (tcpDetails.dstAddress != null)
+ && (tcpDetails.srcAddress.length == 4 /* V4 IP length */)
+ && (tcpDetails.dstAddress.length == 4 /* V4 IP length */)) {
+ packet = buildV4Packet(tcpDetails);
+ } else {
+ // TODO: support ipv6
+ throw new InvalidPacketException(ERROR_INVALID_IP_ADDRESS);
+ }
+ return new TcpKeepalivePacketData(tcpDetails, packet);
+ } catch (UnknownHostException e) {
throw new InvalidPacketException(ERROR_INVALID_IP_ADDRESS);
}
- return new TcpKeepalivePacketData(tcpDetails, packet);
}
/**
@@ -89,7 +94,7 @@
*/
// TODO : if this code is ever moved to the network stack, factorize constants with the ones
// over there.
- private static byte[] buildV4Packet(TcpSocketInfo tcpDetails) {
+ private static byte[] buildV4Packet(TcpKeepalivePacketDataParcelable tcpDetails) {
final int length = IPV4_HEADER_LENGTH + TCP_HEADER_LENGTH;
ByteBuffer buf = ByteBuffer.allocate(length);
buf.order(ByteOrder.BIG_ENDIAN);
@@ -102,8 +107,8 @@
buf.put((byte) OsConstants.IPPROTO_TCP);
final int ipChecksumOffset = buf.position();
buf.putShort((short) 0); // IP checksum
- buf.put(tcpDetails.srcAddress.getAddress());
- buf.put(tcpDetails.dstAddress.getAddress());
+ buf.put(tcpDetails.srcAddress);
+ buf.put(tcpDetails.dstAddress);
buf.putShort((short) tcpDetails.srcPort);
buf.putShort((short) tcpDetails.dstPort);
buf.putInt(tcpDetails.seq); // Sequence Number
@@ -122,31 +127,6 @@
// TODO: add buildV6Packet.
- /** Represents tcp/ip information. */
- // TODO: Replace TcpSocketInfo with TcpKeepalivePacketDataParcelable.
- public static class TcpSocketInfo {
- public final InetAddress srcAddress;
- public final InetAddress dstAddress;
- public final int srcPort;
- public final int dstPort;
- public final int seq;
- public final int ack;
- public final int rcvWnd;
- public final int rcvWndScale;
-
- public TcpSocketInfo(InetAddress sAddr, int sPort, InetAddress dAddr,
- int dPort, int writeSeq, int readSeq, int rWnd, int rWndScale) {
- srcAddress = sAddr;
- dstAddress = dAddr;
- srcPort = sPort;
- dstPort = dPort;
- seq = writeSeq;
- ack = readSeq;
- rcvWnd = rWnd;
- rcvWndScale = rWndScale;
- }
- }
-
@Override
public boolean equals(@Nullable final Object o) {
if (!(o instanceof TcpKeepalivePacketData)) return false;
@@ -167,8 +147,9 @@
tcpWndScale);
}
- /* Parcelable Implementation. */
- /* Note that this object implements parcelable (and needs to keep doing this as it inherits
+ /**
+ * Parcelable Implementation.
+ * Note that this object implements parcelable (and needs to keep doing this as it inherits
* from a class that does), but should usually be parceled as a stable parcelable using
* the toStableParcelable() and fromStableParcelable() methods.
*/
@@ -194,7 +175,7 @@
}
/** Parcelable Creator. */
- public static final Parcelable.Creator<TcpKeepalivePacketData> CREATOR =
+ public static final @NonNull Parcelable.Creator<TcpKeepalivePacketData> CREATOR =
new Parcelable.Creator<TcpKeepalivePacketData>() {
public TcpKeepalivePacketData createFromParcel(Parcel in) {
return new TcpKeepalivePacketData(in);
@@ -217,6 +198,8 @@
parcel.dstPort = dstPort;
parcel.seq = tcpSeq;
parcel.ack = tcpAck;
+ parcel.rcvWnd = tcpWnd;
+ parcel.rcvWndScale = tcpWndScale;
return parcel;
}
diff --git a/core/java/android/net/TcpKeepalivePacketDataParcelable.aidl b/services/net/java/android/net/TcpKeepalivePacketDataParcelable.aidl
similarity index 95%
rename from core/java/android/net/TcpKeepalivePacketDataParcelable.aidl
rename to services/net/java/android/net/TcpKeepalivePacketDataParcelable.aidl
index 7329c63..d66b6ae 100644
--- a/core/java/android/net/TcpKeepalivePacketDataParcelable.aidl
+++ b/services/net/java/android/net/TcpKeepalivePacketDataParcelable.aidl
@@ -23,4 +23,6 @@
int dstPort;
int seq;
int ack;
+ int rcvWnd;
+ int rcvWndScale;
}
diff --git a/core/java/android/net/dhcp/DhcpServingParamsParcel.aidl b/services/net/java/android/net/dhcp/DhcpServingParamsParcel.aidl
similarity index 100%
rename from core/java/android/net/dhcp/DhcpServingParamsParcel.aidl
rename to services/net/java/android/net/dhcp/DhcpServingParamsParcel.aidl
diff --git a/core/java/android/net/dhcp/IDhcpServer.aidl b/services/net/java/android/net/dhcp/IDhcpServer.aidl
similarity index 100%
rename from core/java/android/net/dhcp/IDhcpServer.aidl
rename to services/net/java/android/net/dhcp/IDhcpServer.aidl
diff --git a/core/java/android/net/dhcp/IDhcpServerCallbacks.aidl b/services/net/java/android/net/dhcp/IDhcpServerCallbacks.aidl
similarity index 100%
rename from core/java/android/net/dhcp/IDhcpServerCallbacks.aidl
rename to services/net/java/android/net/dhcp/IDhcpServerCallbacks.aidl
diff --git a/core/java/android/net/ip/IIpClient.aidl b/services/net/java/android/net/ip/IIpClient.aidl
similarity index 92%
rename from core/java/android/net/ip/IIpClient.aidl
rename to services/net/java/android/net/ip/IIpClient.aidl
index a4a80e1..b834e45 100644
--- a/core/java/android/net/ip/IIpClient.aidl
+++ b/services/net/java/android/net/ip/IIpClient.aidl
@@ -15,7 +15,7 @@
*/
package android.net.ip;
-import android.net.ProxyInfoParcelable;
+import android.net.ProxyInfo;
import android.net.ProvisioningConfigurationParcelable;
import android.net.TcpKeepalivePacketDataParcelable;
@@ -28,7 +28,7 @@
void startProvisioning(in ProvisioningConfigurationParcelable req);
void stop();
void setTcpBufferSizes(in String tcpBufferSizes);
- void setHttpProxy(in ProxyInfoParcelable proxyInfo);
+ void setHttpProxy(in ProxyInfo proxyInfo);
void setMulticastFilter(boolean enabled);
void addKeepalivePacketFilter(int slot, in TcpKeepalivePacketDataParcelable pkt);
void removeKeepalivePacketFilter(int slot);
diff --git a/core/java/android/net/ip/IIpClientCallbacks.aidl b/services/net/java/android/net/ip/IIpClientCallbacks.aidl
similarity index 90%
rename from core/java/android/net/ip/IIpClientCallbacks.aidl
rename to services/net/java/android/net/ip/IIpClientCallbacks.aidl
index f077e3b..3681416 100644
--- a/core/java/android/net/ip/IIpClientCallbacks.aidl
+++ b/services/net/java/android/net/ip/IIpClientCallbacks.aidl
@@ -15,7 +15,7 @@
*/
package android.net.ip;
-import android.net.LinkPropertiesParcelable;
+import android.net.LinkProperties;
import android.net.ip.IIpClient;
import android.net.DhcpResultsParcelable;
@@ -34,11 +34,11 @@
// null or not.
void onNewDhcpResults(in DhcpResultsParcelable dhcpResults);
- void onProvisioningSuccess(in LinkPropertiesParcelable newLp);
- void onProvisioningFailure(in LinkPropertiesParcelable newLp);
+ void onProvisioningSuccess(in LinkProperties newLp);
+ void onProvisioningFailure(in LinkProperties newLp);
// Invoked on LinkProperties changes.
- void onLinkPropertiesChange(in LinkPropertiesParcelable newLp);
+ void onLinkPropertiesChange(in LinkProperties newLp);
// Called when the internal IpReachabilityMonitor (if enabled) has
// detected the loss of a critical number of required neighbors.
diff --git a/services/net/java/android/net/ip/IpClientUtil.java b/services/net/java/android/net/ip/IpClientUtil.java
index bf917bf..90624e0 100644
--- a/services/net/java/android/net/ip/IpClientUtil.java
+++ b/services/net/java/android/net/ip/IpClientUtil.java
@@ -17,12 +17,10 @@
package android.net.ip;
import static android.net.shared.IpConfigurationParcelableUtil.fromStableParcelable;
-import static android.net.shared.LinkPropertiesParcelableUtil.fromStableParcelable;
import android.content.Context;
import android.net.DhcpResultsParcelable;
import android.net.LinkProperties;
-import android.net.LinkPropertiesParcelable;
import android.net.NetworkStackClient;
import android.os.ConditionVariable;
@@ -122,18 +120,18 @@
}
@Override
- public void onProvisioningSuccess(LinkPropertiesParcelable newLp) {
- mCb.onProvisioningSuccess(fromStableParcelable(newLp));
+ public void onProvisioningSuccess(LinkProperties newLp) {
+ mCb.onProvisioningSuccess(newLp);
}
@Override
- public void onProvisioningFailure(LinkPropertiesParcelable newLp) {
- mCb.onProvisioningFailure(fromStableParcelable(newLp));
+ public void onProvisioningFailure(LinkProperties newLp) {
+ mCb.onProvisioningFailure(newLp);
}
// Invoked on LinkProperties changes.
@Override
- public void onLinkPropertiesChange(LinkPropertiesParcelable newLp) {
- mCb.onLinkPropertiesChange(fromStableParcelable(newLp));
+ public void onLinkPropertiesChange(LinkProperties newLp) {
+ mCb.onLinkPropertiesChange(newLp);
}
// Called when the internal IpReachabilityMonitor (if enabled) has
diff --git a/services/net/java/android/net/ip/IpServer.java b/services/net/java/android/net/ip/IpServer.java
index 0e44f88..fc1128b 100644
--- a/services/net/java/android/net/ip/IpServer.java
+++ b/services/net/java/android/net/ip/IpServer.java
@@ -506,7 +506,7 @@
if (v6only != null) {
params = new RaParams();
params.mtu = v6only.getMtu();
- params.hasDefaultRoute = v6only.hasIPv6DefaultRoute();
+ params.hasDefaultRoute = v6only.hasIpv6DefaultRoute();
if (params.hasDefaultRoute) params.hopLimit = getHopLimit(v6only.getInterfaceName());
diff --git a/core/java/android/net/ipmemorystore/Blob.aidl b/services/net/java/android/net/ipmemorystore/Blob.aidl
similarity index 100%
rename from core/java/android/net/ipmemorystore/Blob.aidl
rename to services/net/java/android/net/ipmemorystore/Blob.aidl
diff --git a/core/java/android/net/ipmemorystore/IOnBlobRetrievedListener.aidl b/services/net/java/android/net/ipmemorystore/IOnBlobRetrievedListener.aidl
similarity index 100%
rename from core/java/android/net/ipmemorystore/IOnBlobRetrievedListener.aidl
rename to services/net/java/android/net/ipmemorystore/IOnBlobRetrievedListener.aidl
diff --git a/core/java/android/net/ipmemorystore/IOnL2KeyResponseListener.aidl b/services/net/java/android/net/ipmemorystore/IOnL2KeyResponseListener.aidl
similarity index 100%
rename from core/java/android/net/ipmemorystore/IOnL2KeyResponseListener.aidl
rename to services/net/java/android/net/ipmemorystore/IOnL2KeyResponseListener.aidl
diff --git a/core/java/android/net/ipmemorystore/IOnNetworkAttributesRetrieved.aidl b/services/net/java/android/net/ipmemorystore/IOnNetworkAttributesRetrieved.aidl
similarity index 100%
rename from core/java/android/net/ipmemorystore/IOnNetworkAttributesRetrieved.aidl
rename to services/net/java/android/net/ipmemorystore/IOnNetworkAttributesRetrieved.aidl
diff --git a/core/java/android/net/ipmemorystore/IOnSameNetworkResponseListener.aidl b/services/net/java/android/net/ipmemorystore/IOnSameNetworkResponseListener.aidl
similarity index 100%
rename from core/java/android/net/ipmemorystore/IOnSameNetworkResponseListener.aidl
rename to services/net/java/android/net/ipmemorystore/IOnSameNetworkResponseListener.aidl
diff --git a/core/java/android/net/ipmemorystore/IOnStatusListener.aidl b/services/net/java/android/net/ipmemorystore/IOnStatusListener.aidl
similarity index 100%
rename from core/java/android/net/ipmemorystore/IOnStatusListener.aidl
rename to services/net/java/android/net/ipmemorystore/IOnStatusListener.aidl
diff --git a/core/java/android/net/ipmemorystore/NetworkAttributes.java b/services/net/java/android/net/ipmemorystore/NetworkAttributes.java
similarity index 100%
rename from core/java/android/net/ipmemorystore/NetworkAttributes.java
rename to services/net/java/android/net/ipmemorystore/NetworkAttributes.java
diff --git a/core/java/android/net/ipmemorystore/NetworkAttributesParcelable.aidl b/services/net/java/android/net/ipmemorystore/NetworkAttributesParcelable.aidl
similarity index 100%
rename from core/java/android/net/ipmemorystore/NetworkAttributesParcelable.aidl
rename to services/net/java/android/net/ipmemorystore/NetworkAttributesParcelable.aidl
diff --git a/core/java/android/net/ipmemorystore/SameL3NetworkResponse.java b/services/net/java/android/net/ipmemorystore/SameL3NetworkResponse.java
similarity index 100%
rename from core/java/android/net/ipmemorystore/SameL3NetworkResponse.java
rename to services/net/java/android/net/ipmemorystore/SameL3NetworkResponse.java
diff --git a/core/java/android/net/ipmemorystore/SameL3NetworkResponseParcelable.aidl b/services/net/java/android/net/ipmemorystore/SameL3NetworkResponseParcelable.aidl
similarity index 100%
rename from core/java/android/net/ipmemorystore/SameL3NetworkResponseParcelable.aidl
rename to services/net/java/android/net/ipmemorystore/SameL3NetworkResponseParcelable.aidl
diff --git a/core/java/android/net/ipmemorystore/Status.java b/services/net/java/android/net/ipmemorystore/Status.java
similarity index 97%
rename from core/java/android/net/ipmemorystore/Status.java
rename to services/net/java/android/net/ipmemorystore/Status.java
index cacd42d..13242c0 100644
--- a/core/java/android/net/ipmemorystore/Status.java
+++ b/services/net/java/android/net/ipmemorystore/Status.java
@@ -32,6 +32,7 @@
public static final int ERROR_ILLEGAL_ARGUMENT = -2;
public static final int ERROR_DATABASE_CANNOT_BE_OPENED = -3;
public static final int ERROR_STORAGE = -4;
+ public static final int ERROR_UNKNOWN = -5;
public final int resultCode;
diff --git a/core/java/android/net/ipmemorystore/StatusParcelable.aidl b/services/net/java/android/net/ipmemorystore/StatusParcelable.aidl
similarity index 100%
rename from core/java/android/net/ipmemorystore/StatusParcelable.aidl
rename to services/net/java/android/net/ipmemorystore/StatusParcelable.aidl
diff --git a/services/net/java/android/net/shared/InitialConfiguration.java b/services/net/java/android/net/shared/InitialConfiguration.java
index 4ad7138..007c8ca9 100644
--- a/services/net/java/android/net/shared/InitialConfiguration.java
+++ b/services/net/java/android/net/shared/InitialConfiguration.java
@@ -23,13 +23,12 @@
import android.net.InetAddresses;
import android.net.InitialConfigurationParcelable;
import android.net.IpPrefix;
-import android.net.IpPrefixParcelable;
import android.net.LinkAddress;
-import android.net.LinkAddressParcelable;
import android.net.RouteInfo;
import java.net.Inet4Address;
import java.net.InetAddress;
+import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
@@ -148,10 +147,8 @@
*/
public InitialConfigurationParcelable toStableParcelable() {
final InitialConfigurationParcelable p = new InitialConfigurationParcelable();
- p.ipAddresses = toParcelableArray(ipAddresses,
- LinkPropertiesParcelableUtil::toStableParcelable, LinkAddressParcelable.class);
- p.directlyConnectedRoutes = toParcelableArray(directlyConnectedRoutes,
- LinkPropertiesParcelableUtil::toStableParcelable, IpPrefixParcelable.class);
+ p.ipAddresses = ipAddresses.toArray(new LinkAddress[0]);
+ p.directlyConnectedRoutes = directlyConnectedRoutes.toArray(new IpPrefix[0]);
p.dnsServers = toParcelableArray(
dnsServers, IpConfigurationParcelableUtil::parcelAddress, String.class);
return p;
@@ -164,10 +161,8 @@
public static InitialConfiguration fromStableParcelable(InitialConfigurationParcelable p) {
if (p == null) return null;
final InitialConfiguration config = new InitialConfiguration();
- config.ipAddresses.addAll(fromParcelableArray(
- p.ipAddresses, LinkPropertiesParcelableUtil::fromStableParcelable));
- config.directlyConnectedRoutes.addAll(fromParcelableArray(
- p.directlyConnectedRoutes, LinkPropertiesParcelableUtil::fromStableParcelable));
+ config.ipAddresses.addAll(Arrays.asList(p.ipAddresses));
+ config.directlyConnectedRoutes.addAll(Arrays.asList(p.directlyConnectedRoutes));
config.dnsServers.addAll(
fromParcelableArray(p.dnsServers, IpConfigurationParcelableUtil::unparcelAddress));
return config;
@@ -212,7 +207,7 @@
}
private static boolean isIPv6GUA(LinkAddress addr) {
- return addr.isIPv6() && addr.isGlobalPreferred();
+ return addr.isIpv6() && addr.isGlobalPreferred();
}
// TODO: extract out into CollectionUtils.
diff --git a/services/net/java/android/net/shared/IpConfigurationParcelableUtil.java b/services/net/java/android/net/shared/IpConfigurationParcelableUtil.java
index 1f0525e..6b5826f 100644
--- a/services/net/java/android/net/shared/IpConfigurationParcelableUtil.java
+++ b/services/net/java/android/net/shared/IpConfigurationParcelableUtil.java
@@ -44,7 +44,7 @@
@Nullable StaticIpConfiguration config) {
if (config == null) return null;
final StaticIpConfigurationParcelable p = new StaticIpConfigurationParcelable();
- p.ipAddress = LinkPropertiesParcelableUtil.toStableParcelable(config.getIpAddress());
+ p.ipAddress = config.getIpAddress();
p.gateway = parcelAddress(config.getGateway());
p.dnsServers = toParcelableArray(
config.getDnsServers(), IpConfigurationParcelableUtil::parcelAddress, String.class);
@@ -59,7 +59,7 @@
@Nullable StaticIpConfigurationParcelable p) {
if (p == null) return null;
final StaticIpConfiguration config = new StaticIpConfiguration();
- config.setIpAddress(LinkPropertiesParcelableUtil.fromStableParcelable(p.ipAddress));
+ config.setIpAddress(p.ipAddress);
config.setGateway(unparcelAddress(p.gateway));
for (InetAddress addr : fromParcelableArray(
p.dnsServers, IpConfigurationParcelableUtil::unparcelAddress)) {
diff --git a/services/net/java/android/net/shared/LinkPropertiesParcelableUtil.java b/services/net/java/android/net/shared/LinkPropertiesParcelableUtil.java
index 51d955d..1729da6 100644
--- a/services/net/java/android/net/shared/LinkPropertiesParcelableUtil.java
+++ b/services/net/java/android/net/shared/LinkPropertiesParcelableUtil.java
@@ -16,25 +16,9 @@
package android.net.shared;
-import static android.net.shared.IpConfigurationParcelableUtil.parcelAddress;
-import static android.net.shared.IpConfigurationParcelableUtil.unparcelAddress;
-import static android.net.shared.ParcelableUtil.fromParcelableArray;
-import static android.net.shared.ParcelableUtil.toParcelableArray;
-
import android.annotation.Nullable;
-import android.net.IpPrefix;
-import android.net.IpPrefixParcelable;
-import android.net.LinkAddress;
-import android.net.LinkAddressParcelable;
import android.net.LinkProperties;
-import android.net.LinkPropertiesParcelable;
import android.net.ProxyInfo;
-import android.net.ProxyInfoParcelable;
-import android.net.RouteInfo;
-import android.net.RouteInfoParcelable;
-import android.net.Uri;
-
-import java.util.Arrays;
/**
* Collection of utility methods to convert to and from stable AIDL parcelables for LinkProperties
@@ -42,177 +26,22 @@
* @hide
*/
public final class LinkPropertiesParcelableUtil {
+ // Temporary methods to facilitate migrating clients away from LinkPropertiesParcelable
+ // TODO: remove the following methods after migrating clients.
/**
- * Convert a ProxyInfo to a ProxyInfoParcelable
+ * @deprecated conversion to stable parcelable is no longer necessary.
*/
- public static ProxyInfoParcelable toStableParcelable(@Nullable ProxyInfo proxyInfo) {
- if (proxyInfo == null) {
- return null;
- }
- final ProxyInfoParcelable parcel = new ProxyInfoParcelable();
- parcel.host = proxyInfo.getHost();
- parcel.port = proxyInfo.getPort();
- parcel.exclusionList = proxyInfo.getExclusionList();
- parcel.pacFileUrl = proxyInfo.getPacFileUrl().toString();
- return parcel;
- }
-
- /**
- * Convert a ProxyInfoParcelable to a ProxyInfo
- */
- public static ProxyInfo fromStableParcelable(@Nullable ProxyInfoParcelable parcel) {
- if (parcel == null) {
- return null;
- }
- if (Uri.EMPTY.toString().equals(parcel.pacFileUrl)) {
- return ProxyInfo.buildDirectProxy(
- parcel.host, parcel.port, Arrays.asList(parcel.exclusionList));
- } else {
- return ProxyInfo.buildPacProxy(Uri.parse(parcel.pacFileUrl));
- }
- }
-
- /**
- * Convert an IpPrefixParcelable to an IpPrefix
- */
- public static IpPrefixParcelable toStableParcelable(@Nullable IpPrefix ipPrefix) {
- if (ipPrefix == null) {
- return null;
- }
- final IpPrefixParcelable parcel = new IpPrefixParcelable();
- parcel.address = parcelAddress(ipPrefix.getAddress());
- parcel.prefixLength = ipPrefix.getPrefixLength();
- return parcel;
- }
-
- /**
- * Convert an IpPrefix to an IpPrefixParcelable
- */
- public static IpPrefix fromStableParcelable(@Nullable IpPrefixParcelable parcel) {
- if (parcel == null) {
- return null;
- }
- return new IpPrefix(unparcelAddress(parcel.address), parcel.prefixLength);
- }
-
- /**
- * Convert a RouteInfoParcelable to a RouteInfo
- */
- public static RouteInfoParcelable toStableParcelable(@Nullable RouteInfo routeInfo) {
- if (routeInfo == null) {
- return null;
- }
- final RouteInfoParcelable parcel = new RouteInfoParcelable();
- parcel.destination = toStableParcelable(routeInfo.getDestination());
- parcel.gatewayAddr = parcelAddress(routeInfo.getGateway());
- parcel.ifaceName = routeInfo.getInterface();
- parcel.type = routeInfo.getType();
- return parcel;
- }
-
- /**
- * Convert a RouteInfo to a RouteInfoParcelable
- */
- public static RouteInfo fromStableParcelable(@Nullable RouteInfoParcelable parcel) {
- if (parcel == null) {
- return null;
- }
- final IpPrefix destination = fromStableParcelable(parcel.destination);
- return new RouteInfo(
- destination, unparcelAddress(parcel.gatewayAddr),
- parcel.ifaceName, parcel.type);
- }
-
- /**
- * Convert a LinkAddressParcelable to a LinkAddress
- */
- public static LinkAddressParcelable toStableParcelable(@Nullable LinkAddress la) {
- if (la == null) {
- return null;
- }
- final LinkAddressParcelable parcel = new LinkAddressParcelable();
- parcel.address = parcelAddress(la.getAddress());
- parcel.prefixLength = la.getPrefixLength();
- parcel.flags = la.getFlags();
- parcel.scope = la.getScope();
- return parcel;
- }
-
- /**
- * Convert a LinkAddress to a LinkAddressParcelable
- */
- public static LinkAddress fromStableParcelable(@Nullable LinkAddressParcelable parcel) {
- if (parcel == null) {
- return null;
- }
- return new LinkAddress(
- unparcelAddress(parcel.address),
- parcel.prefixLength,
- parcel.flags,
- parcel.scope);
- }
-
- /**
- * Convert a LinkProperties to a LinkPropertiesParcelable
- */
- public static LinkPropertiesParcelable toStableParcelable(@Nullable LinkProperties lp) {
- if (lp == null) {
- return null;
- }
- final LinkPropertiesParcelable parcel = new LinkPropertiesParcelable();
- parcel.ifaceName = lp.getInterfaceName();
- parcel.linkAddresses = toParcelableArray(
- lp.getLinkAddresses(),
- LinkPropertiesParcelableUtil::toStableParcelable,
- LinkAddressParcelable.class);
- parcel.dnses = toParcelableArray(
- lp.getDnsServers(), IpConfigurationParcelableUtil::parcelAddress, String.class);
- parcel.pcscfs = toParcelableArray(
- lp.getPcscfServers(), IpConfigurationParcelableUtil::parcelAddress, String.class);
- parcel.validatedPrivateDnses = toParcelableArray(lp.getValidatedPrivateDnsServers(),
- IpConfigurationParcelableUtil::parcelAddress, String.class);
- parcel.usePrivateDns = lp.isPrivateDnsActive();
- parcel.privateDnsServerName = lp.getPrivateDnsServerName();
- parcel.domains = lp.getDomains();
- parcel.routes = toParcelableArray(
- lp.getRoutes(), LinkPropertiesParcelableUtil::toStableParcelable,
- RouteInfoParcelable.class);
- parcel.httpProxy = toStableParcelable(lp.getHttpProxy());
- parcel.mtu = lp.getMtu();
- parcel.tcpBufferSizes = lp.getTcpBufferSizes();
- parcel.nat64Prefix = toStableParcelable(lp.getNat64Prefix());
- return parcel;
- }
-
- /**
- * Convert a LinkPropertiesParcelable to a LinkProperties
- */
- public static LinkProperties fromStableParcelable(@Nullable LinkPropertiesParcelable parcel) {
- if (parcel == null) {
- return null;
- }
- final LinkProperties lp = new LinkProperties();
- lp.setInterfaceName(parcel.ifaceName);
- lp.setLinkAddresses(fromParcelableArray(parcel.linkAddresses,
- LinkPropertiesParcelableUtil::fromStableParcelable));
- lp.setDnsServers(fromParcelableArray(
- parcel.dnses, IpConfigurationParcelableUtil::unparcelAddress));
- lp.setPcscfServers(fromParcelableArray(
- parcel.pcscfs, IpConfigurationParcelableUtil::unparcelAddress));
- lp.setValidatedPrivateDnsServers(
- fromParcelableArray(parcel.validatedPrivateDnses,
- IpConfigurationParcelableUtil::unparcelAddress));
- lp.setUsePrivateDns(parcel.usePrivateDns);
- lp.setPrivateDnsServerName(parcel.privateDnsServerName);
- lp.setDomains(parcel.domains);
- for (RouteInfoParcelable route : parcel.routes) {
- lp.addRoute(fromStableParcelable(route));
- }
- lp.setHttpProxy(fromStableParcelable(parcel.httpProxy));
- lp.setMtu(parcel.mtu);
- lp.setTcpBufferSizes(parcel.tcpBufferSizes);
- lp.setNat64Prefix(fromStableParcelable(parcel.nat64Prefix));
+ @Deprecated
+ public static LinkProperties toStableParcelable(@Nullable LinkProperties lp) {
return lp;
}
+
+ /**
+ * @deprecated conversion to stable parcelable is no longer necessary.
+ */
+ @Deprecated
+ public static ProxyInfo toStableParcelable(@Nullable ProxyInfo info) {
+ return info;
+ }
}
diff --git a/services/net/java/android/net/shared/NetworkParcelableUtil.java b/services/net/java/android/net/shared/NetworkParcelableUtil.java
deleted file mode 100644
index d0b54b8..0000000
--- a/services/net/java/android/net/shared/NetworkParcelableUtil.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (C) 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.net.shared;
-
-import android.annotation.Nullable;
-import android.net.Network;
-import android.net.NetworkParcelable;
-
-/**
- * Utility methods to convert to/from stable AIDL parcelables for network attribute classes.
- * @hide
- */
-public final class NetworkParcelableUtil {
- /**
- * Convert from a Network to a NetworkParcelable.
- */
- public static NetworkParcelable toStableParcelable(@Nullable Network network) {
- if (network == null) {
- return null;
- }
- final NetworkParcelable p = new NetworkParcelable();
- p.networkHandle = network.getNetworkHandle();
-
- return p;
- }
-
- /**
- * Convert from a NetworkParcelable to a Network.
- */
- public static Network fromStableParcelable(@Nullable NetworkParcelable p) {
- if (p == null) {
- return null;
- }
- return Network.fromNetworkHandle(p.networkHandle);
- }
-}
diff --git a/services/net/java/android/net/shared/ProvisioningConfiguration.java b/services/net/java/android/net/shared/ProvisioningConfiguration.java
index f937065..0aceb22 100644
--- a/services/net/java/android/net/shared/ProvisioningConfiguration.java
+++ b/services/net/java/android/net/shared/ProvisioningConfiguration.java
@@ -239,7 +239,7 @@
p.apfCapabilities = IpConfigurationParcelableUtil.toStableParcelable(mApfCapabilities);
p.provisioningTimeoutMs = mProvisioningTimeoutMs;
p.ipv6AddrGenMode = mIPv6AddrGenMode;
- p.network = NetworkParcelableUtil.toStableParcelable(mNetwork);
+ p.network = mNetwork;
p.displayName = mDisplayName;
return p;
}
@@ -263,7 +263,7 @@
p.apfCapabilities);
config.mProvisioningTimeoutMs = p.provisioningTimeoutMs;
config.mIPv6AddrGenMode = p.ipv6AddrGenMode;
- config.mNetwork = NetworkParcelableUtil.fromStableParcelable(p.network);
+ config.mNetwork = p.network;
config.mDisplayName = p.displayName;
return config;
}
diff --git a/services/tests/servicestests/src/com/android/server/pm/PackageManagerServiceTest.java b/services/tests/servicestests/src/com/android/server/pm/PackageManagerServiceTest.java
index e379cd0..68728af 100644
--- a/services/tests/servicestests/src/com/android/server/pm/PackageManagerServiceTest.java
+++ b/services/tests/servicestests/src/com/android/server/pm/PackageManagerServiceTest.java
@@ -56,11 +56,11 @@
}
@Override
- public void notifyPackageAdded(String packageName) {
+ public void notifyPackageAdded(String packageName, int uid) {
}
@Override
- public void notifyPackageRemoved(String packageName) {
+ public void notifyPackageRemoved(String packageName, int uid) {
}
}
diff --git a/startop/view_compiler/Android.bp b/startop/view_compiler/Android.bp
index f5b4308..92ea872 100644
--- a/startop/view_compiler/Android.bp
+++ b/startop/view_compiler/Android.bp
@@ -22,7 +22,6 @@
],
shared_libs: [
"libbase",
- "libz",
"slicer",
],
static_libs: [
diff --git a/telephony/java/android/telephony/CarrierConfigManager.java b/telephony/java/android/telephony/CarrierConfigManager.java
index 3454c1c..bafec5c 100755
--- a/telephony/java/android/telephony/CarrierConfigManager.java
+++ b/telephony/java/android/telephony/CarrierConfigManager.java
@@ -2454,6 +2454,18 @@
*/
public static final String KEY_OPPORTUNISTIC_NETWORK_DATA_SWITCH_HYSTERESIS_TIME_LONG =
"opportunistic_network_data_switch_hysteresis_time_long";
+
+ /**
+ * Indicates zero or more emergency number prefix(es), because some carrier requires
+ * if users dial an emergency number address with a specific prefix, the combination of the
+ * prefix and the address is also a valid emergency number to dial. For example, an emergency
+ * number prefix is 318, and the emergency number is 911. Both 318911 and 911 can be dialed by
+ * users for emergency call. An empty array of string indicates that current carrier does not
+ * have this requirement.
+ */
+ public static final String KEY_EMERGENCY_NUMBER_PREFIX_STRING_ARRAY =
+ "emergency_number_prefix_string_array";
+
/**
* Determines whether the carrier wants to cancel the cs reject notification automatically
* when the voice registration state changes.
@@ -2884,6 +2896,7 @@
new int[] {
1 /* Roaming Indicator Off */
});
+ sDefaults.putStringArray(KEY_EMERGENCY_NUMBER_PREFIX_STRING_ARRAY, new String[0]);
sDefaults.putString(KEY_5G_ICON_CONFIGURATION_STRING,
"connected_mmwave:None,connected:5G,not_restricted:None,restricted:None");
sDefaults.putBoolean(KEY_AUTO_CANCEL_CS_REJECT_NOTIFICATION, false);
diff --git a/telephony/java/android/telephony/CellIdentityNr.java b/telephony/java/android/telephony/CellIdentityNr.java
index b94ca9b..771e7b9 100644
--- a/telephony/java/android/telephony/CellIdentityNr.java
+++ b/telephony/java/android/telephony/CellIdentityNr.java
@@ -16,13 +16,15 @@
package android.telephony;
+import android.annotation.IntRange;
+import android.annotation.Nullable;
import android.os.Parcel;
import android.telephony.gsm.GsmCellLocation;
import java.util.Objects;
/**
- * Information to represent a unique 5G NR cell.
+ * Information to represent a unique NR(New Radio 5G) cell.
*/
public final class CellIdentityNr extends CellIdentity {
private static final String TAG = "CellIdentityNr";
@@ -79,7 +81,7 @@
}
/**
- * Get the NR Cell Identity.
+ * Get the NR(New Radio 5G) Cell Identity.
*
* @return The 36-bit NR Cell Identity in range [0, 68719476735] or
* {@link CellInfo#UNAVAILABLE_LONG} if unknown.
@@ -96,6 +98,7 @@
*
* @return Integer value in range [0, 3279165] or {@link CellInfo#UNAVAILABLE} if unknown.
*/
+ @IntRange(from = 0, to = 3279165)
public int getNrarfcn() {
return mNrArfcn;
}
@@ -104,6 +107,7 @@
* Get the physical cell id.
* @return Integer value in range [0, 1007] or {@link CellInfo#UNAVAILABLE} if unknown.
*/
+ @IntRange(from = 0, to = 1007)
public int getPci() {
return mPci;
}
@@ -112,6 +116,7 @@
* Get the tracking area code.
* @return a 16 bit integer or {@link CellInfo#UNAVAILABLE} if unknown.
*/
+ @IntRange(from = 0, to = 65535)
public int getTac() {
return mTac;
}
@@ -119,6 +124,7 @@
/**
* @return Mobile Country Code in string format, or {@code null} if unknown.
*/
+ @Nullable
public String getMccString() {
return mMccStr;
}
@@ -126,6 +132,7 @@
/**
* @return Mobile Network Code in string fomrat, or {@code null} if unknown.
*/
+ @Nullable
public String getMncString() {
return mMncStr;
}
diff --git a/telephony/java/android/telephony/CellIdentityTdscdma.java b/telephony/java/android/telephony/CellIdentityTdscdma.java
index dba437a..19b11b6 100644
--- a/telephony/java/android/telephony/CellIdentityTdscdma.java
+++ b/telephony/java/android/telephony/CellIdentityTdscdma.java
@@ -16,6 +16,7 @@
package android.telephony;
+import android.annotation.NonNull;
import android.annotation.Nullable;
import android.os.Parcel;
import android.telephony.gsm.GsmCellLocation;
@@ -205,6 +206,12 @@
/** Implement the Parcelable interface */
@Override
+ public int describeContents() {
+ return 0;
+ }
+
+ /** Implement the Parcelable interface */
+ @Override
public void writeToParcel(Parcel dest, int flags) {
if (DBG) log("writeToParcel(Parcel, int): " + toString());
super.writeToParcel(dest, CellInfo.TYPE_TDSCDMA);
@@ -226,16 +233,17 @@
/** Implement the Parcelable interface */
@SuppressWarnings("hiding")
+ @NonNull
public static final Creator<CellIdentityTdscdma> CREATOR =
new Creator<CellIdentityTdscdma>() {
@Override
- public CellIdentityTdscdma createFromParcel(Parcel in) {
+ public @NonNull CellIdentityTdscdma createFromParcel(Parcel in) {
in.readInt(); // skip
return createFromParcelBody(in);
}
@Override
- public CellIdentityTdscdma[] newArray(int size) {
+ public @NonNull CellIdentityTdscdma[] newArray(int size) {
return new CellIdentityTdscdma[size];
}
};
diff --git a/telephony/java/android/telephony/CellInfoNr.java b/telephony/java/android/telephony/CellInfoNr.java
index 11857a6..7f7902c 100644
--- a/telephony/java/android/telephony/CellInfoNr.java
+++ b/telephony/java/android/telephony/CellInfoNr.java
@@ -16,6 +16,7 @@
package android.telephony;
+import android.annotation.NonNull;
import android.os.Parcel;
import java.util.Objects;
@@ -36,11 +37,13 @@
}
@Override
+ @NonNull
public CellIdentity getCellIdentity() {
return mCellIdentity;
}
@Override
+ @NonNull
public CellSignalStrength getCellSignalStrength() {
return mCellSignalStrength;
}
diff --git a/telephony/java/android/telephony/CellInfoTdscdma.java b/telephony/java/android/telephony/CellInfoTdscdma.java
index cb45e95..1830086 100644
--- a/telephony/java/android/telephony/CellInfoTdscdma.java
+++ b/telephony/java/android/telephony/CellInfoTdscdma.java
@@ -16,6 +16,7 @@
package android.telephony;
+import android.annotation.NonNull;
import android.os.Parcel;
import android.os.Parcelable;
@@ -24,7 +25,9 @@
/**
* A {@link CellInfo} representing a TD-SCDMA cell that provides identity and measurement info.
*
- * @hide
+ * @see android.telephony.CellInfo
+ * @see android.telephony.CellSignalStrengthTdscdma
+ * @see android.telephony.CellIdentityTdscdma
*/
public final class CellInfoTdscdma extends CellInfo implements Parcelable {
@@ -72,18 +75,21 @@
mCellSignalStrengthTdscdma = new CellSignalStrengthTdscdma(cit.signalStrengthTdscdma);
}
- @Override public CellIdentityTdscdma getCellIdentity() {
+ @Override
+ public @NonNull CellIdentityTdscdma getCellIdentity() {
return mCellIdentityTdscdma;
}
+
/** @hide */
public void setCellIdentity(CellIdentityTdscdma cid) {
mCellIdentityTdscdma = cid;
}
@Override
- public CellSignalStrengthTdscdma getCellSignalStrength() {
+ public @NonNull CellSignalStrengthTdscdma getCellSignalStrength() {
return mCellSignalStrengthTdscdma;
}
+
/** @hide */
public void setCellSignalStrength(CellSignalStrengthTdscdma css) {
mCellSignalStrengthTdscdma = css;
@@ -149,15 +155,16 @@
}
/** Implement the Parcelable interface */
+ @NonNull
public static final Creator<CellInfoTdscdma> CREATOR = new Creator<CellInfoTdscdma>() {
@Override
- public CellInfoTdscdma createFromParcel(Parcel in) {
+ public @NonNull CellInfoTdscdma createFromParcel(Parcel in) {
in.readInt(); // Skip past token, we know what it is
return createFromParcelBody(in);
}
@Override
- public CellInfoTdscdma[] newArray(int size) {
+ public @NonNull CellInfoTdscdma[] newArray(int size) {
return new CellInfoTdscdma[size];
}
};
diff --git a/telephony/java/android/telephony/CellSignalStrengthTdscdma.java b/telephony/java/android/telephony/CellSignalStrengthTdscdma.java
index 5ae89b0..ddbd851 100644
--- a/telephony/java/android/telephony/CellSignalStrengthTdscdma.java
+++ b/telephony/java/android/telephony/CellSignalStrengthTdscdma.java
@@ -16,6 +16,7 @@
package android.telephony;
+import android.annotation.NonNull;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.PersistableBundle;
@@ -25,7 +26,8 @@
/**
* Tdscdma signal strength related information.
*
- * @hide
+ * This class provides signal strength and signal quality information for the TD-SCDMA air
+ * interface. For more information see 3gpp 25.225.
*/
public final class CellSignalStrengthTdscdma extends CellSignalStrength implements Parcelable {
@@ -59,7 +61,9 @@
* @param rssi in dBm [-113, -51] or UNAVAILABLE
* @param ber [0-7], 99 or UNAVAILABLE
* @param rscp in dBm [-120, -24] or UNAVAILABLE
- * @hide */
+ *
+ * @hide
+ */
public CellSignalStrengthTdscdma(int rssi, int ber, int rscp) {
mRssi = inRangeOrUnavailable(rssi, -113, -51);
mBitErrorRate = inRangeOrUnavailable(ber, 0, 7, 99);
@@ -148,8 +152,7 @@
}
/**
- * Get the RSCP as dBm
- * @hide
+ * Get the RSCP as dBm value -120..-24dBm or {@link CellInfo#UNAVAILABLE UNAVAILABLE}.
*/
public int getRscp() {
return mRscp;
@@ -160,7 +163,7 @@
*
* Asu is calculated based on 3GPP RSRP. Refer to 3GPP 27.007 (Ver 10.3.0) Sec 8.69
*
- * @return RSCP in ASU 0..96, 255, or UNAVAILABLE
+ * @return RSCP in ASU 0..96, 255, or {@link CellInfo#UNAVAILABLE UNAVAILABLE}.
*/
@Override
public int getAsuLevel() {
@@ -237,15 +240,16 @@
/** Implement the Parcelable interface */
@SuppressWarnings("hiding")
+ @NonNull
public static final Parcelable.Creator<CellSignalStrengthTdscdma> CREATOR =
new Parcelable.Creator<CellSignalStrengthTdscdma>() {
@Override
- public CellSignalStrengthTdscdma createFromParcel(Parcel in) {
+ public @NonNull CellSignalStrengthTdscdma createFromParcel(Parcel in) {
return new CellSignalStrengthTdscdma(in);
}
@Override
- public CellSignalStrengthTdscdma[] newArray(int size) {
+ public @NonNull CellSignalStrengthTdscdma[] newArray(int size) {
return new CellSignalStrengthTdscdma[size];
}
};
diff --git a/telephony/java/android/telephony/DataFailCause.java b/telephony/java/android/telephony/DataFailCause.java
index f0a26f5..ca264f7 100644
--- a/telephony/java/android/telephony/DataFailCause.java
+++ b/telephony/java/android/telephony/DataFailCause.java
@@ -318,8 +318,8 @@
public static final int LOW_POWER_MODE_OR_POWERING_DOWN = 0x7FC;
/** APN has been disabled. */
public static final int APN_DISABLED = 0x7FD;
- /** PPP inactivity timer expired. */
- public static final int PPP_INACTIVITY_TIMER_EXPIRED = 0x7FE;
+ /** Maximum PPP inactivity timer expired. */
+ public static final int MAX_PPP_INACTIVITY_TIMER_EXPIRED = 0x7FE;
/** IPv6 address transfer failed. */
public static final int IPV6_ADDRESS_TRANSFER_FAILED = 0x7FF;
/** Target RAT swap failed. */
@@ -339,12 +339,12 @@
* IPv4 data call bring up is rejected because the UE already maintains the allotted maximum
* number of IPv4 data connections.
*/
- public static final int IPV4_CONNECTIONS_LIMIT_REACHED = 0x804;
+ public static final int MAX_IPV4_CONNECTIONS = 0x804;
/**
* IPv6 data call bring up is rejected because the UE already maintains the allotted maximum
* number of IPv6 data connections.
*/
- public static final int IPV6_CONNECTIONS_LIMIT_REACHED = 0x805;
+ public static final int MAX_IPV6_CONNECTIONS = 0x805;
/**
* New PDN bring up is rejected during interface selection because the UE has already allotted
* the available interfaces for other PDNs.
@@ -416,7 +416,7 @@
*/
public static final int CHANNEL_ACQUISITION_FAILURE = 0x81E;
/** Maximum access probes transmitted. */
- public static final int ACCESS_PROBE_LIMIT_REACHED = 0x81F;
+ public static final int MAX_ACCESS_PROBE = 0x81F;
/** Concurrent service is not supported by base station. */
public static final int CONCURRENT_SERVICE_NOT_SUPPORTED_BY_BASE_STATION = 0x820;
/** There was no response received from the base station. */
@@ -1079,14 +1079,14 @@
SIM_CARD_CHANGED,
LOW_POWER_MODE_OR_POWERING_DOWN,
APN_DISABLED,
- PPP_INACTIVITY_TIMER_EXPIRED,
+ MAX_PPP_INACTIVITY_TIMER_EXPIRED,
IPV6_ADDRESS_TRANSFER_FAILED,
TRAT_SWAP_FAILED,
EHRPD_TO_HRPD_FALLBACK,
MIP_CONFIG_FAILURE,
PDN_INACTIVITY_TIMER_EXPIRED,
- IPV4_CONNECTIONS_LIMIT_REACHED,
- IPV6_CONNECTIONS_LIMIT_REACHED,
+ MAX_IPV4_CONNECTIONS,
+ MAX_IPV6_CONNECTIONS,
APN_MISMATCH,
IP_VERSION_MISMATCH,
DUN_CALL_DISALLOWED,
@@ -1112,7 +1112,7 @@
CDMA_INCOMING_CALL,
CDMA_ALERT_STOP,
CHANNEL_ACQUISITION_FAILURE,
- ACCESS_PROBE_LIMIT_REACHED,
+ MAX_ACCESS_PROBE,
CONCURRENT_SERVICE_NOT_SUPPORTED_BY_BASE_STATION,
NO_RESPONSE_FROM_BASE_STATION,
REJECTED_BY_BASE_STATION,
@@ -1447,14 +1447,14 @@
sFailCauseMap.put(SIM_CARD_CHANGED, "SIM_CARD_CHANGED");
sFailCauseMap.put(LOW_POWER_MODE_OR_POWERING_DOWN, "LOW_POWER_MODE_OR_POWERING_DOWN");
sFailCauseMap.put(APN_DISABLED, "APN_DISABLED");
- sFailCauseMap.put(PPP_INACTIVITY_TIMER_EXPIRED, "PPP_INACTIVITY_TIMER_EXPIRED");
+ sFailCauseMap.put(MAX_PPP_INACTIVITY_TIMER_EXPIRED, "MAX_PPP_INACTIVITY_TIMER_EXPIRED");
sFailCauseMap.put(IPV6_ADDRESS_TRANSFER_FAILED, "IPV6_ADDRESS_TRANSFER_FAILED");
sFailCauseMap.put(TRAT_SWAP_FAILED, "TRAT_SWAP_FAILED");
sFailCauseMap.put(EHRPD_TO_HRPD_FALLBACK, "EHRPD_TO_HRPD_FALLBACK");
sFailCauseMap.put(MIP_CONFIG_FAILURE, "MIP_CONFIG_FAILURE");
sFailCauseMap.put(PDN_INACTIVITY_TIMER_EXPIRED, "PDN_INACTIVITY_TIMER_EXPIRED");
- sFailCauseMap.put(IPV4_CONNECTIONS_LIMIT_REACHED, "IPV4_CONNECTIONS_LIMIT_REACHED");
- sFailCauseMap.put(IPV6_CONNECTIONS_LIMIT_REACHED, "IPV6_CONNECTIONS_LIMIT_REACHED");
+ sFailCauseMap.put(MAX_IPV4_CONNECTIONS, "MAX_IPV4_CONNECTIONS");
+ sFailCauseMap.put(MAX_IPV6_CONNECTIONS, "MAX_IPV6_CONNECTIONS");
sFailCauseMap.put(APN_MISMATCH, "APN_MISMATCH");
sFailCauseMap.put(IP_VERSION_MISMATCH, "IP_VERSION_MISMATCH");
sFailCauseMap.put(DUN_CALL_DISALLOWED, "DUN_CALL_DISALLOWED");
@@ -1480,7 +1480,7 @@
sFailCauseMap.put(CDMA_INCOMING_CALL, "CDMA_INCOMING_CALL");
sFailCauseMap.put(CDMA_ALERT_STOP, "CDMA_ALERT_STOP");
sFailCauseMap.put(CHANNEL_ACQUISITION_FAILURE, "CHANNEL_ACQUISITION_FAILURE");
- sFailCauseMap.put(ACCESS_PROBE_LIMIT_REACHED, "ACCESS_PROBE_LIMIT_REACHED");
+ sFailCauseMap.put(MAX_ACCESS_PROBE, "MAX_ACCESS_PROBE");
sFailCauseMap.put(CONCURRENT_SERVICE_NOT_SUPPORTED_BY_BASE_STATION,
"CONCURRENT_SERVICE_NOT_SUPPORTED_BY_BASE_STATION");
sFailCauseMap.put(NO_RESPONSE_FROM_BASE_STATION, "NO_RESPONSE_FROM_BASE_STATION");
diff --git a/telephony/java/android/telephony/INetworkService.aidl b/telephony/java/android/telephony/INetworkService.aidl
index 9ef7186..3a9c3a5 100644
--- a/telephony/java/android/telephony/INetworkService.aidl
+++ b/telephony/java/android/telephony/INetworkService.aidl
@@ -25,7 +25,7 @@
{
void createNetworkServiceProvider(int slotId);
void removeNetworkServiceProvider(int slotId);
- void getNetworkRegistrationState(int slotId, int domain, INetworkServiceCallback callback);
- void registerForNetworkRegistrationStateChanged(int slotId, INetworkServiceCallback callback);
- void unregisterForNetworkRegistrationStateChanged(int slotId, INetworkServiceCallback callback);
+ void requestNetworkRegistrationInfo(int slotId, int domain, INetworkServiceCallback callback);
+ void registerForNetworkRegistrationInfoChanged(int slotId, INetworkServiceCallback callback);
+ void unregisterForNetworkRegistrationInfoChanged(int slotId, INetworkServiceCallback callback);
}
diff --git a/telephony/java/android/telephony/INetworkServiceCallback.aidl b/telephony/java/android/telephony/INetworkServiceCallback.aidl
index 520598f..c35986c 100644
--- a/telephony/java/android/telephony/INetworkServiceCallback.aidl
+++ b/telephony/java/android/telephony/INetworkServiceCallback.aidl
@@ -16,7 +16,7 @@
package android.telephony;
-import android.telephony.NetworkRegistrationState;
+import android.telephony.NetworkRegistrationInfo;
/**
* Network service call back interface
@@ -24,6 +24,6 @@
*/
oneway interface INetworkServiceCallback
{
- void onGetNetworkRegistrationStateComplete(int result, in NetworkRegistrationState state);
+ void onRequestNetworkRegistrationInfoComplete(int result, in NetworkRegistrationInfo state);
void onNetworkStateChanged();
}
diff --git a/telephony/java/android/telephony/NetworkRegistrationState.aidl b/telephony/java/android/telephony/NetworkRegistrationInfo.aidl
similarity index 94%
rename from telephony/java/android/telephony/NetworkRegistrationState.aidl
rename to telephony/java/android/telephony/NetworkRegistrationInfo.aidl
index 98cba77..5c803bf 100644
--- a/telephony/java/android/telephony/NetworkRegistrationState.aidl
+++ b/telephony/java/android/telephony/NetworkRegistrationInfo.aidl
@@ -16,4 +16,4 @@
package android.telephony;
-parcelable NetworkRegistrationState;
+parcelable NetworkRegistrationInfo;
diff --git a/telephony/java/android/telephony/NetworkRegistrationState.java b/telephony/java/android/telephony/NetworkRegistrationInfo.java
similarity index 62%
rename from telephony/java/android/telephony/NetworkRegistrationState.java
rename to telephony/java/android/telephony/NetworkRegistrationInfo.java
index 74f200b..9145b25 100644
--- a/telephony/java/android/telephony/NetworkRegistrationState.java
+++ b/telephony/java/android/telephony/NetworkRegistrationInfo.java
@@ -27,16 +27,18 @@
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
-import java.util.Arrays;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors;
/**
- * Description of a mobile network registration state
+ * Description of a mobile network registration info
* @hide
*/
@SystemApi
-public class NetworkRegistrationState implements Parcelable {
+public final class NetworkRegistrationInfo implements Parcelable {
/**
* Network domain
* @hide
@@ -51,41 +53,42 @@
public static final int DOMAIN_PS = 2;
/**
- * Registration state
+ * Network registration state
* @hide
*/
@Retention(RetentionPolicy.SOURCE)
- @IntDef(prefix = "REG_STATE_",
- value = {REG_STATE_NOT_REG_NOT_SEARCHING, REG_STATE_HOME, REG_STATE_NOT_REG_SEARCHING,
- REG_STATE_DENIED, REG_STATE_UNKNOWN, REG_STATE_ROAMING})
- public @interface RegState {}
+ @IntDef(prefix = "REGISTRATION_STATE_",
+ value = {REGISTRATION_STATE_NOT_REGISTERED_OR_SEARCHING, REGISTRATION_STATE_HOME,
+ REGISTRATION_STATE_NOT_REGISTERED_SEARCHING, REGISTRATION_STATE_DENIED,
+ REGISTRATION_STATE_UNKNOWN, REGISTRATION_STATE_ROAMING})
+ public @interface RegistrationState {}
- /** Not registered. The device is not currently searching a new operator to register */
- public static final int REG_STATE_NOT_REG_NOT_SEARCHING = 0;
- /** Registered on home network */
- public static final int REG_STATE_HOME = 1;
- /** Not registered. The device is currently searching a new operator to register */
- public static final int REG_STATE_NOT_REG_SEARCHING = 2;
- /** Registration denied */
- public static final int REG_STATE_DENIED = 3;
- /** Registration state is unknown */
- public static final int REG_STATE_UNKNOWN = 4;
- /** Registered on roaming network */
- public static final int REG_STATE_ROAMING = 5;
+ /** Not registered. The device is not currently searching a new operator to register. */
+ public static final int REGISTRATION_STATE_NOT_REGISTERED_OR_SEARCHING = 0;
+ /** Registered on home network. */
+ public static final int REGISTRATION_STATE_HOME = 1;
+ /** Not registered. The device is currently searching a new operator to register. */
+ public static final int REGISTRATION_STATE_NOT_REGISTERED_SEARCHING = 2;
+ /** Registration denied. */
+ public static final int REGISTRATION_STATE_DENIED = 3;
+ /** Registration state is unknown. */
+ public static final int REGISTRATION_STATE_UNKNOWN = 4;
+ /** Registered on roaming network. */
+ public static final int REGISTRATION_STATE_ROAMING = 5;
/** @hide */
@Retention(RetentionPolicy.SOURCE)
- @IntDef(prefix = "NR_STATUS_",
- value = {NR_STATUS_NONE, NR_STATUS_RESTRICTED, NR_STATUS_NOT_RESTRICTED,
- NR_STATUS_CONNECTED})
- public @interface NRStatus {}
+ @IntDef(prefix = "NR_STATE_",
+ value = {NR_STATE_NONE, NR_STATE_RESTRICTED, NR_STATE_NOT_RESTRICTED,
+ NR_STATE_CONNECTED})
+ public @interface NRState {}
/**
* The device isn't camped on an LTE cell or the LTE cell doesn't support E-UTRA-NR
* Dual Connectivity(EN-DC).
* @hide
*/
- public static final int NR_STATUS_NONE = -1;
+ public static final int NR_STATE_NONE = -1;
/**
* The device is camped on an LTE cell that supports E-UTRA-NR Dual Connectivity(EN-DC) but
@@ -93,7 +96,7 @@
* the selected PLMN.
* @hide
*/
- public static final int NR_STATUS_RESTRICTED = 1;
+ public static final int NR_STATE_RESTRICTED = 1;
/**
* The device is camped on an LTE cell that supports E-UTRA-NR Dual Connectivity(EN-DC) and both
@@ -101,14 +104,14 @@
* selected PLMN.
* @hide
*/
- public static final int NR_STATUS_NOT_RESTRICTED = 2;
+ public static final int NR_STATE_NOT_RESTRICTED = 2;
/**
* The device is camped on an LTE cell that supports E-UTRA-NR Dual Connectivity(EN-DC) and
* also connected to at least one 5G cell as a secondary serving cell.
* @hide
*/
- public static final int NR_STATUS_CONNECTED = 3;
+ public static final int NR_STATE_CONNECTED = 3;
/**
* Supported service type
@@ -116,23 +119,36 @@
*/
@Retention(RetentionPolicy.SOURCE)
@IntDef(prefix = "SERVICE_TYPE_",
- value = {SERVICE_TYPE_VOICE, SERVICE_TYPE_DATA, SERVICE_TYPE_SMS, SERVICE_TYPE_VIDEO,
- SERVICE_TYPE_EMERGENCY})
+ value = {SERVICE_TYPE_UNKNOWN, SERVICE_TYPE_VOICE, SERVICE_TYPE_DATA, SERVICE_TYPE_SMS,
+ SERVICE_TYPE_VIDEO, SERVICE_TYPE_EMERGENCY})
public @interface ServiceType {}
+ /** Unkown service */
+ public static final int SERVICE_TYPE_UNKNOWN = 0;
+
+ /** Voice service */
public static final int SERVICE_TYPE_VOICE = 1;
+
+ /** Data service */
public static final int SERVICE_TYPE_DATA = 2;
+
+ /** SMS service */
public static final int SERVICE_TYPE_SMS = 3;
+
+ /** Video service */
public static final int SERVICE_TYPE_VIDEO = 4;
+
+ /** Emergency service */
public static final int SERVICE_TYPE_EMERGENCY = 5;
@Domain
private final int mDomain;
+ @TransportType
private final int mTransportType;
- @RegState
- private final int mRegState;
+ @RegistrationState
+ private final int mRegistrationState;
/**
* Save the {@link ServiceState.RoamingType roaming type}. it can be overridden roaming type
@@ -144,15 +160,15 @@
@NetworkType
private int mAccessNetworkTechnology;
- @NRStatus
- private int mNrStatus;
+ @NRState
+ private int mNrState;
private final int mRejectCause;
private final boolean mEmergencyOnly;
@ServiceType
- private final int[] mAvailableServices;
+ private final ArrayList<Integer> mAvailableServices;
@Nullable
private CellIdentity mCellIdentity;
@@ -167,95 +183,103 @@
* @param domain Network domain. Must be a {@link Domain}. For transport type
* {@link AccessNetworkConstants#TRANSPORT_TYPE_WLAN}, this must set to {@link #DOMAIN_PS}.
* @param transportType Transport type.
- * @param regState Network registration state. Must be one of the {@link RegState}. For
- * transport type {@link AccessNetworkConstants#TRANSPORT_TYPE_WLAN}, only
- * {@link #REG_STATE_HOME} and {@link #REG_STATE_NOT_REG_NOT_SEARCHING} are valid states.
+ * @param registrationState Network registration state. For transport type
+ * {@link AccessNetworkConstants#TRANSPORT_TYPE_WLAN}, only
+ * {@link #REGISTRATION_STATE_HOME} and {@link #REGISTRATION_STATE_NOT_REGISTERED_OR_SEARCHING}
+ * are valid states.
* @param accessNetworkTechnology Access network technology.For transport type
* {@link AccessNetworkConstants#TRANSPORT_TYPE_WLAN}, set to
* {@link TelephonyManager#NETWORK_TYPE_IWLAN}.
- * @param rejectCause Reason for denial if the registration state is {@link #REG_STATE_DENIED}.
- * Depending on {@code accessNetworkTechnology}, the values are defined in 3GPP TS 24.008
- * 10.5.3.6 for UMTS, 3GPP TS 24.301 9.9.3.9 for LTE, and 3GPP2 A.S0001 6.2.2.44 for CDMA. If
- * the reject cause is not supported or unknown, set it to 0.
+ * @param rejectCause Reason for denial if the registration state is
+ * {@link #REGISTRATION_STATE_DENIED}. Depending on {@code accessNetworkTechnology}, the values
+ * are defined in 3GPP TS 24.008 10.5.3.6 for UMTS, 3GPP TS 24.301 9.9.3.9 for LTE, and 3GPP2
+ * A.S0001 6.2.2.44 for CDMA. If the reject cause is not supported or unknown, set it to 0.
* // TODO: Add IWLAN reject cause reference
* @param emergencyOnly True if this registration is for emergency only.
- * @param availableServices The list of the supported services. Each element must be one of
- * the {@link ServiceType}.
+ * @param availableServices The list of the supported services.
* @param cellIdentity The identity representing a unique cell or wifi AP. Set to null if the
* information is not available.
*/
- public NetworkRegistrationState(@Domain int domain, @TransportType int transportType,
- @RegState int regState,
- @NetworkType int accessNetworkTechnology, int rejectCause,
- boolean emergencyOnly,
- @NonNull @ServiceType int[] availableServices,
- @Nullable CellIdentity cellIdentity) {
+ private NetworkRegistrationInfo(@Domain int domain, @TransportType int transportType,
+ @RegistrationState int registrationState,
+ @NetworkType int accessNetworkTechnology, int rejectCause,
+ boolean emergencyOnly,
+ @Nullable @ServiceType List<Integer> availableServices,
+ @Nullable CellIdentity cellIdentity) {
mDomain = domain;
mTransportType = transportType;
- mRegState = regState;
- mRoamingType = (regState == REG_STATE_ROAMING)
+ mRegistrationState = registrationState;
+ mRoamingType = (registrationState == REGISTRATION_STATE_ROAMING)
? ServiceState.ROAMING_TYPE_UNKNOWN : ServiceState.ROAMING_TYPE_NOT_ROAMING;
mAccessNetworkTechnology = accessNetworkTechnology;
mRejectCause = rejectCause;
- mAvailableServices = availableServices;
+ mAvailableServices = (availableServices != null)
+ ? new ArrayList<>(availableServices) : new ArrayList<>();
mCellIdentity = cellIdentity;
mEmergencyOnly = emergencyOnly;
- mNrStatus = NR_STATUS_NONE;
+ mNrState = NR_STATE_NONE;
}
/**
- * Constructor for voice network registration states.
+ * Constructor for voice network registration info.
* @hide
*/
- public NetworkRegistrationState(int domain, @TransportType int transportType, int regState,
- int accessNetworkTechnology, int rejectCause, boolean emergencyOnly,
- int[] availableServices, @Nullable CellIdentity cellIdentity, boolean cssSupported,
- int roamingIndicator, int systemIsInPrl, int defaultRoamingIndicator) {
- this(domain, transportType, regState, accessNetworkTechnology, rejectCause, emergencyOnly,
- availableServices, cellIdentity);
+ public NetworkRegistrationInfo(int domain, @TransportType int transportType,
+ int registrationState, int accessNetworkTechnology,
+ int rejectCause, boolean emergencyOnly,
+ @Nullable List<Integer> availableServices,
+ @Nullable CellIdentity cellIdentity, boolean cssSupported,
+ int roamingIndicator, int systemIsInPrl,
+ int defaultRoamingIndicator) {
+ this(domain, transportType, registrationState, accessNetworkTechnology, rejectCause,
+ emergencyOnly, availableServices, cellIdentity);
mVoiceSpecificStates = new VoiceSpecificRegistrationStates(cssSupported, roamingIndicator,
systemIsInPrl, defaultRoamingIndicator);
}
/**
- * Constructor for data network registration states.
+ * Constructor for data network registration info.
* @hide
*/
- public NetworkRegistrationState(int domain, @TransportType int transportType, int regState,
- int accessNetworkTechnology, int rejectCause, boolean emergencyOnly,
- int[] availableServices, @Nullable CellIdentity cellIdentity, int maxDataCalls,
- boolean isDcNrRestricted, boolean isNrAvailable, boolean isEndcAvailable,
- LteVopsSupportInfo lteVopsSupportInfo) {
- this(domain, transportType, regState, accessNetworkTechnology, rejectCause, emergencyOnly,
- availableServices, cellIdentity);
+ public NetworkRegistrationInfo(int domain, @TransportType int transportType,
+ int registrationState, int accessNetworkTechnology,
+ int rejectCause, boolean emergencyOnly,
+ @Nullable List<Integer> availableServices,
+ @Nullable CellIdentity cellIdentity, int maxDataCalls,
+ boolean isDcNrRestricted, boolean isNrAvailable,
+ boolean isEndcAvailable,
+ LteVopsSupportInfo lteVopsSupportInfo) {
+ this(domain, transportType, registrationState, accessNetworkTechnology, rejectCause,
+ emergencyOnly, availableServices, cellIdentity);
mDataSpecificStates = new DataSpecificRegistrationStates(
maxDataCalls, isDcNrRestricted, isNrAvailable, isEndcAvailable, lteVopsSupportInfo);
- updateNrStatus(mDataSpecificStates);
+ updateNrState(mDataSpecificStates);
}
- private NetworkRegistrationState(Parcel source) {
+ private NetworkRegistrationInfo(Parcel source) {
mDomain = source.readInt();
mTransportType = source.readInt();
- mRegState = source.readInt();
+ mRegistrationState = source.readInt();
mRoamingType = source.readInt();
mAccessNetworkTechnology = source.readInt();
mRejectCause = source.readInt();
mEmergencyOnly = source.readBoolean();
- mAvailableServices = source.createIntArray();
+ mAvailableServices = new ArrayList<>();
+ source.readList(mAvailableServices, Integer.class.getClassLoader());
mCellIdentity = source.readParcelable(CellIdentity.class.getClassLoader());
mVoiceSpecificStates = source.readParcelable(
VoiceSpecificRegistrationStates.class.getClassLoader());
mDataSpecificStates = source.readParcelable(
DataSpecificRegistrationStates.class.getClassLoader());
- mNrStatus = source.readInt();
+ mNrState = source.readInt();
}
/**
* @return The transport type.
*/
- public int getTransportType() { return mTransportType; }
+ public @TransportType int getTransportType() { return mTransportType; }
/**
* @return The network domain.
@@ -263,23 +287,23 @@
public @Domain int getDomain() { return mDomain; }
/**
- * @return the 5G NR connection status.
+ * @return the 5G NR connection state.
* @hide
*/
- public @NRStatus int getNrStatus() {
- return mNrStatus;
+ public @NRState int getNrState() {
+ return mNrState;
}
/** @hide */
- public void setNrStatus(@NRStatus int nrStatus) {
- mNrStatus = nrStatus;
+ public void setNrState(@NRState int nrState) {
+ mNrState = nrState;
}
/**
* @return The registration state.
*/
- public @RegState int getRegState() {
- return mRegState;
+ public @RegistrationState int getRegistrationState() {
+ return mRegistrationState;
}
/**
@@ -294,7 +318,8 @@
* @return {@code true} if in service.
*/
public boolean isInService() {
- return mRegState == REG_STATE_HOME || mRegState == REG_STATE_ROAMING;
+ return mRegistrationState == REGISTRATION_STATE_HOME
+ || mRegistrationState == REGISTRATION_STATE_ROAMING;
}
/**
@@ -324,7 +349,9 @@
*/
@NonNull
@ServiceType
- public int[] getAvailableServices() { return mAvailableServices; }
+ public List<Integer> getAvailableServices() {
+ return Collections.unmodifiableList(mAvailableServices);
+ }
/**
* @return The access network technology {@link NetworkType}.
@@ -342,7 +369,7 @@
}
/**
- * @return Reason for denial if the registration state is {@link #REG_STATE_DENIED}.
+ * @return Reason for denial if the registration state is {@link #REGISTRATION_STATE_DENIED}.
* Depending on {@code accessNetworkTechnology}, the values are defined in 3GPP TS 24.008
* 10.5.3.6 for UMTS, 3GPP TS 24.301 9.9.3.9 for LTE, and 3GPP2 A.S0001 6.2.2.44 for CDMA
*/
@@ -403,28 +430,28 @@
*
* @hide
*
- * @param regState The registration state
+ * @param registrationState The registration state
* @return The reg state in string
*/
- public static String regStateToString(@RegState int regState) {
- switch (regState) {
- case REG_STATE_NOT_REG_NOT_SEARCHING: return "NOT_REG_NOT_SEARCHING";
- case REG_STATE_HOME: return "HOME";
- case REG_STATE_NOT_REG_SEARCHING: return "NOT_REG_SEARCHING";
- case REG_STATE_DENIED: return "DENIED";
- case REG_STATE_UNKNOWN: return "UNKNOWN";
- case REG_STATE_ROAMING: return "ROAMING";
+ public static String registrationStateToString(@RegistrationState int registrationState) {
+ switch (registrationState) {
+ case REGISTRATION_STATE_NOT_REGISTERED_OR_SEARCHING: return "NOT_REG_OR_SEARCHING";
+ case REGISTRATION_STATE_HOME: return "HOME";
+ case REGISTRATION_STATE_NOT_REGISTERED_SEARCHING: return "NOT_REG_SEARCHING";
+ case REGISTRATION_STATE_DENIED: return "DENIED";
+ case REGISTRATION_STATE_UNKNOWN: return "UNKNOWN";
+ case REGISTRATION_STATE_ROAMING: return "ROAMING";
}
- return "Unknown reg state " + regState;
+ return "Unknown reg state " + registrationState;
}
- private static String nrStatusToString(@NRStatus int nrStatus) {
- switch (nrStatus) {
- case NR_STATUS_RESTRICTED:
+ private static String nrStateToString(@NRState int nrState) {
+ switch (nrState) {
+ case NR_STATE_RESTRICTED:
return "RESTRICTED";
- case NR_STATUS_NOT_RESTRICTED:
+ case NR_STATE_NOT_RESTRICTED:
return "NOT_RESTRICTED";
- case NR_STATUS_CONNECTED:
+ case NR_STATE_CONNECTED:
return "CONNECTED";
default:
return "NONE";
@@ -433,76 +460,75 @@
@Override
public String toString() {
- return new StringBuilder("NetworkRegistrationState{")
+ return new StringBuilder("NetworkRegistrationInfo{")
.append(" domain=").append((mDomain == DOMAIN_CS) ? "CS" : "PS")
.append(" transportType=").append(
AccessNetworkConstants.transportTypeToString(mTransportType))
- .append(" regState=").append(regStateToString(mRegState))
+ .append(" registrationState=").append(registrationStateToString(mRegistrationState))
.append(" roamingType=").append(ServiceState.roamingTypeToString(mRoamingType))
.append(" accessNetworkTechnology=")
.append(TelephonyManager.getNetworkTypeName(mAccessNetworkTechnology))
.append(" rejectCause=").append(mRejectCause)
.append(" emergencyEnabled=").append(mEmergencyOnly)
.append(" availableServices=").append("[" + (mAvailableServices != null
- ? Arrays.stream(mAvailableServices)
- .mapToObj(type -> serviceTypeToString(type))
+ ? mAvailableServices.stream().map(type -> serviceTypeToString(type))
.collect(Collectors.joining(",")) : null) + "]")
.append(" cellIdentity=").append(mCellIdentity)
.append(" voiceSpecificStates=").append(mVoiceSpecificStates)
.append(" dataSpecificStates=").append(mDataSpecificStates)
- .append(" nrStatus=").append(nrStatusToString(mNrStatus))
+ .append(" nrState=").append(nrStateToString(mNrState))
.append("}").toString();
}
@Override
public int hashCode() {
- return Objects.hash(mDomain, mTransportType, mRegState, mRoamingType,
+ return Objects.hash(mDomain, mTransportType, mRegistrationState, mRoamingType,
mAccessNetworkTechnology, mRejectCause, mEmergencyOnly, mAvailableServices,
- mCellIdentity, mVoiceSpecificStates, mDataSpecificStates, mNrStatus);
+ mCellIdentity, mVoiceSpecificStates, mDataSpecificStates, mNrState);
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
- if (!(o instanceof NetworkRegistrationState)) {
+ if (!(o instanceof NetworkRegistrationInfo)) {
return false;
}
- NetworkRegistrationState other = (NetworkRegistrationState) o;
+ NetworkRegistrationInfo other = (NetworkRegistrationInfo) o;
return mDomain == other.mDomain
&& mTransportType == other.mTransportType
- && mRegState == other.mRegState
+ && mRegistrationState == other.mRegistrationState
&& mRoamingType == other.mRoamingType
&& mAccessNetworkTechnology == other.mAccessNetworkTechnology
&& mRejectCause == other.mRejectCause
&& mEmergencyOnly == other.mEmergencyOnly
- && Arrays.equals(mAvailableServices, other.mAvailableServices)
+ && mAvailableServices.equals(other.mAvailableServices)
&& Objects.equals(mCellIdentity, other.mCellIdentity)
&& Objects.equals(mVoiceSpecificStates, other.mVoiceSpecificStates)
&& Objects.equals(mDataSpecificStates, other.mDataSpecificStates)
- && mNrStatus == other.mNrStatus;
+ && mNrState == other.mNrState;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeInt(mDomain);
dest.writeInt(mTransportType);
- dest.writeInt(mRegState);
+ dest.writeInt(mRegistrationState);
dest.writeInt(mRoamingType);
dest.writeInt(mAccessNetworkTechnology);
dest.writeInt(mRejectCause);
dest.writeBoolean(mEmergencyOnly);
- dest.writeIntArray(mAvailableServices);
+ dest.writeList(mAvailableServices);
dest.writeParcelable(mCellIdentity, 0);
dest.writeParcelable(mVoiceSpecificStates, 0);
dest.writeParcelable(mDataSpecificStates, 0);
- dest.writeInt(mNrStatus);
+ dest.writeInt(mNrState);
}
/**
* Use the 5G NR Non-Standalone indicators from the network registration state to update the
- * NR status. There are 3 indicators in the network registration state:
+ * NR state. There are 3 indicators in the network registration state:
*
* 1. if E-UTRA-NR Dual Connectivity (EN-DC) is supported by the primary serving cell.
* 2. if NR is supported by the selected PLMN.
@@ -517,90 +543,81 @@
*
* @param state data specific registration state contains the 5G NR indicators.
*/
- private void updateNrStatus(DataSpecificRegistrationStates state) {
- mNrStatus = NR_STATUS_NONE;
+ private void updateNrState(DataSpecificRegistrationStates state) {
+ mNrState = NR_STATE_NONE;
if (state.isEnDcAvailable) {
if (!state.isDcNrRestricted && state.isNrAvailable) {
- mNrStatus = NR_STATUS_NOT_RESTRICTED;
+ mNrState = NR_STATE_NOT_RESTRICTED;
} else {
- mNrStatus = NR_STATUS_RESTRICTED;
+ mNrState = NR_STATE_RESTRICTED;
}
}
}
- public static final Parcelable.Creator<NetworkRegistrationState> CREATOR =
- new Parcelable.Creator<NetworkRegistrationState>() {
- @Override
- public NetworkRegistrationState createFromParcel(Parcel source) {
- return new NetworkRegistrationState(source);
- }
+ public static final @NonNull Parcelable.Creator<NetworkRegistrationInfo> CREATOR =
+ new Parcelable.Creator<NetworkRegistrationInfo>() {
+ @Override
+ public NetworkRegistrationInfo createFromParcel(Parcel source) {
+ return new NetworkRegistrationInfo(source);
+ }
- @Override
- public NetworkRegistrationState[] newArray(int size) {
- return new NetworkRegistrationState[size];
- }
- };
+ @Override
+ public NetworkRegistrationInfo[] newArray(int size) {
+ return new NetworkRegistrationInfo[size];
+ }
+ };
/**
* @hide
*/
- public NetworkRegistrationState sanitizeLocationInfo() {
- NetworkRegistrationState result = copy();
+ public NetworkRegistrationInfo sanitizeLocationInfo() {
+ NetworkRegistrationInfo result = copy();
result.mCellIdentity = null;
return result;
}
- private NetworkRegistrationState copy() {
+ private NetworkRegistrationInfo copy() {
Parcel p = Parcel.obtain();
this.writeToParcel(p, 0);
p.setDataPosition(0);
- NetworkRegistrationState result = new NetworkRegistrationState(p);
+ NetworkRegistrationInfo result = new NetworkRegistrationInfo(p);
p.recycle();
return result;
}
/**
- * Provides a convenient way to set the fields of a {@link NetworkRegistrationState} when
+ * Provides a convenient way to set the fields of a {@link NetworkRegistrationInfo} when
* creating a new instance.
*
- * <p>The example below shows how you might create a new {@code NetworkRegistrationState}:
+ * <p>The example below shows how you might create a new {@code NetworkRegistrationInfo}:
*
* <pre><code>
*
- * NetworkRegistrationState nrs = new NetworkRegistrationState.Builder()
- * .setApnTypeBitmask(ApnSetting.TYPE_DEFAULT | ApnSetting.TYPE_MMS)
- * .setApnName("apn.example.com")
- * .setEntryName("Example Carrier APN")
- * .setMmsc(Uri.parse("http://mms.example.com:8002"))
- * .setMmsProxyAddress(mmsProxy)
- * .setMmsProxyPort(8799)
+ * NetworkRegistrationInfo nri = new NetworkRegistrationInfo.Builder()
+ * .setAccessNetworkTechnology(TelephonyManager.NETWORK_TYPE_LTE)
+ * .setRegistrationState(REGISTRATION_STATE_HOME)
* .build();
* </code></pre>
*/
- public static class Builder{
+ public static final class Builder{
@Domain
private int mDomain;
+ @TransportType
private int mTransportType;
- @RegState
- private int mRegState;
-
- @ServiceState.RoamingType
- private int mRoamingType;
+ @RegistrationState
+ private int mRegistrationState;
@NetworkType
private int mAccessNetworkTechnology;
- @NRStatus
- private int mNrStatus;
-
private int mRejectCause;
private boolean mEmergencyOnly;
@ServiceType
- private int[] mAvailableServices;
+ private List<Integer> mAvailableServices;
@Nullable
private CellIdentity mCellIdentity;
@@ -637,24 +654,12 @@
/**
* Set the registration state.
*
- * @param regState The registration state.
+ * @param registrationState The registration state.
*
* @return The same instance of the builder.
*/
- public @NonNull Builder setRegState(@RegState int regState) {
- mRegState = regState;
- return this;
- }
-
- /**
- * Set the roaming type.
- *
- * @param roamingType Roaming type.
- *
- * @return The same instance of the builder.
- */
- public @NonNull Builder setRoamingType(@ServiceState.RoamingType int roamingType) {
- mRoamingType = roamingType;
+ public @NonNull Builder setRegistrationState(@RegistrationState int registrationState) {
+ mRegistrationState = registrationState;
return this;
}
@@ -672,24 +677,13 @@
}
/**
- * Set the 5G NR connection status.
- *
- * @param nrStatus 5G NR connection status.
- *
- * @return The same instance of the builder.
- */
- public @NonNull Builder setNrStatus(@NRStatus int nrStatus) {
- mNrStatus = nrStatus;
- return this;
- }
-
- /**
* Set the network reject cause.
*
* @param rejectCause Reason for denial if the registration state is
- * {@link #REG_STATE_DENIED}.Depending on {@code accessNetworkTechnology}, the values are
- * defined in 3GPP TS 24.008 10.5.3.6 for UMTS, 3GPP TS 24.301 9.9.3.9 for LTE, and 3GPP2
- * A.S0001 6.2.2.44 for CDMA. If the reject cause is not supported or unknown, set it to 0.
+ * {@link #REGISTRATION_STATE_DENIED}.Depending on {@code accessNetworkTechnology}, the
+ * values are defined in 3GPP TS 24.008 10.5.3.6 for UMTS, 3GPP TS 24.301 9.9.3.9 for LTE,
+ * and 3GPP2 A.S0001 6.2.2.44 for CDMA. If the reject cause is not supported or unknown, set
+ * it to 0.
*
* @return The same instance of the builder.
*/
@@ -718,7 +712,7 @@
* @return The same instance of the builder.
*/
public @NonNull Builder setAvailableServices(
- @NonNull @ServiceType int[] availableServices) {
+ @NonNull @ServiceType List<Integer> availableServices) {
mAvailableServices = availableServices;
return this;
}
@@ -736,12 +730,12 @@
}
/**
- * Build the NetworkRegistrationState.
+ * Build the NetworkRegistrationInfo.
*
- * @return the NetworkRegistrationState object.
+ * @return the NetworkRegistrationInfo object.
*/
- public @NonNull NetworkRegistrationState build() {
- return new NetworkRegistrationState(mDomain, mTransportType, mRegState,
+ public @NonNull NetworkRegistrationInfo build() {
+ return new NetworkRegistrationInfo(mDomain, mTransportType, mRegistrationState,
mAccessNetworkTechnology, mRejectCause, mEmergencyOnly, mAvailableServices,
mCellIdentity);
}
diff --git a/telephony/java/android/telephony/NetworkService.java b/telephony/java/android/telephony/NetworkService.java
index f1240e9..8c5e107 100644
--- a/telephony/java/android/telephony/NetworkService.java
+++ b/telephony/java/android/telephony/NetworkService.java
@@ -18,6 +18,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.SdkConstant;
import android.annotation.SystemApi;
import android.app.Service;
import android.content.Intent;
@@ -27,7 +28,7 @@
import android.os.Looper;
import android.os.Message;
import android.os.RemoteException;
-import android.telephony.NetworkRegistrationState.Domain;
+import android.telephony.NetworkRegistrationInfo.Domain;
import android.util.SparseArray;
import com.android.internal.annotations.VisibleForTesting;
@@ -54,15 +55,16 @@
private final String TAG = NetworkService.class.getSimpleName();
- public static final String NETWORK_SERVICE_INTERFACE = "android.telephony.NetworkService";
+ @SdkConstant(SdkConstant.SdkConstantType.SERVICE_ACTION)
+ public static final String SERVICE_INTERFACE = "android.telephony.NetworkService";
private static final int NETWORK_SERVICE_CREATE_NETWORK_SERVICE_PROVIDER = 1;
private static final int NETWORK_SERVICE_REMOVE_NETWORK_SERVICE_PROVIDER = 2;
private static final int NETWORK_SERVICE_REMOVE_ALL_NETWORK_SERVICE_PROVIDERS = 3;
- private static final int NETWORK_SERVICE_GET_REGISTRATION_STATE = 4;
- private static final int NETWORK_SERVICE_REGISTER_FOR_STATE_CHANGE = 5;
- private static final int NETWORK_SERVICE_UNREGISTER_FOR_STATE_CHANGE = 6;
- private static final int NETWORK_SERVICE_INDICATION_NETWORK_STATE_CHANGED = 7;
+ private static final int NETWORK_SERVICE_GET_REGISTRATION_INFO = 4;
+ private static final int NETWORK_SERVICE_REGISTER_FOR_INFO_CHANGE = 5;
+ private static final int NETWORK_SERVICE_UNREGISTER_FOR_INFO_CHANGE = 6;
+ private static final int NETWORK_SERVICE_INDICATION_NETWORK_INFO_CHANGED = 7;
private final HandlerThread mHandlerThread;
@@ -86,7 +88,7 @@
private final int mSlotIndex;
private final List<INetworkServiceCallback>
- mNetworkRegistrationStateChangedCallbacks = new ArrayList<>();
+ mNetworkRegistrationInfoChangedCallbacks = new ArrayList<>();
/**
* Constructor
@@ -104,38 +106,39 @@
}
/**
- * API to get network registration state. The result will be passed to the callback.
+ * Request network registration info. The result will be passed to the callback.
+ *
* @param domain Network domain
- * @param callback The callback for reporting network registration state
+ * @param callback The callback for reporting network registration info
*/
- public void getNetworkRegistrationState(@Domain int domain,
- @NonNull NetworkServiceCallback callback) {
- callback.onGetNetworkRegistrationStateComplete(
+ public void requestNetworkRegistrationInfo(@Domain int domain,
+ @NonNull NetworkServiceCallback callback) {
+ callback.onRequestNetworkRegistrationInfoComplete(
NetworkServiceCallback.RESULT_ERROR_UNSUPPORTED, null);
}
/**
- * Notify the system that network registration state is changed.
+ * Notify the system that network registration info is changed.
*/
- public final void notifyNetworkRegistrationStateChanged() {
- mHandler.obtainMessage(NETWORK_SERVICE_INDICATION_NETWORK_STATE_CHANGED,
+ public final void notifyNetworkRegistrationInfoChanged() {
+ mHandler.obtainMessage(NETWORK_SERVICE_INDICATION_NETWORK_INFO_CHANGED,
mSlotIndex, 0, null).sendToTarget();
}
- private void registerForStateChanged(@NonNull INetworkServiceCallback callback) {
- synchronized (mNetworkRegistrationStateChangedCallbacks) {
- mNetworkRegistrationStateChangedCallbacks.add(callback);
+ private void registerForInfoChanged(@NonNull INetworkServiceCallback callback) {
+ synchronized (mNetworkRegistrationInfoChangedCallbacks) {
+ mNetworkRegistrationInfoChangedCallbacks.add(callback);
}
}
- private void unregisterForStateChanged(@NonNull INetworkServiceCallback callback) {
- synchronized (mNetworkRegistrationStateChangedCallbacks) {
- mNetworkRegistrationStateChangedCallbacks.remove(callback);
+ private void unregisterForInfoChanged(@NonNull INetworkServiceCallback callback) {
+ synchronized (mNetworkRegistrationInfoChangedCallbacks) {
+ mNetworkRegistrationInfoChangedCallbacks.remove(callback);
}
}
- private void notifyStateChangedToCallbacks() {
- for (INetworkServiceCallback callback : mNetworkRegistrationStateChangedCallbacks) {
+ private void notifyInfoChangedToCallbacks() {
+ for (INetworkServiceCallback callback : mNetworkRegistrationInfoChangedCallbacks) {
try {
callback.onNetworkStateChanged();
} catch (RemoteException exception) {
@@ -189,24 +192,24 @@
}
mServiceMap.clear();
break;
- case NETWORK_SERVICE_GET_REGISTRATION_STATE:
+ case NETWORK_SERVICE_GET_REGISTRATION_INFO:
if (serviceProvider == null) break;
int domainId = message.arg2;
- serviceProvider.getNetworkRegistrationState(domainId,
+ serviceProvider.requestNetworkRegistrationInfo(domainId,
new NetworkServiceCallback(callback));
break;
- case NETWORK_SERVICE_REGISTER_FOR_STATE_CHANGE:
+ case NETWORK_SERVICE_REGISTER_FOR_INFO_CHANGE:
if (serviceProvider == null) break;
- serviceProvider.registerForStateChanged(callback);
+ serviceProvider.registerForInfoChanged(callback);
break;
- case NETWORK_SERVICE_UNREGISTER_FOR_STATE_CHANGE:
+ case NETWORK_SERVICE_UNREGISTER_FOR_INFO_CHANGE:
if (serviceProvider == null) break;
- serviceProvider.unregisterForStateChanged(callback);
+ serviceProvider.unregisterForInfoChanged(callback);
break;
- case NETWORK_SERVICE_INDICATION_NETWORK_STATE_CHANGED:
+ case NETWORK_SERVICE_INDICATION_NETWORK_INFO_CHANGED:
if (serviceProvider == null) break;
- serviceProvider.notifyStateChangedToCallbacks();
+ serviceProvider.notifyInfoChangedToCallbacks();
break;
default:
break;
@@ -231,14 +234,15 @@
* will call this method after binding the network service for each active SIM slot id.
*
* @param slotIndex SIM slot id the network service associated with.
- * @return Network service object
+ * @return Network service object. Null if failed to create the provider (e.g. invalid slot
+ * index)
*/
@Nullable
public abstract NetworkServiceProvider onCreateNetworkServiceProvider(int slotIndex);
@Override
public IBinder onBind(Intent intent) {
- if (intent == null || !NETWORK_SERVICE_INTERFACE.equals(intent.getAction())) {
+ if (intent == null || !SERVICE_INTERFACE.equals(intent.getAction())) {
loge("Unexpected intent " + intent);
return null;
}
@@ -280,23 +284,23 @@
}
@Override
- public void getNetworkRegistrationState(
- int slotIndex, int domain, INetworkServiceCallback callback) {
- mHandler.obtainMessage(NETWORK_SERVICE_GET_REGISTRATION_STATE, slotIndex,
+ public void requestNetworkRegistrationInfo(int slotIndex, int domain,
+ INetworkServiceCallback callback) {
+ mHandler.obtainMessage(NETWORK_SERVICE_GET_REGISTRATION_INFO, slotIndex,
domain, callback).sendToTarget();
}
@Override
- public void registerForNetworkRegistrationStateChanged(
+ public void registerForNetworkRegistrationInfoChanged(
int slotIndex, INetworkServiceCallback callback) {
- mHandler.obtainMessage(NETWORK_SERVICE_REGISTER_FOR_STATE_CHANGE, slotIndex,
+ mHandler.obtainMessage(NETWORK_SERVICE_REGISTER_FOR_INFO_CHANGE, slotIndex,
0, callback).sendToTarget();
}
@Override
- public void unregisterForNetworkRegistrationStateChanged(
+ public void unregisterForNetworkRegistrationInfoChanged(
int slotIndex, INetworkServiceCallback callback) {
- mHandler.obtainMessage(NETWORK_SERVICE_UNREGISTER_FOR_STATE_CHANGE, slotIndex,
+ mHandler.obtainMessage(NETWORK_SERVICE_UNREGISTER_FOR_INFO_CHANGE, slotIndex,
0, callback).sendToTarget();
}
}
diff --git a/telephony/java/android/telephony/NetworkServiceCallback.java b/telephony/java/android/telephony/NetworkServiceCallback.java
index c2fcfb7..1c64bcd 100644
--- a/telephony/java/android/telephony/NetworkServiceCallback.java
+++ b/telephony/java/android/telephony/NetworkServiceCallback.java
@@ -28,9 +28,9 @@
/**
* Network service callback. Object of this class is passed to NetworkServiceProvider upon
- * calling getNetworkRegistrationState, to receive asynchronous feedback from NetworkServiceProvider
- * upon onGetNetworkRegistrationStateComplete. It's like a wrapper of INetworkServiceCallback
- * because INetworkServiceCallback can't be a parameter type in public APIs.
+ * calling requestNetworkRegistrationInfo, to receive asynchronous feedback from
+ * NetworkServiceProvider upon onRequestNetworkRegistrationInfoComplete. It's like a wrapper of
+ * INetworkServiceCallback because INetworkServiceCallback can't be a parameter type in public APIs.
*
* @hide
*/
@@ -70,20 +70,20 @@
/**
* Called to indicate result of
- * {@link NetworkServiceProvider#getNetworkRegistrationState(int, NetworkServiceCallback)}
+ * {@link NetworkServiceProvider#requestNetworkRegistrationInfo(int, NetworkServiceCallback)}
*
* @param result Result status like {@link NetworkServiceCallback#RESULT_SUCCESS} or
- * {@link NetworkServiceCallback#RESULT_ERROR_UNSUPPORTED}
+ * {@link NetworkServiceCallback#RESULT_ERROR_UNSUPPORTED}
* @param state The state information to be returned to callback.
*/
- public void onGetNetworkRegistrationStateComplete(int result,
- @Nullable NetworkRegistrationState state) {
+ public void onRequestNetworkRegistrationInfoComplete(int result,
+ @Nullable NetworkRegistrationInfo state) {
INetworkServiceCallback callback = mCallback.get();
if (callback != null) {
try {
- callback.onGetNetworkRegistrationStateComplete(result, state);
+ callback.onRequestNetworkRegistrationInfoComplete(result, state);
} catch (RemoteException e) {
- Rlog.e(mTag, "Failed to onGetNetworkRegistrationStateComplete on the remote");
+ Rlog.e(mTag, "Failed to onRequestNetworkRegistrationInfoComplete on the remote");
}
} else {
Rlog.e(mTag, "Weak reference of callback is null.");
diff --git a/telephony/java/android/telephony/PhoneNumberUtils.java b/telephony/java/android/telephony/PhoneNumberUtils.java
index 4dcb410..549c044 100644
--- a/telephony/java/android/telephony/PhoneNumberUtils.java
+++ b/telephony/java/android/telephony/PhoneNumberUtils.java
@@ -25,12 +25,11 @@
import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.Intent;
-import android.content.res.Resources;
import android.database.Cursor;
import android.location.CountryDetector;
import android.net.Uri;
-import android.os.SystemProperties;
import android.os.PersistableBundle;
+import android.os.SystemProperties;
import android.provider.Contacts;
import android.provider.ContactsContract;
import android.telecom.PhoneAccount;
@@ -1738,7 +1737,7 @@
* @return true if the number is in the list of emergency numbers
* listed in the RIL / SIM, otherwise return false.
*
- * @deprecated Please use {@link TelephonyManager#isCurrentEmergencyNumber(String)} instead.
+ * @deprecated Please use {@link TelephonyManager#isEmergencyNumber(String)} instead.
*/
@Deprecated
public static boolean isEmergencyNumber(String number) {
@@ -1754,7 +1753,7 @@
* @return true if the number is in the list of emergency numbers
* listed in the RIL / SIM, otherwise return false.
*
- * @deprecated Please use {@link TelephonyManager#isCurrentEmergencyNumber(String)}
+ * @deprecated Please use {@link TelephonyManager#isEmergencyNumber(String)}
* instead.
*
* @hide
@@ -1785,7 +1784,7 @@
* listed in the RIL / SIM, *or* if the number starts with the
* same digits as any of those emergency numbers.
*
- * @deprecated Please use {@link TelephonyManager#isCurrentPotentialEmergencyNumber(String)}
+ * @deprecated Please use {@link TelephonyManager#isPotentialEmergencyNumber(String)}
* instead.
*
* @hide
@@ -1814,7 +1813,7 @@
* listed in the RIL / SIM, *or* if the number starts with the
* same digits as any of those emergency numbers.
*
- * @deprecated Please use {@link TelephonyManager#isCurrentPotentialEmergencyNumber(String)}
+ * @deprecated Please use {@link TelephonyManager#isPotentialEmergencyNumber(String)}
* instead.
*
* @hide
@@ -1883,7 +1882,7 @@
* @return if the number is an emergency number for the specific country, then return true,
* otherwise false
*
- * @deprecated Please use {@link TelephonyManager#isCurrentEmergencyNumber(String)}
+ * @deprecated Please use {@link TelephonyManager#isEmergencyNumber(String)}
* instead.
*
* @hide
@@ -1903,7 +1902,7 @@
* @return if the number is an emergency number for the specific country, then return true,
* otherwise false
*
- * @deprecated Please use {@link TelephonyManager#isCurrentEmergencyNumber(String)}
+ * @deprecated Please use {@link TelephonyManager#isEmergencyNumber(String)}
* instead.
*
* @hide
@@ -1934,7 +1933,7 @@
* country, *or* if the number starts with the same digits as
* any of those emergency numbers.
*
- * @deprecated Please use {@link TelephonyManager#isCurrentPotentialEmergencyNumber(String)}
+ * @deprecated Please use {@link TelephonyManager#isPotentialEmergencyNumber(String)}
* instead.
*
* @hide
@@ -1964,7 +1963,7 @@
* country, *or* if the number starts with the same digits as
* any of those emergency numbers.
*
- * @deprecated Please use {@link TelephonyManager#isCurrentPotentialEmergencyNumber(String)}
+ * @deprecated Please use {@link TelephonyManager#isPotentialEmergencyNumber(String)}
* instead.
*
* @hide
@@ -2017,7 +2016,7 @@
private static boolean isEmergencyNumberInternal(int subId, String number,
String defaultCountryIso,
boolean useExactMatch) {
- return TelephonyManager.getDefault().isCurrentEmergencyNumber(number);
+ return TelephonyManager.getDefault().isEmergencyNumber(number);
}
/**
@@ -2028,7 +2027,7 @@
* @return true if the specified number is an emergency number for the country the user
* is currently in.
*
- * @deprecated Please use {@link TelephonyManager#isCurrentEmergencyNumber(String)}
+ * @deprecated Please use {@link TelephonyManager#isEmergencyNumber(String)}
* instead.
*/
@Deprecated
@@ -2045,7 +2044,7 @@
* @return true if the specified number is an emergency number for the country the user
* is currently in.
*
- * @deprecated Please use {@link TelephonyManager#isCurrentEmergencyNumber(String)}
+ * @deprecated Please use {@link TelephonyManager#isEmergencyNumber(String)}
* instead.
*
* @hide
@@ -2079,7 +2078,7 @@
*
* @see android.location.CountryDetector
*
- * @deprecated Please use {@link TelephonyManager#isCurrentPotentialEmergencyNumber(String)}
+ * @deprecated Please use {@link TelephonyManager#isPotentialEmergencyNumber(String)}
* instead.
*
* @hide
@@ -2110,7 +2109,7 @@
* @return true if the specified number is an emergency number for a local country, based on the
* CountryDetector.
*
- * @deprecated Please use {@link TelephonyManager#isCurrentPotentialEmergencyNumber(String)}
+ * @deprecated Please use {@link TelephonyManager#isPotentialEmergencyNumber(String)}
* instead.
*
* @hide
diff --git a/telephony/java/android/telephony/ServiceState.java b/telephony/java/android/telephony/ServiceState.java
index 4b15aac..a500eba 100644
--- a/telephony/java/android/telephony/ServiceState.java
+++ b/telephony/java/android/telephony/ServiceState.java
@@ -29,8 +29,8 @@
import android.os.Parcelable;
import android.telephony.AccessNetworkConstants.AccessNetworkType;
import android.telephony.AccessNetworkConstants.TransportType;
-import android.telephony.NetworkRegistrationState.Domain;
-import android.telephony.NetworkRegistrationState.NRStatus;
+import android.telephony.NetworkRegistrationInfo.Domain;
+import android.telephony.NetworkRegistrationInfo.NRState;
import android.text.TextUtils;
import java.lang.annotation.Retention;
@@ -53,6 +53,9 @@
* <li>Operator name, short name and numeric id
* <li>Network selection mode
* </ul>
+ *
+ * For historical reasons this class is not declared as final; however,
+ * it should be treated as though it were final.
*/
public class ServiceState implements Parcelable {
@@ -349,7 +352,7 @@
* Reference: 3GPP TS 36.104 5.4.3 */
private int mLteEarfcnRsrpBoost = 0;
- private List<NetworkRegistrationState> mNetworkRegistrationStates = new ArrayList<>();
+ private List<NetworkRegistrationInfo> mNetworkRegistrationInfos = new ArrayList<>();
/**
* get String description of roaming type
@@ -432,8 +435,8 @@
mCellBandwidths = s.mCellBandwidths == null ? null :
Arrays.copyOf(s.mCellBandwidths, s.mCellBandwidths.length);
mLteEarfcnRsrpBoost = s.mLteEarfcnRsrpBoost;
- mNetworkRegistrationStates = s.mNetworkRegistrationStates == null ? null :
- new ArrayList<>(s.mNetworkRegistrationStates);
+ mNetworkRegistrationInfos = s.mNetworkRegistrationInfos == null ? null :
+ new ArrayList<>(s.mNetworkRegistrationInfos);
mNrFrequencyRange = s.mNrFrequencyRange;
}
@@ -466,8 +469,8 @@
mIsEmergencyOnly = in.readInt() != 0;
mIsUsingCarrierAggregation = in.readInt() != 0;
mLteEarfcnRsrpBoost = in.readInt();
- mNetworkRegistrationStates = new ArrayList<>();
- in.readList(mNetworkRegistrationStates, NetworkRegistrationState.class.getClassLoader());
+ mNetworkRegistrationInfos = new ArrayList<>();
+ in.readList(mNetworkRegistrationInfos, NetworkRegistrationInfo.class.getClassLoader());
mChannelNumber = in.readInt();
mCellBandwidths = in.createIntArray();
mNrFrequencyRange = in.readInt();
@@ -495,7 +498,7 @@
out.writeInt(mIsEmergencyOnly ? 1 : 0);
out.writeInt(mIsUsingCarrierAggregation ? 1 : 0);
out.writeInt(mLteEarfcnRsrpBoost);
- out.writeList(mNetworkRegistrationStates);
+ out.writeList(mNetworkRegistrationInfos);
out.writeInt(mChannelNumber);
out.writeIntArray(mCellBandwidths);
out.writeInt(mNrFrequencyRange);
@@ -620,8 +623,8 @@
*/
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
public @RoamingType int getVoiceRoamingType() {
- final NetworkRegistrationState regState = getNetworkRegistrationState(
- NetworkRegistrationState.DOMAIN_CS, AccessNetworkConstants.TRANSPORT_TYPE_WWAN);
+ final NetworkRegistrationInfo regState = getNetworkRegistrationInfo(
+ NetworkRegistrationInfo.DOMAIN_CS, AccessNetworkConstants.TRANSPORT_TYPE_WWAN);
if (regState != null) {
return regState.getRoamingType();
}
@@ -644,10 +647,11 @@
* @hide
*/
public boolean getDataRoamingFromRegistration() {
- final NetworkRegistrationState regState = getNetworkRegistrationState(
- NetworkRegistrationState.DOMAIN_PS, AccessNetworkConstants.TRANSPORT_TYPE_WWAN);
+ final NetworkRegistrationInfo regState = getNetworkRegistrationInfo(
+ NetworkRegistrationInfo.DOMAIN_PS, AccessNetworkConstants.TRANSPORT_TYPE_WWAN);
if (regState != null) {
- return (regState.getRegState() == NetworkRegistrationState.REG_STATE_ROAMING);
+ return regState.getRegistrationState()
+ == NetworkRegistrationInfo.REGISTRATION_STATE_ROAMING;
}
return false;
}
@@ -659,8 +663,8 @@
*/
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
public @RoamingType int getDataRoamingType() {
- final NetworkRegistrationState regState = getNetworkRegistrationState(
- NetworkRegistrationState.DOMAIN_PS, AccessNetworkConstants.TRANSPORT_TYPE_WWAN);
+ final NetworkRegistrationInfo regState = getNetworkRegistrationInfo(
+ NetworkRegistrationInfo.DOMAIN_PS, AccessNetworkConstants.TRANSPORT_TYPE_WWAN);
if (regState != null) {
return regState.getRoamingType();
}
@@ -858,7 +862,7 @@
mIsEmergencyOnly,
mIsUsingCarrierAggregation,
mLteEarfcnRsrpBoost,
- mNetworkRegistrationStates,
+ mNetworkRegistrationInfos,
mNrFrequencyRange);
}
@@ -888,9 +892,9 @@
s.mCdmaDefaultRoamingIndicator)
&& mIsEmergencyOnly == s.mIsEmergencyOnly
&& mIsUsingCarrierAggregation == s.mIsUsingCarrierAggregation)
- && (mNetworkRegistrationStates == null ? s.mNetworkRegistrationStates == null :
- s.mNetworkRegistrationStates != null &&
- mNetworkRegistrationStates.containsAll(s.mNetworkRegistrationStates))
+ && (mNetworkRegistrationInfos == null
+ ? s.mNetworkRegistrationInfos == null : s.mNetworkRegistrationInfos != null
+ && mNetworkRegistrationInfos.containsAll(s.mNetworkRegistrationInfos))
&& mNrFrequencyRange == s.mNrFrequencyRange;
}
@@ -1043,7 +1047,7 @@
.append(", mIsEmergencyOnly=").append(mIsEmergencyOnly)
.append(", mIsUsingCarrierAggregation=").append(mIsUsingCarrierAggregation)
.append(", mLteEarfcnRsrpBoost=").append(mLteEarfcnRsrpBoost)
- .append(", mNetworkRegistrationStates=").append(mNetworkRegistrationStates)
+ .append(", mNetworkRegistrationInfos=").append(mNetworkRegistrationInfos)
.append(", mNrFrequencyRange=").append(mNrFrequencyRange)
.append("}").toString();
}
@@ -1073,7 +1077,7 @@
mIsEmergencyOnly = false;
mIsUsingCarrierAggregation = false;
mLteEarfcnRsrpBoost = 0;
- mNetworkRegistrationStates = new ArrayList<>();
+ mNetworkRegistrationInfos = new ArrayList<>();
mNrFrequencyRange = FREQUENCY_RANGE_UNKNOWN;
}
@@ -1130,14 +1134,14 @@
/** @hide */
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023)
public void setVoiceRoamingType(@RoamingType int type) {
- NetworkRegistrationState regState = getNetworkRegistrationState(
- NetworkRegistrationState.DOMAIN_CS, AccessNetworkConstants.TRANSPORT_TYPE_WWAN);
+ NetworkRegistrationInfo regState = getNetworkRegistrationInfo(
+ NetworkRegistrationInfo.DOMAIN_CS, AccessNetworkConstants.TRANSPORT_TYPE_WWAN);
if (regState == null) {
- regState = new NetworkRegistrationState(
- NetworkRegistrationState.DOMAIN_CS, AccessNetworkConstants.TRANSPORT_TYPE_WWAN,
- ServiceState.ROAMING_TYPE_NOT_ROAMING, TelephonyManager.NETWORK_TYPE_UNKNOWN, 0,
- false, null, null);
- addNetworkRegistrationState(regState);
+ regState = new NetworkRegistrationInfo.Builder()
+ .setDomain(NetworkRegistrationInfo.DOMAIN_CS)
+ .setTransportType(AccessNetworkConstants.TRANSPORT_TYPE_WWAN)
+ .build();
+ addNetworkRegistrationInfo(regState);
}
regState.setRoamingType(type);
}
@@ -1151,14 +1155,14 @@
/** @hide */
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023)
public void setDataRoamingType(@RoamingType int type) {
- NetworkRegistrationState regState = getNetworkRegistrationState(
- NetworkRegistrationState.DOMAIN_PS, AccessNetworkConstants.TRANSPORT_TYPE_WWAN);
+ NetworkRegistrationInfo regState = getNetworkRegistrationInfo(
+ NetworkRegistrationInfo.DOMAIN_PS, AccessNetworkConstants.TRANSPORT_TYPE_WWAN);
if (regState == null) {
- regState = new NetworkRegistrationState(
- NetworkRegistrationState.DOMAIN_PS, AccessNetworkConstants.TRANSPORT_TYPE_WWAN,
- ServiceState.ROAMING_TYPE_NOT_ROAMING, TelephonyManager.NETWORK_TYPE_UNKNOWN, 0,
- false, null, null);
- addNetworkRegistrationState(regState);
+ regState = new NetworkRegistrationInfo.Builder()
+ .setDomain(NetworkRegistrationInfo.DOMAIN_PS)
+ .setTransportType(AccessNetworkConstants.TRANSPORT_TYPE_WWAN)
+ .build();
+ addNetworkRegistrationInfo(regState);
}
regState.setRoamingType(type);
}
@@ -1326,14 +1330,14 @@
this.mRilVoiceRadioTechnology = rt;
// sync to network registration state
- NetworkRegistrationState regState = getNetworkRegistrationState(
- NetworkRegistrationState.DOMAIN_CS, AccessNetworkConstants.TRANSPORT_TYPE_WWAN);
+ NetworkRegistrationInfo regState = getNetworkRegistrationInfo(
+ NetworkRegistrationInfo.DOMAIN_CS, AccessNetworkConstants.TRANSPORT_TYPE_WWAN);
if (regState == null) {
- regState = new NetworkRegistrationState(
- NetworkRegistrationState.DOMAIN_CS, AccessNetworkConstants.TRANSPORT_TYPE_WWAN,
- ServiceState.ROAMING_TYPE_NOT_ROAMING, TelephonyManager.NETWORK_TYPE_UNKNOWN,
- 0, false, null, null);
- addNetworkRegistrationState(regState);
+ regState = new NetworkRegistrationInfo.Builder()
+ .setDomain(NetworkRegistrationInfo.DOMAIN_CS)
+ .setTransportType(AccessNetworkConstants.TRANSPORT_TYPE_WWAN)
+ .build();
+ addNetworkRegistrationInfo(regState);
}
regState.setAccessNetworkTechnology(
rilRadioTechnologyToNetworkType(mRilVoiceRadioTechnology));
@@ -1353,15 +1357,15 @@
mRilDataRadioTechnology);
// sync to network registration state
- NetworkRegistrationState regState = getNetworkRegistrationState(
- NetworkRegistrationState.DOMAIN_PS, AccessNetworkConstants.TRANSPORT_TYPE_WWAN);
+ NetworkRegistrationInfo regState = getNetworkRegistrationInfo(
+ NetworkRegistrationInfo.DOMAIN_PS, AccessNetworkConstants.TRANSPORT_TYPE_WWAN);
if (regState == null) {
- regState = new NetworkRegistrationState(
- NetworkRegistrationState.DOMAIN_PS, AccessNetworkConstants.TRANSPORT_TYPE_WWAN,
- ServiceState.ROAMING_TYPE_NOT_ROAMING, TelephonyManager.NETWORK_TYPE_UNKNOWN,
- 0, false, null, null);
- addNetworkRegistrationState(regState);
+ regState = new NetworkRegistrationInfo.Builder()
+ .setDomain(NetworkRegistrationInfo.DOMAIN_PS)
+ .setTransportType(AccessNetworkConstants.TRANSPORT_TYPE_WWAN)
+ .build();
+ addNetworkRegistrationInfo(regState);
}
regState.setAccessNetworkTechnology(
rilRadioTechnologyToNetworkType(mRilDataRadioTechnology));
@@ -1386,15 +1390,15 @@
}
/**
- * Get the NR 5G status of the mobile data network.
- * @return the NR 5G status.
+ * Get the NR 5G state of the mobile data network.
+ * @return the NR 5G state.
* @hide
*/
- public @NRStatus int getNrStatus() {
- final NetworkRegistrationState regState = getNetworkRegistrationState(
- NetworkRegistrationState.DOMAIN_PS, AccessNetworkConstants.TRANSPORT_TYPE_WWAN);
- if (regState == null) return NetworkRegistrationState.NR_STATUS_NONE;
- return regState.getNrStatus();
+ public @NRState int getNrState() {
+ final NetworkRegistrationInfo regState = getNetworkRegistrationInfo(
+ NetworkRegistrationInfo.DOMAIN_PS, AccessNetworkConstants.TRANSPORT_TYPE_WWAN);
+ if (regState == null) return NetworkRegistrationInfo.NR_STATE_NONE;
+ return regState.getNrState();
}
/**
@@ -1576,19 +1580,19 @@
/** @hide */
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
public @TelephonyManager.NetworkType int getDataNetworkType() {
- final NetworkRegistrationState iwlanRegState = getNetworkRegistrationState(
- NetworkRegistrationState.DOMAIN_PS, AccessNetworkConstants.TRANSPORT_TYPE_WLAN);
- if (iwlanRegState != null
- && iwlanRegState.getRegState() == NetworkRegistrationState.REG_STATE_HOME) {
+ final NetworkRegistrationInfo iwlanRegState = getNetworkRegistrationInfo(
+ NetworkRegistrationInfo.DOMAIN_PS, AccessNetworkConstants.TRANSPORT_TYPE_WLAN);
+ if (iwlanRegState != null && iwlanRegState.getRegistrationState()
+ == NetworkRegistrationInfo.REGISTRATION_STATE_HOME) {
// If the device is on IWLAN, return IWLAN as the network type. This is to simulate the
// behavior of legacy mode device. In the future caller should use
- // getNetworkRegistrationState() to retrieve the actual data network type on cellular
+ // requestNetworkRegistrationInfo() to retrieve the actual data network type on cellular
// or on IWLAN.
return iwlanRegState.getAccessNetworkTechnology();
}
- final NetworkRegistrationState regState = getNetworkRegistrationState(
- NetworkRegistrationState.DOMAIN_PS, AccessNetworkConstants.TRANSPORT_TYPE_WWAN);
+ final NetworkRegistrationInfo regState = getNetworkRegistrationInfo(
+ NetworkRegistrationInfo.DOMAIN_PS, AccessNetworkConstants.TRANSPORT_TYPE_WWAN);
if (regState != null) {
return regState.getAccessNetworkTechnology();
}
@@ -1598,8 +1602,8 @@
/** @hide */
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
public @TelephonyManager.NetworkType int getVoiceNetworkType() {
- final NetworkRegistrationState regState = getNetworkRegistrationState(
- NetworkRegistrationState.DOMAIN_CS, AccessNetworkConstants.TRANSPORT_TYPE_WWAN);
+ final NetworkRegistrationInfo regState = getNetworkRegistrationInfo(
+ NetworkRegistrationInfo.DOMAIN_CS, AccessNetworkConstants.TRANSPORT_TYPE_WWAN);
if (regState != null) {
return regState.getAccessNetworkTechnology();
}
@@ -1762,52 +1766,36 @@
}
/**
- * Get all of the available network registration states.
+ * Get all of the available network registration info.
*
- * @return List of {@link NetworkRegistrationState}
+ * @return List of {@link NetworkRegistrationInfo}
* @hide
*/
@NonNull
@SystemApi
- public List<NetworkRegistrationState> getNetworkRegistrationStates() {
- synchronized (mNetworkRegistrationStates) {
- return new ArrayList<>(mNetworkRegistrationStates);
+ public List<NetworkRegistrationInfo> getNetworkRegistrationInfoList() {
+ synchronized (mNetworkRegistrationInfos) {
+ return new ArrayList<>(mNetworkRegistrationInfos);
}
}
/**
- * Get the network registration states for the transport type.
+ * Get the network registration info list for the transport type.
*
* @param transportType The transport type
- * @return List of {@link NetworkRegistrationState}
- * @hide
- *
- * @deprecated Use {@link #getNetworkRegistrationStatesForTransportType(int)}
- */
- @NonNull
- @Deprecated
- @SystemApi
- public List<NetworkRegistrationState> getNetworkRegistrationStates(int transportType) {
- return getNetworkRegistrationStatesForTransportType(transportType);
- }
-
- /**
- * Get the network registration states for the transport type.
- *
- * @param transportType The transport type
- * @return List of {@link NetworkRegistrationState}
+ * @return List of {@link NetworkRegistrationInfo}
* @hide
*/
@NonNull
@SystemApi
- public List<NetworkRegistrationState> getNetworkRegistrationStatesForTransportType(
+ public List<NetworkRegistrationInfo> getNetworkRegistrationInfoListForTransportType(
@TransportType int transportType) {
- List<NetworkRegistrationState> list = new ArrayList<>();
+ List<NetworkRegistrationInfo> list = new ArrayList<>();
- synchronized (mNetworkRegistrationStates) {
- for (NetworkRegistrationState networkRegistrationState : mNetworkRegistrationStates) {
- if (networkRegistrationState.getTransportType() == transportType) {
- list.add(networkRegistrationState);
+ synchronized (mNetworkRegistrationInfos) {
+ for (NetworkRegistrationInfo networkRegistrationInfo : mNetworkRegistrationInfos) {
+ if (networkRegistrationInfo.getTransportType() == transportType) {
+ list.add(networkRegistrationInfo);
}
}
}
@@ -1816,22 +1804,22 @@
}
/**
- * Get the network registration states for the network domain.
+ * Get the network registration info list for the network domain.
*
- * @param domain The network {@link NetworkRegistrationState.Domain domain}
- * @return List of {@link NetworkRegistrationState}
+ * @param domain The network {@link NetworkRegistrationInfo.Domain domain}
+ * @return List of {@link NetworkRegistrationInfo}
* @hide
*/
@NonNull
@SystemApi
- public List<NetworkRegistrationState> getNetworkRegistrationStatesForDomain(
+ public List<NetworkRegistrationInfo> getNetworkRegistrationInfoListForDomain(
@Domain int domain) {
- List<NetworkRegistrationState> list = new ArrayList<>();
+ List<NetworkRegistrationInfo> list = new ArrayList<>();
- synchronized (mNetworkRegistrationStates) {
- for (NetworkRegistrationState networkRegistrationState : mNetworkRegistrationStates) {
- if (networkRegistrationState.getDomain() == domain) {
- list.add(networkRegistrationState);
+ synchronized (mNetworkRegistrationInfos) {
+ for (NetworkRegistrationInfo networkRegistrationInfo : mNetworkRegistrationInfos) {
+ if (networkRegistrationInfo.getDomain() == domain) {
+ list.add(networkRegistrationInfo);
}
}
}
@@ -1842,39 +1830,21 @@
/**
* Get the network registration state for the transport type and network domain.
*
- * @param domain The network {@link NetworkRegistrationState.Domain domain}
+ * @param domain The network {@link NetworkRegistrationInfo.Domain domain}
* @param transportType The transport type
- * @return The matching {@link NetworkRegistrationState}
- * @hide
- *
- * @deprecated Use {@link #getNetworkRegistrationState(int, int)}
- */
- @Nullable
- @Deprecated
- @SystemApi
- public NetworkRegistrationState getNetworkRegistrationStates(@Domain int domain,
- @TransportType int transportType) {
- return getNetworkRegistrationState(domain, transportType);
- }
-
- /**
- * Get the network registration state for the transport type and network domain.
- *
- * @param domain The network {@link NetworkRegistrationState.Domain domain}
- * @param transportType The transport type
- * @return The matching {@link NetworkRegistrationState}
+ * @return The matching {@link NetworkRegistrationInfo}
* @hide
*
*/
@Nullable
@SystemApi
- public NetworkRegistrationState getNetworkRegistrationState(@Domain int domain,
- @TransportType int transportType) {
- synchronized (mNetworkRegistrationStates) {
- for (NetworkRegistrationState networkRegistrationState : mNetworkRegistrationStates) {
- if (networkRegistrationState.getTransportType() == transportType
- && networkRegistrationState.getDomain() == domain) {
- return networkRegistrationState;
+ public NetworkRegistrationInfo getNetworkRegistrationInfo(@Domain int domain,
+ @TransportType int transportType) {
+ synchronized (mNetworkRegistrationInfos) {
+ for (NetworkRegistrationInfo networkRegistrationInfo : mNetworkRegistrationInfos) {
+ if (networkRegistrationInfo.getTransportType() == transportType
+ && networkRegistrationInfo.getDomain() == domain) {
+ return networkRegistrationInfo;
}
}
}
@@ -1885,20 +1855,20 @@
/**
* @hide
*/
- public void addNetworkRegistrationState(NetworkRegistrationState regState) {
+ public void addNetworkRegistrationInfo(NetworkRegistrationInfo regState) {
if (regState == null) return;
- synchronized (mNetworkRegistrationStates) {
- for (int i = 0; i < mNetworkRegistrationStates.size(); i++) {
- NetworkRegistrationState curRegState = mNetworkRegistrationStates.get(i);
+ synchronized (mNetworkRegistrationInfos) {
+ for (int i = 0; i < mNetworkRegistrationInfos.size(); i++) {
+ NetworkRegistrationInfo curRegState = mNetworkRegistrationInfos.get(i);
if (curRegState.getTransportType() == regState.getTransportType()
&& curRegState.getDomain() == regState.getDomain()) {
- mNetworkRegistrationStates.remove(i);
+ mNetworkRegistrationInfos.remove(i);
break;
}
}
- mNetworkRegistrationStates.add(regState);
+ mNetworkRegistrationInfos.add(regState);
}
}
@@ -1913,15 +1883,15 @@
/**
* Returns a copy of self with location-identifying information removed.
- * Always clears the NetworkRegistrationState's CellIdentity fields, but if removeCoarseLocation
+ * Always clears the NetworkRegistrationInfo's CellIdentity fields, but if removeCoarseLocation
* is true, clears other info as well.
* @hide
*/
public ServiceState sanitizeLocationInfo(boolean removeCoarseLocation) {
ServiceState state = new ServiceState(this);
- if (state.mNetworkRegistrationStates != null) {
- state.mNetworkRegistrationStates = state.mNetworkRegistrationStates.stream()
- .map(NetworkRegistrationState::sanitizeLocationInfo)
+ if (state.mNetworkRegistrationInfos != null) {
+ state.mNetworkRegistrationInfos = state.mNetworkRegistrationInfos.stream()
+ .map(NetworkRegistrationInfo::sanitizeLocationInfo)
.collect(Collectors.toList());
}
if (!removeCoarseLocation) return state;
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java
index 7ea50b0..bf8eb0f 100644
--- a/telephony/java/android/telephony/TelephonyManager.java
+++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -58,6 +58,8 @@
import android.os.WorkSource;
import android.provider.Settings.SettingNotFoundException;
import android.service.carrier.CarrierIdentifier;
+import android.telecom.CallScreeningService;
+import android.telecom.InCallService;
import android.telecom.PhoneAccount;
import android.telecom.PhoneAccountHandle;
import android.telecom.TelecomManager;
@@ -617,7 +619,13 @@
* <p class="note">
* Retrieve with
* {@link android.content.Intent#getStringExtra(String)}.
+ * <p>
+ *
+ * @deprecated Companion apps for wearable devices should use the {@link InCallService} API
+ * to retrieve the phone number for calls instead. Apps performing call screening should use
+ * the {@link CallScreeningService} API instead.
*/
+ @Deprecated
public static final String EXTRA_INCOMING_NUMBER = "incoming_number";
/**
@@ -4747,18 +4755,22 @@
* Registers a listener object to receive notification of changes
* in specified telephony states.
* <p>
- * To register a listener, pass a {@link PhoneStateListener}
- * and specify at least one telephony state of interest in
- * the events argument.
+ * To register a listener, pass a {@link PhoneStateListener} and specify at least one telephony
+ * state of interest in the events argument.
*
- * At registration, and when a specified telephony state
- * changes, the telephony manager invokes the appropriate
- * callback method on the listener object and passes the
- * current (updated) values.
+ * At registration, and when a specified telephony state changes, the telephony manager invokes
+ * the appropriate callback method on the listener object and passes the current (updated)
+ * values.
* <p>
- * To unregister a listener, pass the listener object and set the
- * events argument to
+ * To un-register a listener, pass the listener object and set the events argument to
* {@link PhoneStateListener#LISTEN_NONE LISTEN_NONE} (0).
+ *
+ * If this TelephonyManager object has been created with {@link #createForSubscriptionId},
+ * applies to the given subId. Otherwise, applies to
+ * {@link SubscriptionManager#getDefaultSubscriptionId()}. To listen events for multiple subIds,
+ * pass a separate listener object to each TelephonyManager object created with
+ * {@link #createForSubscriptionId}.
+ *
* Note: if you call this method while in the middle of a binder transaction, you <b>must</b>
* call {@link android.os.Binder#clearCallingIdentity()} before calling this method. A
* {@link SecurityException} will be thrown otherwise.
@@ -4773,17 +4785,18 @@
if (mContext == null) return;
try {
boolean notifyNow = (getITelephony() != null);
- // If the listener has not explicitly set the subId (for example, created with the
- // default constructor), replace the subId so it will listen to the account the
- // telephony manager is created with.
- if (listener.mSubId == null) {
- listener.mSubId = mSubId;
- }
-
ITelephonyRegistry registry = getTelephonyRegistry();
if (registry != null) {
- registry.listenForSubscriber(listener.mSubId, getOpPackageName(),
+ // listen to the subId the telephony manager is created with. Ignore subId in
+ // PhoneStateListener.
+ registry.listenForSubscriber(mSubId, getOpPackageName(),
listener.callback, events, notifyNow);
+ // TODO: remove this once we remove PhoneStateListener constructor with subId.
+ if (events == PhoneStateListener.LISTEN_NONE) {
+ listener.mSubId = SubscriptionManager.INVALID_SUBSCRIPTION_ID;
+ } else {
+ listener.mSubId = mSubId;
+ }
} else {
Rlog.w(TAG, "telephony registry not ready.");
}
@@ -5164,6 +5177,40 @@
}
/**
+ * Opens a logical channel to the ICC card using the physical slot index.
+ *
+ * Use this method when no subscriptions are available on the SIM and the operation must be
+ * performed using the physical slot index.
+ *
+ * Input parameters equivalent to TS 27.007 AT+CCHO command.
+ *
+ * <p>Requires Permission:
+ * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}.
+ *
+ * @param slotIndex the physical slot index of the ICC card
+ * @param aid Application id. See ETSI 102.221 and 101.220.
+ * @param p2 P2 parameter (described in ISO 7816-4).
+ * @return an IccOpenLogicalChannelResponse object.
+ * @hide
+ */
+ @RequiresPermission(Manifest.permission.MODIFY_PHONE_STATE)
+ @SystemApi
+ @Nullable
+ public IccOpenLogicalChannelResponse iccOpenLogicalChannelBySlot(int slotIndex,
+ @Nullable String aid, int p2) {
+ try {
+ ITelephony telephony = getITelephony();
+ if (telephony != null) {
+ return telephony.iccOpenLogicalChannelBySlot(slotIndex, getOpPackageName(), aid,
+ p2);
+ }
+ } catch (RemoteException ex) {
+ } catch (NullPointerException ex) {
+ }
+ return null;
+ }
+
+ /**
* Opens a logical channel to the ICC card.
*
* Input parameters equivalent to TS 27.007 AT+CCHO command.
@@ -5207,6 +5254,37 @@
}
/**
+ * Closes a previously opened logical channel to the ICC card using the physical slot index.
+ *
+ * Use this method when no subscriptions are available on the SIM and the operation must be
+ * performed using the physical slot index.
+ *
+ * Input parameters equivalent to TS 27.007 AT+CCHC command.
+ *
+ * <p>Requires Permission:
+ * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}.
+ *
+ * @param slotIndex the physical slot index of the ICC card
+ * @param channel is the channel id to be closed as returned by a successful
+ * iccOpenLogicalChannel.
+ * @return true if the channel was closed successfully.
+ * @hide
+ */
+ @RequiresPermission(Manifest.permission.MODIFY_PHONE_STATE)
+ @SystemApi
+ public boolean iccCloseLogicalChannelBySlot(int slotIndex, int channel) {
+ try {
+ ITelephony telephony = getITelephony();
+ if (telephony != null) {
+ return telephony.iccCloseLogicalChannelBySlot(slotIndex, channel);
+ }
+ } catch (RemoteException ex) {
+ } catch (NullPointerException ex) {
+ }
+ return false;
+ }
+
+ /**
* Closes a previously opened logical channel to the ICC card.
*
* Input parameters equivalent to TS 27.007 AT+CCHC command.
@@ -5215,7 +5293,7 @@
* {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE} or that the calling
* app has carrier privileges (see {@link #hasCarrierPrivileges}).
*
- * @param channel is the channel id to be closed as retruned by a successful
+ * @param channel is the channel id to be closed as returned by a successful
* iccOpenLogicalChannel.
* @return true if the channel was closed successfully.
*/
@@ -5233,7 +5311,7 @@
* app has carrier privileges (see {@link #hasCarrierPrivileges}).
*
* @param subId The subscription to use.
- * @param channel is the channel id to be closed as retruned by a successful
+ * @param channel is the channel id to be closed as returned by a successful
* iccOpenLogicalChannel.
* @return true if the channel was closed successfully.
* @hide
@@ -5250,6 +5328,48 @@
}
/**
+ * Transmit an APDU to the ICC card over a logical channel using the physical slot index.
+ *
+ * Use this method when no subscriptions are available on the SIM and the operation must be
+ * performed using the physical slot index.
+ *
+ * Input parameters equivalent to TS 27.007 AT+CGLA command.
+ *
+ * <p>Requires Permission:
+ * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}.
+ *
+ * @param slotIndex the physical slot index of the ICC card
+ * @param channel is the channel id to be closed as returned by a successful
+ * iccOpenLogicalChannel.
+ * @param cla Class of the APDU command.
+ * @param instruction Instruction of the APDU command.
+ * @param p1 P1 value of the APDU command.
+ * @param p2 P2 value of the APDU command.
+ * @param p3 P3 value of the APDU command. If p3 is negative a 4 byte APDU
+ * is sent to the SIM.
+ * @param data Data to be sent with the APDU.
+ * @return The APDU response from the ICC card with the status appended at the end, or null if
+ * there is an issue connecting to the Telephony service.
+ * @hide
+ */
+ @RequiresPermission(Manifest.permission.MODIFY_PHONE_STATE)
+ @SystemApi
+ @Nullable
+ public String iccTransmitApduLogicalChannelBySlot(int slotIndex, int channel, int cla,
+ int instruction, int p1, int p2, int p3, @Nullable String data) {
+ try {
+ ITelephony telephony = getITelephony();
+ if (telephony != null) {
+ return telephony.iccTransmitApduLogicalChannelBySlot(slotIndex, channel, cla,
+ instruction, p1, p2, p3, data);
+ }
+ } catch (RemoteException ex) {
+ } catch (NullPointerException ex) {
+ }
+ return null;
+ }
+
+ /**
* Transmit an APDU to the ICC card over a logical channel.
*
* Input parameters equivalent to TS 27.007 AT+CGLA command.
@@ -5313,6 +5433,46 @@
}
/**
+ * Transmit an APDU to the ICC card over the basic channel using the physical slot index.
+ *
+ * Use this method when no subscriptions are available on the SIM and the operation must be
+ * performed using the physical slot index.
+ *
+ * Input parameters equivalent to TS 27.007 AT+CSIM command.
+ *
+ * <p>Requires Permission:
+ * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}.
+ *
+ * @param slotIndex the physical slot index of the ICC card to target
+ * @param cla Class of the APDU command.
+ * @param instruction Instruction of the APDU command.
+ * @param p1 P1 value of the APDU command.
+ * @param p2 P2 value of the APDU command.
+ * @param p3 P3 value of the APDU command. If p3 is negative a 4 byte APDU
+ * is sent to the SIM.
+ * @param data Data to be sent with the APDU.
+ * @return The APDU response from the ICC card with the status appended at
+ * the end.
+ * @hide
+ */
+ @RequiresPermission(Manifest.permission.MODIFY_PHONE_STATE)
+ @SystemApi
+ @NonNull
+ public String iccTransmitApduBasicChannelBySlot(int slotIndex, int cla, int instruction, int p1,
+ int p2, int p3, @Nullable String data) {
+ try {
+ ITelephony telephony = getITelephony();
+ if (telephony != null) {
+ return telephony.iccTransmitApduBasicChannelBySlot(slotIndex, getOpPackageName(),
+ cla, instruction, p1, p2, p3, data);
+ }
+ } catch (RemoteException ex) {
+ } catch (NullPointerException ex) {
+ }
+ return null;
+ }
+
+ /**
* Transmit an APDU to the ICC card over the basic channel.
*
* Input parameters equivalent to TS 27.007 AT+CSIM command.
@@ -6601,14 +6761,12 @@
}
} catch (RemoteException ex) {
Rlog.e(TAG, "getPreferredNetworkType RemoteException", ex);
- } catch (NullPointerException ex) {
- Rlog.e(TAG, "getPreferredNetworkType NPE", ex);
}
return -1;
}
/**
- * Get the preferred network type bitmap.
+ * Get the preferred network type bitmask.
*
* <p>If this object has been created with {@link #createForSubscriptionId}, applies to the
* given subId. Otherwise, applies to {@link SubscriptionManager#getDefaultSubscriptionId()}
@@ -6617,13 +6775,13 @@
* {@link android.Manifest.permission#READ_PRIVILEGED_PHONE_STATE READ_PRIVILEGED_PHONE_STATE}
* or that the calling app has carrier privileges (see {@link #hasCarrierPrivileges}).
*
- * @return The bitmap of preferred network types.
+ * @return The bitmask of preferred network types.
*
* @hide
*/
@RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
@SystemApi
- public @NetworkTypeBitMask long getPreferredNetworkTypeBitmap() {
+ public @NetworkTypeBitMask long getPreferredNetworkTypeBitmask() {
try {
ITelephony telephony = getITelephony();
if (telephony != null) {
@@ -6631,9 +6789,7 @@
telephony.getPreferredNetworkType(getSubId()));
}
} catch (RemoteException ex) {
- Rlog.e(TAG, "getPreferredNetworkTypeBitmap RemoteException", ex);
- } catch (NullPointerException ex) {
- Rlog.e(TAG, "getPreferredNetworkTypeBitmap NPE", ex);
+ Rlog.e(TAG, "getPreferredNetworkTypeBitmask RemoteException", ex);
}
return 0;
}
@@ -6858,14 +7014,12 @@
}
} catch (RemoteException ex) {
Rlog.e(TAG, "setPreferredNetworkType RemoteException", ex);
- } catch (NullPointerException ex) {
- Rlog.e(TAG, "setPreferredNetworkType NPE", ex);
}
return false;
}
/**
- * Set the preferred network type bitmap.
+ * Set the preferred network type bitmask.
*
* <p>If this object has been created with {@link #createForSubscriptionId}, applies to the
* given subId. Otherwise, applies to {@link SubscriptionManager#getDefaultSubscriptionId()}
@@ -6874,24 +7028,22 @@
* {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE} or that the calling
* app has carrier privileges (see {@link #hasCarrierPrivileges}).
*
- * @param networkTypeBitmap The bitmap of preferred network types.
+ * @param networkTypeBitmask The bitmask of preferred network types.
* @return true on success; false on any failure.
* @hide
*/
@RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE)
@SystemApi
- public boolean setPreferredNetworkTypeBitmap(@NetworkTypeBitMask long networkTypeBitmap) {
+ public boolean setPreferredNetworkTypeBitmask(@NetworkTypeBitMask long networkTypeBitmask) {
try {
ITelephony telephony = getITelephony();
if (telephony != null) {
return telephony.setPreferredNetworkType(
getSubId(), RadioAccessFamily.getNetworkTypeFromRaf(
- (int) networkTypeBitmap));
+ (int) networkTypeBitmask));
}
} catch (RemoteException ex) {
- Rlog.e(TAG, "setPreferredNetworkType RemoteException", ex);
- } catch (NullPointerException ex) {
- Rlog.e(TAG, "setPreferredNetworkType NPE", ex);
+ Rlog.e(TAG, "setPreferredNetworkTypeBitmask RemoteException", ex);
}
return false;
}
@@ -8120,7 +8272,7 @@
* @see SubscriptionManager#getDefaultSubscriptionId()
* @hide
*/
- @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
+ @UnsupportedAppUsage
public boolean isVolteAvailable() {
try {
return getITelephony().isAvailable(getSubId(),
@@ -8139,7 +8291,7 @@
* @return true if VT is available, or false if it is unavailable or unknown.
* @hide
*/
- @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
+ @UnsupportedAppUsage
public boolean isVideoTelephonyAvailable() {
try {
return getITelephony().isVideoTelephonyAvailable(getSubId());
@@ -8154,7 +8306,7 @@
* @return true if VoWiFi is available, or false if it is unavailable or unknown.
* @hide
*/
- @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
+ @UnsupportedAppUsage
public boolean isWifiCallingAvailable() {
try {
return getITelephony().isWifiCallingAvailable(getSubId());
@@ -9989,18 +10141,21 @@
* a SecurityException if the caller does not have the permission.
*/
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
- @Nullable
- public Map<Integer, List<EmergencyNumber>> getCurrentEmergencyNumberList() {
+ @NonNull
+ public Map<Integer, List<EmergencyNumber>> getEmergencyNumberList() {
+ Map<Integer, List<EmergencyNumber>> emergencyNumberList = new HashMap<>();
try {
ITelephony telephony = getITelephony();
- if (telephony == null) {
- return null;
+ if (telephony != null) {
+ return telephony.getEmergencyNumberList(mContext.getOpPackageName());
+ } else {
+ throw new IllegalStateException("telephony service is null.");
}
- return telephony.getCurrentEmergencyNumberList(mContext.getOpPackageName());
} catch (RemoteException ex) {
- Log.e(TAG, "getCurrentEmergencyNumberList RemoteException", ex);
+ Log.e(TAG, "getEmergencyNumberList RemoteException", ex);
+ ex.rethrowAsRuntimeException();
}
- return null;
+ return emergencyNumberList;
}
/**
@@ -10039,31 +10194,34 @@
* a SecurityException if the caller does not have the permission.
*/
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
- @Nullable
- public Map<Integer, List<EmergencyNumber>> getCurrentEmergencyNumberList(
+ @NonNull
+ public Map<Integer, List<EmergencyNumber>> getEmergencyNumberList(
@EmergencyServiceCategories int categories) {
+ Map<Integer, List<EmergencyNumber>> emergencyNumberList = new HashMap<>();
try {
ITelephony telephony = getITelephony();
- if (telephony == null) {
- return null;
- }
- Map<Integer, List<EmergencyNumber>> numberMap = telephony
- .getCurrentEmergencyNumberList(mContext.getOpPackageName());
- if (numberMap != null) {
- for (Integer subscriptionId : numberMap.keySet()) {
- List<EmergencyNumber> numberList = numberMap.get(subscriptionId);
- for (EmergencyNumber number : numberList) {
- if (!number.isInEmergencyServiceCategories(categories)) {
- numberList.remove(number);
+ if (telephony != null) {
+ emergencyNumberList = telephony.getEmergencyNumberList(
+ mContext.getOpPackageName());
+ if (emergencyNumberList != null) {
+ for (Integer subscriptionId : emergencyNumberList.keySet()) {
+ List<EmergencyNumber> numberList = emergencyNumberList.get(subscriptionId);
+ for (EmergencyNumber number : numberList) {
+ if (!number.isInEmergencyServiceCategories(categories)) {
+ numberList.remove(number);
+ }
}
}
}
+ return emergencyNumberList;
+ } else {
+ throw new IllegalStateException("telephony service is null.");
}
- return numberMap;
} catch (RemoteException ex) {
- Log.e(TAG, "getCurrentEmergencyNumberList with Categories RemoteException", ex);
+ Log.e(TAG, "getEmergencyNumberList with Categories RemoteException", ex);
+ ex.rethrowAsRuntimeException();
}
- return null;
+ return emergencyNumberList;
}
/**
@@ -10077,15 +10235,17 @@
* @return {@code true} if the given number is an emergency number based on current locale,
* sim, modem and network; {@code false} otherwise.
*/
- public boolean isCurrentEmergencyNumber(@NonNull String number) {
+ public boolean isEmergencyNumber(@NonNull String number) {
try {
ITelephony telephony = getITelephony();
- if (telephony == null) {
- return false;
+ if (telephony != null) {
+ return telephony.isEmergencyNumber(number, true);
+ } else {
+ throw new IllegalStateException("telephony service is null.");
}
- return telephony.isCurrentEmergencyNumber(number, true);
} catch (RemoteException ex) {
- Log.e(TAG, "isCurrentEmergencyNumber RemoteException", ex);
+ Log.e(TAG, "isEmergencyNumber RemoteException", ex);
+ ex.rethrowAsRuntimeException();
}
return false;
}
@@ -10114,15 +10274,17 @@
*/
@SystemApi
@RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
- public boolean isCurrentPotentialEmergencyNumber(@NonNull String number) {
+ public boolean isPotentialEmergencyNumber(@NonNull String number) {
try {
ITelephony telephony = getITelephony();
- if (telephony == null) {
- return false;
+ if (telephony != null) {
+ return telephony.isEmergencyNumber(number, false);
+ } else {
+ throw new IllegalStateException("telephony service is null.");
}
- return telephony.isCurrentEmergencyNumber(number, false);
} catch (RemoteException ex) {
- Log.e(TAG, "isCurrentEmergencyNumber RemoteException", ex);
+ Log.e(TAG, "isEmergencyNumber RemoteException", ex);
+ ex.rethrowAsRuntimeException();
}
return false;
}
@@ -10346,45 +10508,77 @@
* <p>Note: the API does not prevent access to the SIM cards for operations that don't require
* access to the network.
*
- * @param isMultisimCarrierRestricted true if usage of multiple SIMs is restricted, false
+ * @param isMultiSimCarrierRestricted true if usage of multiple SIMs is restricted, false
* otherwise.
*
* @hide
*/
@SystemApi
@RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE)
- public void setMultisimCarrierRestriction(boolean isMultisimCarrierRestricted) {
+ public void setMultiSimCarrierRestriction(boolean isMultiSimCarrierRestricted) {
try {
ITelephony service = getITelephony();
if (service != null) {
- service.setMultisimCarrierRestriction(isMultisimCarrierRestricted);
+ service.setMultiSimCarrierRestriction(isMultiSimCarrierRestricted);
}
} catch (RemoteException e) {
- Log.e(TAG, "setMultisimCarrierRestriction RemoteException", e);
+ Log.e(TAG, "setMultiSimCarrierRestriction RemoteException", e);
}
}
/**
+ * The usage of multiple SIM cards at the same time to register on the network (e.g. Dual
+ * Standby or Dual Active) is supported.
+ */
+ public static final int MULTISIM_ALLOWED = 0;
+
+ /**
+ * The usage of multiple SIM cards at the same time to register on the network (e.g. Dual
+ * Standby or Dual Active) is not supported by the hardware.
+ */
+ public static final int MULTISIM_NOT_SUPPORTED_BY_HARDWARE = 1;
+
+ /**
+ * The usage of multiple SIM cards at the same time to register on the network (e.g. Dual
+ * Standby or Dual Active) is supported by the hardware, but restricted by the carrier.
+ */
+ public static final int MULTISIM_NOT_SUPPORTED_BY_CARRIER = 2;
+
+ /** @hide */
+ @Retention(RetentionPolicy.SOURCE)
+ @IntDef(prefix = {"MULTISIM_"},
+ value = {
+ MULTISIM_ALLOWED,
+ MULTISIM_NOT_SUPPORTED_BY_HARDWARE,
+ MULTISIM_NOT_SUPPORTED_BY_CARRIER
+ })
+ public @interface IsMultiSimSupportedResult {}
+
+ /**
* Returns if the usage of multiple SIM cards at the same time to register on the network
* (e.g. Dual Standby or Dual Active) is supported by the device and by the carrier.
*
* <p>Requires Permission: {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
* or that the calling app has carrier privileges (see {@link #hasCarrierPrivileges}).
*
- * @return true if usage of multiple SIMs is supported, false otherwise.
+ * @return {@link #MULTISIM_ALLOWED} if the device supports multiple SIMs.
+ * {@link #MULTISIM_NOT_SUPPORTED_BY_HARDWARE} if the device does not support multiple SIMs.
+ * {@link #MULTISIM_NOT_SUPPORTED_BY_CARRIER} in the device supports multiple SIMs, but the
+ * functionality is restricted by the carrier.
*/
@SuppressAutoDoc // Blocked by b/72967236 - no support for carrier privileges
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
- public boolean isMultisimSupported() {
+ @IsMultiSimSupportedResult
+ public int isMultiSimSupported() {
try {
ITelephony service = getITelephony();
if (service != null) {
- return service.isMultisimSupported(getOpPackageName());
+ return service.isMultiSimSupported(getOpPackageName());
}
} catch (RemoteException e) {
- Log.e(TAG, "isMultisimSupported RemoteException", e);
+ Log.e(TAG, "isMultiSimSupported RemoteException", e);
}
- return false;
+ return MULTISIM_NOT_SUPPORTED_BY_HARDWARE;
}
/**
diff --git a/telephony/java/android/telephony/data/DataCallResponse.java b/telephony/java/android/telephony/data/DataCallResponse.java
index 6d74ded..3806a7e 100644
--- a/telephony/java/android/telephony/data/DataCallResponse.java
+++ b/telephony/java/android/telephony/data/DataCallResponse.java
@@ -17,16 +17,21 @@
package android.telephony.data;
+import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.net.LinkAddress;
import android.os.Parcel;
import android.os.Parcelable;
+import android.telephony.DataFailCause;
+import android.telephony.DataFailCause.FailCause;
import android.telephony.data.ApnSetting.ProtocolType;
import com.android.internal.annotations.VisibleForTesting;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
import java.net.InetAddress;
import java.util.ArrayList;
import java.util.List;
@@ -39,83 +44,114 @@
*/
@SystemApi
public final class DataCallResponse implements Parcelable {
- private final int mStatus;
+
+ /** {@hide} */
+ @IntDef(prefix = "LINK_STATUS_", value = {
+ LINK_STATUS_UNKNOWN,
+ LINK_STATUS_INACTIVE,
+ LINK_STATUS_DORMANT,
+ LINK_STATUS_ACTIVE
+ })
+ @Retention(RetentionPolicy.SOURCE)
+ public @interface LinkStatus {}
+
+ /** Unknown status */
+ public static final int LINK_STATUS_UNKNOWN = -1;
+
+ /** Indicates the data connection is inactive. */
+ public static final int LINK_STATUS_INACTIVE = 0;
+
+ /** Indicates the data connection is active with physical link dormant. */
+ public static final int LINK_STATUS_DORMANT = 1;
+
+ /** Indicates the data connection is active with physical link up. */
+ public static final int LINK_STATUS_ACTIVE = 2;
+
+ private final @FailCause int mCause;
private final int mSuggestedRetryTime;
- private final int mCid;
- private final int mActive;
- private final int mProtocolType;
- private final String mIfname;
+ private final int mId;
+ private final @LinkStatus int mLinkStatus;
+ private final @ProtocolType int mProtocolType;
+ private final String mInterfaceName;
private final List<LinkAddress> mAddresses;
- private final List<InetAddress> mDnses;
- private final List<InetAddress> mGateways;
- private final List<String> mPcscfs;
+ private final List<InetAddress> mDnsAddresses;
+ private final List<InetAddress> mGatewayAddresses;
+ private final List<InetAddress> mPcscfAddresses;
private final int mMtu;
/**
- * @param status Data call fail cause. 0 indicates no error.
+ * @param cause Data call fail cause. {@link DataFailCause#NONE} indicates no error.
* @param suggestedRetryTime The suggested data retry time in milliseconds.
- * @param cid The unique id of the data connection.
- * @param active Data connection active status. 0 = inactive, 1 = dormant, 2 = active.
+ * @param id The unique id of the data connection.
+ * @param linkStatus Data connection link status.
* @param protocolType The connection protocol, should be one of the PDP_type values in 3GPP
- * TS 27.007 section 10.1.1. For example, "IP", "IPV6", "IPV4V6", or "PPP".
- * @param ifname The network interface name.
+ * TS 27.007 section 10.1.1. For example, "IP", "IPV6", "IPV4V6", or "PPP".
+ * @param interfaceName The network interface name.
* @param addresses A list of addresses with optional "/" prefix length, e.g.,
- * "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64". Typically 1 IPv4 or 1 IPv6 or
- * one of each. If the prefix length is absent the addresses are assumed to be
- * point to point with IPv4 having a prefix length of 32 and IPv6 128.
- * @param dnses A list of DNS server addresses, e.g., "192.0.1.3" or
- * "192.0.1.11 2001:db8::1". Null if no dns server addresses returned.
- * @param gateways A list of default gateway addresses, e.g., "192.0.1.3" or
- * "192.0.1.11 2001:db8::1". When null, the addresses represent point to point
- * connections.
- * @param pcscfs A list of Proxy Call State Control Function address via PCO(Protocol
- * Configuration Option) for IMS client.
- * @param mtu MTU (Maximum transmission unit) received from network Value <= 0 means network has
- * either not sent a value or sent an invalid value.
+ * "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64". Typically 1 IPv4 or 1 IPv6 or
+ * one of each. If the prefix length is absent the addresses are assumed to be
+ * point to point with IPv4 having a prefix length of 32 and IPv6 128.
+ * @param dnsAddresses A list of DNS server addresses, e.g., "192.0.1.3" or
+ * "192.0.1.11 2001:db8::1". Null if no dns server addresses returned.
+ * @param gatewayAddresses A list of default gateway addresses, e.g., "192.0.1.3" or
+ * "192.0.1.11 2001:db8::1". When null, the addresses represent point to point connections.
+ * @param pcscfAddresses A list of Proxy Call State Control Function address via PCO (Protocol
+ * Configuration Option) for IMS client.
+ * @param mtu MTU (maximum transmission unit) in bytes received from network. Zero or negative
+ * values means network has either not sent a value or sent an invalid value.
+ * either not sent a value or sent an invalid value.
+ *
+ * @removed Use the {@link Builder()} instead.
*/
- public DataCallResponse(int status, int suggestedRetryTime, int cid, int active,
- @ProtocolType int protocolType, @Nullable String ifname,
+ public DataCallResponse(@FailCause int cause, int suggestedRetryTime, int id,
+ @LinkStatus int linkStatus,
+ @ProtocolType int protocolType, @Nullable String interfaceName,
@Nullable List<LinkAddress> addresses,
- @Nullable List<InetAddress> dnses,
- @Nullable List<InetAddress> gateways,
- @Nullable List<String> pcscfs, int mtu) {
- mStatus = status;
+ @Nullable List<InetAddress> dnsAddresses,
+ @Nullable List<InetAddress> gatewayAddresses,
+ @Nullable List<InetAddress> pcscfAddresses, int mtu) {
+ mCause = cause;
mSuggestedRetryTime = suggestedRetryTime;
- mCid = cid;
- mActive = active;
+ mId = id;
+ mLinkStatus = linkStatus;
mProtocolType = protocolType;
- mIfname = (ifname == null) ? "" : ifname;
- mAddresses = (addresses == null) ? new ArrayList<>() : addresses;
- mDnses = (dnses == null) ? new ArrayList<>() : dnses;
- mGateways = (gateways == null) ? new ArrayList<>() : gateways;
- mPcscfs = (pcscfs == null) ? new ArrayList<>() : pcscfs;
+ mInterfaceName = (interfaceName == null) ? "" : interfaceName;
+ mAddresses = (addresses == null)
+ ? new ArrayList<>() : new ArrayList<>(addresses);
+ mDnsAddresses = (dnsAddresses == null)
+ ? new ArrayList<>() : new ArrayList<>(dnsAddresses);
+ mGatewayAddresses = (gatewayAddresses == null)
+ ? new ArrayList<>() : new ArrayList<>(gatewayAddresses);
+ mPcscfAddresses = (pcscfAddresses == null)
+ ? new ArrayList<>() : new ArrayList<>(pcscfAddresses);
mMtu = mtu;
}
/** @hide */
@VisibleForTesting
public DataCallResponse(Parcel source) {
- mStatus = source.readInt();
+ mCause = source.readInt();
mSuggestedRetryTime = source.readInt();
- mCid = source.readInt();
- mActive = source.readInt();
+ mId = source.readInt();
+ mLinkStatus = source.readInt();
mProtocolType = source.readInt();
- mIfname = source.readString();
+ mInterfaceName = source.readString();
mAddresses = new ArrayList<>();
source.readList(mAddresses, LinkAddress.class.getClassLoader());
- mDnses = new ArrayList<>();
- source.readList(mDnses, InetAddress.class.getClassLoader());
- mGateways = new ArrayList<>();
- source.readList(mGateways, InetAddress.class.getClassLoader());
- mPcscfs = new ArrayList<>();
- source.readList(mPcscfs, InetAddress.class.getClassLoader());
+ mDnsAddresses = new ArrayList<>();
+ source.readList(mDnsAddresses, InetAddress.class.getClassLoader());
+ mGatewayAddresses = new ArrayList<>();
+ source.readList(mGatewayAddresses, InetAddress.class.getClassLoader());
+ mPcscfAddresses = new ArrayList<>();
+ source.readList(mPcscfAddresses, InetAddress.class.getClassLoader());
mMtu = source.readInt();
}
/**
- * @return Data call fail cause. 0 indicates no error.
+ * @return Data call fail cause. {@link DataFailCause#NONE} indicates no error.
*/
- public int getStatus() { return mStatus; }
+ @FailCause
+ public int getCause() { return mCause; }
/**
* @return The suggested data retry time in milliseconds.
@@ -125,12 +161,12 @@
/**
* @return The unique id of the data connection.
*/
- public int getCallId() { return mCid; }
+ public int getId() { return mId; }
/**
- * @return 0 = inactive, 1 = dormant, 2 = active.
+ * @return The link status
*/
- public int getActive() { return mActive; }
+ @LinkStatus public int getLinkStatus() { return mLinkStatus; }
/**
* @return The connection protocol type.
@@ -139,13 +175,13 @@
public int getProtocolType() { return mProtocolType; }
/**
- * @return The network interface name.
+ * @return The network interface name (e.g. "rmnet_data1").
*/
@NonNull
- public String getIfname() { return mIfname; }
+ public String getInterfaceName() { return mInterfaceName; }
/**
- * @return A list of {@link LinkAddress}
+ * @return A list of addresses of this data connection.
*/
@NonNull
public List<LinkAddress> getAddresses() { return mAddresses; }
@@ -155,25 +191,25 @@
* "192.0.1.11 2001:db8::1". Empty list if no dns server addresses returned.
*/
@NonNull
- public List<InetAddress> getDnses() { return mDnses; }
+ public List<InetAddress> getDnsAddresses() { return mDnsAddresses; }
/**
* @return A list of default gateway addresses, e.g., "192.0.1.3" or
* "192.0.1.11 2001:db8::1". Empty list if the addresses represent point to point connections.
*/
@NonNull
- public List<InetAddress> getGateways() { return mGateways; }
+ public List<InetAddress> getGatewayAddresses() { return mGatewayAddresses; }
/**
- * @return A list of Proxy Call State Control Function address via PCO(Protocol Configuration
+ * @return A list of Proxy Call State Control Function address via PCO (Protocol Configuration
* Option) for IMS client.
*/
@NonNull
- public List<String> getPcscfs() { return mPcscfs; }
+ public List<InetAddress> getPcscfAddresses() { return mPcscfAddresses; }
/**
- * @return MTU received from network Value <= 0 means network has either not sent a value or
- * sent an invalid value
+ * @return MTU (maximum transmission unit) in bytes received from network. Zero or negative
+ * values means network has either not sent a value or sent an invalid value.
*/
public int getMtu() { return mMtu; }
@@ -181,16 +217,16 @@
public String toString() {
StringBuffer sb = new StringBuffer();
sb.append("DataCallResponse: {")
- .append(" status=").append(mStatus)
+ .append(" cause=").append(mCause)
.append(" retry=").append(mSuggestedRetryTime)
- .append(" cid=").append(mCid)
- .append(" active=").append(mActive)
+ .append(" cid=").append(mId)
+ .append(" linkStatus=").append(mLinkStatus)
.append(" protocolType=").append(mProtocolType)
- .append(" ifname=").append(mIfname)
+ .append(" ifname=").append(mInterfaceName)
.append(" addresses=").append(mAddresses)
- .append(" dnses=").append(mDnses)
- .append(" gateways=").append(mGateways)
- .append(" pcscf=").append(mPcscfs)
+ .append(" dnses=").append(mDnsAddresses)
+ .append(" gateways=").append(mGatewayAddresses)
+ .append(" pcscf=").append(mPcscfAddresses)
.append(" mtu=").append(mMtu)
.append("}");
return sb.toString();
@@ -200,32 +236,33 @@
public boolean equals (Object o) {
if (this == o) return true;
- if (o == null || !(o instanceof DataCallResponse)) {
+ if (!(o instanceof DataCallResponse)) {
return false;
}
DataCallResponse other = (DataCallResponse) o;
- return this.mStatus == other.mStatus
+ return this.mCause == other.mCause
&& this.mSuggestedRetryTime == other.mSuggestedRetryTime
- && this.mCid == other.mCid
- && this.mActive == other.mActive
+ && this.mId == other.mId
+ && this.mLinkStatus == other.mLinkStatus
&& this.mProtocolType == other.mProtocolType
- && this.mIfname.equals(other.mIfname)
+ && this.mInterfaceName.equals(other.mInterfaceName)
&& mAddresses.size() == other.mAddresses.size()
&& mAddresses.containsAll(other.mAddresses)
- && mDnses.size() == other.mDnses.size()
- && mDnses.containsAll(other.mDnses)
- && mGateways.size() == other.mGateways.size()
- && mGateways.containsAll(other.mGateways)
- && mPcscfs.size() == other.mPcscfs.size()
- && mPcscfs.containsAll(other.mPcscfs)
+ && mDnsAddresses.size() == other.mDnsAddresses.size()
+ && mDnsAddresses.containsAll(other.mDnsAddresses)
+ && mGatewayAddresses.size() == other.mGatewayAddresses.size()
+ && mGatewayAddresses.containsAll(other.mGatewayAddresses)
+ && mPcscfAddresses.size() == other.mPcscfAddresses.size()
+ && mPcscfAddresses.containsAll(other.mPcscfAddresses)
&& mMtu == other.mMtu;
}
@Override
public int hashCode() {
- return Objects.hash(mStatus, mSuggestedRetryTime, mCid, mActive, mProtocolType, mIfname,
- mAddresses, mDnses, mGateways, mPcscfs, mMtu);
+ return Objects.hash(mCause, mSuggestedRetryTime, mId, mLinkStatus, mProtocolType,
+ mInterfaceName, mAddresses, mDnsAddresses, mGatewayAddresses, mPcscfAddresses,
+ mMtu);
}
@Override
@@ -235,20 +272,20 @@
@Override
public void writeToParcel(Parcel dest, int flags) {
- dest.writeInt(mStatus);
+ dest.writeInt(mCause);
dest.writeInt(mSuggestedRetryTime);
- dest.writeInt(mCid);
- dest.writeInt(mActive);
+ dest.writeInt(mId);
+ dest.writeInt(mLinkStatus);
dest.writeInt(mProtocolType);
- dest.writeString(mIfname);
+ dest.writeString(mInterfaceName);
dest.writeList(mAddresses);
- dest.writeList(mDnses);
- dest.writeList(mGateways);
- dest.writeList(mPcscfs);
+ dest.writeList(mDnsAddresses);
+ dest.writeList(mGatewayAddresses);
+ dest.writeList(mPcscfAddresses);
dest.writeInt(mMtu);
}
- public static final Parcelable.Creator<DataCallResponse> CREATOR =
+ public static final @NonNull Parcelable.Creator<DataCallResponse> CREATOR =
new Parcelable.Creator<DataCallResponse>() {
@Override
public DataCallResponse createFromParcel(Parcel source) {
@@ -260,4 +297,183 @@
return new DataCallResponse[size];
}
};
-}
\ No newline at end of file
+
+ /**
+ * Provides a convenient way to set the fields of a {@link DataCallResponse} when creating a new
+ * instance.
+ *
+ * <p>The example below shows how you might create a new {@code DataCallResponse}:
+ *
+ * <pre><code>
+ *
+ * DataCallResponse response = new DataCallResponse.Builder()
+ * .setAddresses(Arrays.asList("192.168.1.2"))
+ * .setProtocolType(ApnSetting.PROTOCOL_IPV4V6)
+ * .build();
+ * </code></pre>
+ */
+ public static final class Builder {
+ private @FailCause int mCause;
+
+ private int mSuggestedRetryTime;
+
+ private int mId;
+
+ private @LinkStatus int mLinkStatus;
+
+ private @ProtocolType int mProtocolType;
+
+ private String mInterfaceName;
+
+ private List<LinkAddress> mAddresses;
+
+ private List<InetAddress> mDnsAddresses;
+
+ private List<InetAddress> mGatewayAddresses;
+
+ private List<InetAddress> mPcscfAddresses;
+
+ private int mMtu;
+
+ /**
+ * Default constructor for Builder.
+ */
+ public Builder() {
+ }
+
+ /**
+ * Set data call fail cause.
+ *
+ * @param cause Data call fail cause. {@link DataFailCause#NONE} indicates no error.
+ * @return The same instance of the builder.
+ */
+ public @NonNull Builder setCause(@FailCause int cause) {
+ mCause = cause;
+ return this;
+ }
+
+ /**
+ * Set the suggested data retry time.
+ *
+ * @param suggestedRetryTime The suggested data retry time in milliseconds.
+ * @return The same instance of the builder.
+ */
+ public @NonNull Builder setSuggestedRetryTime(int suggestedRetryTime) {
+ mSuggestedRetryTime = suggestedRetryTime;
+ return this;
+ }
+
+ /**
+ * Set the unique id of the data connection.
+ *
+ * @param id The unique id of the data connection.
+ * @return The same instance of the builder.
+ */
+ public @NonNull Builder setId(int id) {
+ mId = id;
+ return this;
+ }
+
+ /**
+ * Set the link status
+ *
+ * @param linkStatus The link status
+ * @return The same instance of the builder.
+ */
+ public @NonNull Builder setLinkStatus(@LinkStatus int linkStatus) {
+ mLinkStatus = linkStatus;
+ return this;
+ }
+
+ /**
+ * Set the connection protocol type.
+ *
+ * @param protocolType The connection protocol type.
+ * @return The same instance of the builder.
+ */
+ public @NonNull Builder setProtocolType(@ProtocolType int protocolType) {
+ mProtocolType = protocolType;
+ return this;
+ }
+
+ /**
+ * Set the network interface name.
+ *
+ * @param interfaceName The network interface name (e.g. "rmnet_data1").
+ * @return The same instance of the builder.
+ */
+ public @NonNull Builder setInterfaceName(@NonNull String interfaceName) {
+ mInterfaceName = interfaceName;
+ return this;
+ }
+
+ /**
+ * Set the addresses of this data connection.
+ *
+ * @param addresses The list of address of the data connection.
+ * @return The same instance of the builder.
+ */
+ public @NonNull Builder setAddresses(@NonNull List<LinkAddress> addresses) {
+ mAddresses = addresses;
+ return this;
+ }
+
+ /**
+ * Set the DNS addresses of this data connection
+ *
+ * @param dnsAddresses The list of DNS address of the data connection.
+ * @return The same instance of the builder.
+ */
+ public @NonNull Builder setDnsAddresses(@NonNull List<InetAddress> dnsAddresses) {
+ mDnsAddresses = dnsAddresses;
+ return this;
+ }
+
+ /**
+ * Set the gateway addresses of this data connection
+ *
+ * @param gatewayAddresses The list of gateway address of the data connection.
+ * @return The same instance of the builder.
+ */
+ public @NonNull Builder setGatewayAddresses(@NonNull List<InetAddress> gatewayAddresses) {
+ mGatewayAddresses = gatewayAddresses;
+ return this;
+ }
+
+ /**
+ * Set the Proxy Call State Control Function address via PCO(Protocol Configuration
+ * Option) for IMS client.
+ *
+ * @param pcscfAddresses The list of pcscf address of the data connection.
+ * @return The same instance of the builder.
+ */
+ public @NonNull Builder setPcscfAddresses(@NonNull List<InetAddress> pcscfAddresses) {
+ mPcscfAddresses = pcscfAddresses;
+ return this;
+ }
+
+ /**
+ * Set maximum transmission unit of the data connection.
+ *
+ * @param mtu MTU (maximum transmission unit) in bytes received from network. Zero or
+ * negative values means network has either not sent a value or sent an invalid value.
+ *
+ * @return The same instance of the builder.
+ */
+ public @NonNull Builder setMtu(int mtu) {
+ mMtu = mtu;
+ return this;
+ }
+
+ /**
+ * Build the DataCallResponse.
+ *
+ * @return the DataCallResponse object.
+ */
+ public @NonNull DataCallResponse build() {
+ return new DataCallResponse(mCause, mSuggestedRetryTime, mId, mLinkStatus,
+ mProtocolType, mInterfaceName, mAddresses, mDnsAddresses, mGatewayAddresses,
+ mPcscfAddresses, mMtu);
+ }
+ }
+}
diff --git a/telephony/java/android/telephony/data/DataProfile.java b/telephony/java/android/telephony/data/DataProfile.java
index 1d196f9..c53ade1 100644
--- a/telephony/java/android/telephony/data/DataProfile.java
+++ b/telephony/java/android/telephony/data/DataProfile.java
@@ -19,6 +19,8 @@
import static android.telephony.data.ApnSetting.ProtocolType;
import android.annotation.IntDef;
+import android.annotation.NonNull;
+import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.os.Build;
import android.os.Parcel;
@@ -32,6 +34,7 @@
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
+import java.util.Objects;
/**
* Description of a mobile data profile used for establishing
@@ -48,7 +51,7 @@
TYPE_COMMON,
TYPE_3GPP,
TYPE_3GPP2})
- public @interface DataProfileType {}
+ public @interface Type {}
/** Common data profile */
public static final int TYPE_COMMON = 0;
@@ -73,25 +76,25 @@
private final String mPassword;
- @DataProfileType
+ @Type
private final int mType;
- private final int mMaxConnsTime;
+ private final int mMaxConnectionsTime;
- private final int mMaxConns;
+ private final int mMaxConnections;
private final int mWaitTime;
private final boolean mEnabled;
@ApnType
- private final int mSupportedApnTypesBitmap;
+ private final int mSupportedApnTypesBitmask;
@ProtocolType
private final int mRoamingProtocolType;
@NetworkTypeBitMask
- private final int mBearerBitmap;
+ private final int mBearerBitmask;
private final int mMtu;
@@ -100,11 +103,13 @@
private final boolean mPreferred;
/** @hide */
- public DataProfile(int profileId, String apn, @ProtocolType int protocolType, int authType,
- String userName, String password, int type, int maxConnsTime, int maxConns,
- int waitTime, boolean enabled, @ApnType int supportedApnTypesBitmap,
- @ProtocolType int roamingProtocolType, @NetworkTypeBitMask int bearerBitmap,
- int mtu, boolean persistent, boolean preferred) {
+ private DataProfile(int profileId, String apn, @ProtocolType int protocolType, int authType,
+ String userName, String password, int type, int maxConnectionsTime,
+ int maxConnections, int waitTime, boolean enabled,
+ @ApnType int supportedApnTypesBitmask,
+ @ProtocolType int roamingProtocolType,
+ @NetworkTypeBitMask int bearerBitmask, int mtu, boolean persistent,
+ boolean preferred) {
this.mProfileId = profileId;
this.mApn = apn;
this.mProtocolType = protocolType;
@@ -116,21 +121,19 @@
this.mUserName = userName;
this.mPassword = password;
this.mType = type;
- this.mMaxConnsTime = maxConnsTime;
- this.mMaxConns = maxConns;
+ this.mMaxConnectionsTime = maxConnectionsTime;
+ this.mMaxConnections = maxConnections;
this.mWaitTime = waitTime;
this.mEnabled = enabled;
-
- this.mSupportedApnTypesBitmap = supportedApnTypesBitmap;
+ this.mSupportedApnTypesBitmask = supportedApnTypesBitmask;
this.mRoamingProtocolType = roamingProtocolType;
- this.mBearerBitmap = bearerBitmap;
+ this.mBearerBitmask = bearerBitmask;
this.mMtu = mtu;
this.mPersistent = persistent;
this.mPreferred = preferred;
}
- /** @hide */
- public DataProfile(Parcel source) {
+ private DataProfile(Parcel source) {
mProfileId = source.readInt();
mApn = source.readString();
mProtocolType = source.readInt();
@@ -138,13 +141,13 @@
mUserName = source.readString();
mPassword = source.readString();
mType = source.readInt();
- mMaxConnsTime = source.readInt();
- mMaxConns = source.readInt();
+ mMaxConnectionsTime = source.readInt();
+ mMaxConnections = source.readInt();
mWaitTime = source.readInt();
mEnabled = source.readBoolean();
- mSupportedApnTypesBitmap = source.readInt();
+ mSupportedApnTypesBitmask = source.readInt();
mRoamingProtocolType = source.readInt();
- mBearerBitmap = source.readInt();
+ mBearerBitmask = source.readInt();
mMtu = source.readInt();
mPersistent = source.readBoolean();
mPreferred = source.readBoolean();
@@ -156,14 +159,16 @@
public int getProfileId() { return mProfileId; }
/**
- * @return The APN to establish data connection.
+ * @return The APN (Access Point Name) to establish data connection. This is a string
+ * specifically defined by the carrier.
*/
+ @NonNull
public String getApn() { return mApn; }
/**
* @return The connection protocol defined in 3GPP TS 27.007 section 10.1.1.
*/
- public @ProtocolType int getProtocol() { return mProtocolType; }
+ public @ProtocolType int getProtocolType() { return mProtocolType; }
/**
* @return The authentication protocol used for this PDP context.
@@ -173,32 +178,40 @@
/**
* @return The username for APN. Can be null.
*/
+ @Nullable
public String getUserName() { return mUserName; }
/**
* @return The password for APN. Can be null.
*/
+ @Nullable
public String getPassword() { return mPassword; }
/**
* @return The profile type.
*/
- public @DataProfileType int getType() { return mType; }
+ public @Type int getType() { return mType; }
/**
* @return The period in seconds to limit the maximum connections.
+ *
+ * @hide
*/
- public int getMaxConnsTime() { return mMaxConnsTime; }
+ public int getMaxConnectionsTime() { return mMaxConnectionsTime; }
/**
* @return The maximum connections allowed.
+ *
+ * @hide
*/
- public int getMaxConns() { return mMaxConns; }
+ public int getMaxConnections() { return mMaxConnections; }
/**
* @return The required wait time in seconds after a successful UE initiated disconnect of a
* given PDN connection before the device can send a new PDN connection request for that given
* PDN.
+ *
+ * @hide
*/
public int getWaitTime() { return mWaitTime; }
@@ -208,19 +221,19 @@
public boolean isEnabled() { return mEnabled; }
/**
- * @return The supported APN types bitmap.
+ * @return The supported APN types bitmask.
*/
- public @ApnType int getSupportedApnTypesBitmap() { return mSupportedApnTypesBitmap; }
+ public @ApnType int getSupportedApnTypesBitmask() { return mSupportedApnTypesBitmask; }
/**
* @return The connection protocol on roaming network defined in 3GPP TS 27.007 section 10.1.1.
*/
- public @ProtocolType int getRoamingProtocol() { return mRoamingProtocolType; }
+ public @ProtocolType int getRoamingProtocolType() { return mRoamingProtocolType; }
/**
- * @return The bearer bitmap indicating the applicable networks for this data profile.
+ * @return The bearer bitmask indicating the applicable networks for this data profile.
*/
- public @NetworkTypeBitMask int getBearerBitmap() { return mBearerBitmap; }
+ public @NetworkTypeBitMask int getBearerBitmask() { return mBearerBitmask; }
/**
* @return The maximum transmission unit (MTU) size in bytes.
@@ -234,11 +247,11 @@
/**
* @return {@code true} if this data profile was used to bring up the last default
- * (i.e internet) data connection successfully.
+ * (i.e internet) data connection successfully, or the one chosen by the user in Settings'
+ * APN editor. For one carrier there can be only one profiled preferred.
*/
public boolean isPreferred() { return mPreferred; }
- /** @hide */
@Override
public int describeContents() {
return 0;
@@ -249,20 +262,13 @@
return "DataProfile=" + mProfileId + "/" + mProtocolType + "/" + mAuthType
+ "/" + (Build.IS_USER ? "***/***/***" :
(mApn + "/" + mUserName + "/" + mPassword)) + "/" + mType + "/"
- + mMaxConnsTime + "/" + mMaxConns + "/"
- + mWaitTime + "/" + mEnabled + "/" + mSupportedApnTypesBitmap + "/"
- + mRoamingProtocolType + "/" + mBearerBitmap + "/" + mMtu + "/" + mPersistent + "/"
+ + mMaxConnectionsTime + "/" + mMaxConnections + "/"
+ + mWaitTime + "/" + mEnabled + "/" + mSupportedApnTypesBitmask + "/"
+ + mRoamingProtocolType + "/" + mBearerBitmask + "/" + mMtu + "/" + mPersistent + "/"
+ mPreferred;
}
@Override
- public boolean equals(Object o) {
- if (o instanceof DataProfile == false) return false;
- return (o == this || toString().equals(o.toString()));
- }
-
- /** @hide */
- @Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeInt(mProfileId);
dest.writeString(mApn);
@@ -271,20 +277,19 @@
dest.writeString(mUserName);
dest.writeString(mPassword);
dest.writeInt(mType);
- dest.writeInt(mMaxConnsTime);
- dest.writeInt(mMaxConns);
+ dest.writeInt(mMaxConnectionsTime);
+ dest.writeInt(mMaxConnections);
dest.writeInt(mWaitTime);
dest.writeBoolean(mEnabled);
- dest.writeInt(mSupportedApnTypesBitmap);
+ dest.writeInt(mSupportedApnTypesBitmask);
dest.writeInt(mRoamingProtocolType);
- dest.writeInt(mBearerBitmap);
+ dest.writeInt(mBearerBitmask);
dest.writeInt(mMtu);
dest.writeBoolean(mPersistent);
dest.writeBoolean(mPreferred);
}
- /** @hide */
- public static final Parcelable.Creator<DataProfile> CREATOR =
+ public static final @android.annotation.NonNull Parcelable.Creator<DataProfile> CREATOR =
new Parcelable.Creator<DataProfile>() {
@Override
public DataProfile createFromParcel(Parcel source) {
@@ -296,4 +301,312 @@
return new DataProfile[size];
}
};
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+ DataProfile that = (DataProfile) o;
+ return mProfileId == that.mProfileId
+ && mProtocolType == that.mProtocolType
+ && mAuthType == that.mAuthType
+ && mType == that.mType
+ && mMaxConnectionsTime == that.mMaxConnectionsTime
+ && mMaxConnections == that.mMaxConnections
+ && mWaitTime == that.mWaitTime
+ && mEnabled == that.mEnabled
+ && mSupportedApnTypesBitmask == that.mSupportedApnTypesBitmask
+ && mRoamingProtocolType == that.mRoamingProtocolType
+ && mBearerBitmask == that.mBearerBitmask
+ && mMtu == that.mMtu
+ && mPersistent == that.mPersistent
+ && mPreferred == that.mPreferred
+ && Objects.equals(mApn, that.mApn)
+ && Objects.equals(mUserName, that.mUserName)
+ && Objects.equals(mPassword, that.mPassword);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(mProfileId, mApn, mProtocolType, mAuthType, mUserName, mPassword, mType,
+ mMaxConnectionsTime, mMaxConnections, mWaitTime, mEnabled,
+ mSupportedApnTypesBitmask, mRoamingProtocolType, mBearerBitmask, mMtu, mPersistent,
+ mPreferred);
+ }
+
+ /**
+ * Provides a convenient way to set the fields of a {@link DataProfile} when creating a new
+ * instance.
+ *
+ * <p>The example below shows how you might create a new {@code DataProfile}:
+ *
+ * <pre><code>
+ *
+ * DataProfile dp = new DataProfile.Builder()
+ * .setApn("apn.xyz.com")
+ * .setProtocol(ApnSetting.PROTOCOL_IPV4V6)
+ * .build();
+ * </code></pre>
+ */
+ public static final class Builder {
+ private int mProfileId;
+
+ private String mApn;
+
+ @ProtocolType
+ private int mProtocolType;
+
+ @AuthType
+ private int mAuthType;
+
+ private String mUserName;
+
+ private String mPassword;
+
+ @Type
+ private int mType;
+
+ private int mMaxConnectionsTime;
+
+ private int mMaxConnections;
+
+ private int mWaitTime;
+
+ private boolean mEnabled;
+
+ @ApnType
+ private int mSupportedApnTypesBitmask;
+
+ @ProtocolType
+ private int mRoamingProtocolType;
+
+ @NetworkTypeBitMask
+ private int mBearerBitmask;
+
+ private int mMtu;
+
+ private boolean mPersistent;
+
+ private boolean mPreferred;
+
+ /**
+ * Default constructor for Builder.
+ */
+ public Builder() {
+ }
+
+ /**
+ * Set profile id. Note that this is not a global unique id of the data profile. This id
+ * is only used by certain CDMA carriers to identify the type of data profile.
+ *
+ * @param profileId Network domain.
+ * @return The same instance of the builder.
+ */
+ public @NonNull Builder setProfileId(int profileId) {
+ mProfileId = profileId;
+ return this;
+ }
+
+ /**
+ * Set the APN (Access Point Name) to establish data connection. This is a string
+ * specifically defined by the carrier.
+ *
+ * @param apn Access point name
+ * @return The same instance of the builder.
+ */
+ public @NonNull Builder setApn(@NonNull String apn) {
+ mApn = apn;
+ return this;
+ }
+
+ /**
+ * Set the connection protocol type.
+ *
+ * @param protocolType The connection protocol defined in 3GPP TS 27.007 section 10.1.1.
+ * @return The same instance of the builder.
+ */
+ public @NonNull Builder setProtocolType(@ProtocolType int protocolType) {
+ mProtocolType = protocolType;
+ return this;
+ }
+
+ /**
+ * Set the authentication type.
+ *
+ * @param authType The authentication type
+ * @return The same instance of the builder.
+ */
+ public @NonNull Builder setAuthType(@AuthType int authType) {
+ mAuthType = authType;
+ return this;
+ }
+
+ /**
+ * Set the user name
+ *
+ * @param userName The user name
+ * @return The same instance of the builder.
+ */
+ public @NonNull Builder setUserName(@NonNull String userName) {
+ mUserName = userName;
+ return this;
+ }
+
+ /**
+ * Set the password
+ *
+ * @param password The password
+ * @return The same instance of the builder.
+ */
+ public @NonNull Builder setPassword(@NonNull String password) {
+ mPassword = password;
+ return this;
+ }
+
+ /**
+ * Set the type
+ *
+ * @param type The profile type
+ * @return The same instance of the builder.
+ */
+ public @NonNull Builder setType(@Type int type) {
+ mType = type;
+ return this;
+ }
+
+ /**
+ * Set the period in seconds to limit the maximum connections.
+ *
+ * @param maxConnectionsTime The profile type
+ * @return The same instance of the builder.
+ *
+ * @hide
+ */
+ public @NonNull Builder setMaxConnectionsTime(int maxConnectionsTime) {
+ mMaxConnectionsTime = maxConnectionsTime;
+ return this;
+ }
+
+ /**
+ * Set the maximum connections allowed.
+ *
+ * @param maxConnections The maximum connections allowed.
+ * @return The same instance of the builder.
+ *
+ * @hide
+ */
+ public @NonNull Builder setMaxConnections(int maxConnections) {
+ mMaxConnections = maxConnections;
+ return this;
+ }
+
+ /**
+ * Set the period in seconds to limit the maximum connections.
+ *
+ * @param waitTime The required wait time in seconds after a successful UE initiated
+ * disconnect of a given PDN connection before the device can send a new PDN connection
+ * request for that given PDN.
+ *
+ * @return The same instance of the builder.
+ *
+ * @hide
+ */
+ public @NonNull Builder setWaitTime(int waitTime) {
+ mWaitTime = waitTime;
+ return this;
+ }
+
+ /**
+ * Enable the data profile
+ *
+ * @param isEnabled {@code true} to enable the data profile, otherwise disable.
+ * @return The same instance of the builder.
+ */
+ public @NonNull Builder enable(boolean isEnabled) {
+ mEnabled = isEnabled;
+ return this;
+ }
+
+ /**
+ * Set the supported APN types bitmask.
+ *
+ * @param supportedApnTypesBitmask The supported APN types bitmask.
+ * @return The same instance of the builder.
+ */
+ public @NonNull Builder setSupportedApnTypesBitmask(@ApnType int supportedApnTypesBitmask) {
+ mSupportedApnTypesBitmask = supportedApnTypesBitmask;
+ return this;
+ }
+
+ /**
+ * Set the connection protocol type for roaming.
+ *
+ * @param protocolType The connection protocol defined in 3GPP TS 27.007 section 10.1.1.
+ * @return The same instance of the builder.
+ */
+ public @NonNull Builder setRoamingProtocolType(@ProtocolType int protocolType) {
+ mRoamingProtocolType = protocolType;
+ return this;
+ }
+
+ /**
+ * Set the bearer bitmask indicating the applicable networks for this data profile.
+ *
+ * @param bearerBitmask The bearer bitmask indicating the applicable networks for this data
+ * profile.
+ * @return The same instance of the builder.
+ */
+ public @NonNull Builder setBearerBitmask(@NetworkTypeBitMask int bearerBitmask) {
+ mBearerBitmask = bearerBitmask;
+ return this;
+ }
+
+ /**
+ * Set the maximum transmission unit (MTU) size in bytes.
+ *
+ * @param mtu The maximum transmission unit (MTU) size in bytes.
+ * @return The same instance of the builder.
+ */
+ public @NonNull Builder setMtu(int mtu) {
+ mMtu = mtu;
+ return this;
+ }
+
+ /**
+ * Set data profile as preferred/non-preferred.
+ *
+ * @param isPreferred {@code true} if this data profile was used to bring up the last
+ * default (i.e internet) data connection successfully, or the one chosen by the user in
+ * Settings' APN editor. For one carrier there can be only one profiled preferred.
+ * @return The same instance of the builder.
+ */
+ public @NonNull Builder setPreferred(boolean isPreferred) {
+ mPreferred = isPreferred;
+ return this;
+ }
+
+ /**
+ * Set data profile as persistent/non-persistent
+ *
+ * @param isPersistent {@code true} if this data profile was used to bring up the last
+ * default (i.e internet) data connection successfully.
+ * @return The same instance of the builder.
+ */
+ public @NonNull Builder setPersistent(boolean isPersistent) {
+ mPersistent = isPersistent;
+ return this;
+ }
+
+ /**
+ * Build the DataProfile object
+ *
+ * @return The data profile object
+ */
+ public @NonNull DataProfile build() {
+ return new DataProfile(mProfileId, mApn, mProtocolType, mAuthType, mUserName, mPassword,
+ mType, mMaxConnectionsTime, mMaxConnections, mWaitTime, mEnabled,
+ mSupportedApnTypesBitmask, mRoamingProtocolType, mBearerBitmask, mMtu,
+ mPersistent, mPreferred);
+ }
+ }
}
diff --git a/telephony/java/android/telephony/data/DataService.java b/telephony/java/android/telephony/data/DataService.java
index 59d1e1e..372bdf1 100644
--- a/telephony/java/android/telephony/data/DataService.java
+++ b/telephony/java/android/telephony/data/DataService.java
@@ -19,6 +19,7 @@
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.SdkConstant;
import android.annotation.SystemApi;
import android.app.Service;
import android.content.Intent;
@@ -58,10 +59,12 @@
public abstract class DataService extends Service {
private static final String TAG = DataService.class.getSimpleName();
- public static final String DATA_SERVICE_INTERFACE = "android.telephony.data.DataService";
+ @SdkConstant(SdkConstant.SdkConstantType.SERVICE_ACTION)
+ public static final String SERVICE_INTERFACE = "android.telephony.data.DataService";
/** {@hide} */
@IntDef(prefix = "REQUEST_REASON_", value = {
+ REQUEST_REASON_UNKNOWN,
REQUEST_REASON_NORMAL,
REQUEST_REASON_HANDOVER,
})
@@ -70,6 +73,7 @@
/** {@hide} */
@IntDef(prefix = "REQUEST_REASON_", value = {
+ REQUEST_REASON_UNKNOWN,
REQUEST_REASON_NORMAL,
REQUEST_REASON_SHUTDOWN,
REQUEST_REASON_HANDOVER,
@@ -77,6 +81,8 @@
@Retention(RetentionPolicy.SOURCE)
public @interface DeactivateDataReason {}
+ /** The reason of the data request is unknown */
+ public static final int REQUEST_REASON_UNKNOWN = 0;
/** The reason of the data request is normal */
public static final int REQUEST_REASON_NORMAL = 1;
@@ -94,7 +100,7 @@
private static final int DATA_SERVICE_REQUEST_DEACTIVATE_DATA_CALL = 5;
private static final int DATA_SERVICE_REQUEST_SET_INITIAL_ATTACH_APN = 6;
private static final int DATA_SERVICE_REQUEST_SET_DATA_PROFILE = 7;
- private static final int DATA_SERVICE_REQUEST_GET_DATA_CALL_LIST = 8;
+ private static final int DATA_SERVICE_REQUEST_REQUEST_DATA_CALL_LIST = 8;
private static final int DATA_SERVICE_REQUEST_REGISTER_DATA_CALL_LIST_CHANGED = 9;
private static final int DATA_SERVICE_REQUEST_UNREGISTER_DATA_CALL_LIST_CHANGED = 10;
private static final int DATA_SERVICE_INDICATION_DATA_CALL_LIST_CHANGED = 11;
@@ -149,14 +155,13 @@
* {@link #REQUEST_REASON_HANDOVER}.
* @param linkProperties If {@code reason} is {@link #REQUEST_REASON_HANDOVER}, this is the
* link properties of the existing data connection, otherwise null.
- * @param callback The result callback for this request. Null if the client does not care
- * about the result.
+ * @param callback The result callback for this request.
*/
public void setupDataCall(int accessNetworkType, @NonNull DataProfile dataProfile,
boolean isRoaming, boolean allowRoaming,
@SetupDataReason int reason,
@Nullable LinkProperties linkProperties,
- @Nullable DataServiceCallback callback) {
+ @NonNull DataServiceCallback callback) {
// The default implementation is to return unsupported.
if (callback != null) {
callback.onSetupDataCallComplete(DataServiceCallback.RESULT_ERROR_UNSUPPORTED,
@@ -190,11 +195,10 @@
*
* @param dataProfile Data profile used for data call setup. See {@link DataProfile}.
* @param isRoaming True if the device is data roaming.
- * @param callback The result callback for this request. Null if the client does not care
- * about the result.
+ * @param callback The result callback for this request.
*/
public void setInitialAttachApn(@NonNull DataProfile dataProfile, boolean isRoaming,
- @Nullable DataServiceCallback callback) {
+ @NonNull DataServiceCallback callback) {
// The default implementation is to return unsupported.
if (callback != null) {
callback.onSetInitialAttachApnComplete(
@@ -209,11 +213,10 @@
*
* @param dps A list of data profiles.
* @param isRoaming True if the device is data roaming.
- * @param callback The result callback for this request. Null if the client does not care
- * about the result.
+ * @param callback The result callback for this request.
*/
public void setDataProfile(@NonNull List<DataProfile> dps, boolean isRoaming,
- @Nullable DataServiceCallback callback) {
+ @NonNull DataServiceCallback callback) {
// The default implementation is to return unsupported.
if (callback != null) {
callback.onSetDataProfileComplete(DataServiceCallback.RESULT_ERROR_UNSUPPORTED);
@@ -225,9 +228,10 @@
*
* @param callback The result callback for this request.
*/
- public void getDataCallList(@NonNull DataServiceCallback callback) {
+ public void requestDataCallList(@NonNull DataServiceCallback callback) {
// The default implementation is to return unsupported.
- callback.onGetDataCallListComplete(DataServiceCallback.RESULT_ERROR_UNSUPPORTED, null);
+ callback.onRequestDataCallListComplete(DataServiceCallback.RESULT_ERROR_UNSUPPORTED,
+ null);
}
private void registerForDataCallListChanged(IDataServiceCallback callback) {
@@ -409,10 +413,10 @@
? new DataServiceCallback(setDataProfileRequest.callback)
: null);
break;
- case DATA_SERVICE_REQUEST_GET_DATA_CALL_LIST:
+ case DATA_SERVICE_REQUEST_REQUEST_DATA_CALL_LIST:
if (serviceProvider == null) break;
- serviceProvider.getDataCallList(new DataServiceCallback(
+ serviceProvider.requestDataCallList(new DataServiceCallback(
(IDataServiceCallback) message.obj));
break;
case DATA_SERVICE_REQUEST_REGISTER_DATA_CALL_LIST_CHANGED:
@@ -455,14 +459,14 @@
* will call this method after binding the data service for each active SIM slot id.
*
* @param slotIndex SIM slot id the data service associated with.
- * @return Data service object
+ * @return Data service object. Null if failed to create the provider (e.g. invalid slot index)
*/
@Nullable
public abstract DataServiceProvider onCreateDataServiceProvider(int slotIndex);
@Override
public IBinder onBind(Intent intent) {
- if (intent == null || !DATA_SERVICE_INTERFACE.equals(intent.getAction())) {
+ if (intent == null || !SERVICE_INTERFACE.equals(intent.getAction())) {
loge("Unexpected intent " + intent);
return null;
}
@@ -531,12 +535,12 @@
}
@Override
- public void getDataCallList(int slotIndex, IDataServiceCallback callback) {
+ public void requestDataCallList(int slotIndex, IDataServiceCallback callback) {
if (callback == null) {
- loge("getDataCallList: callback is null");
+ loge("requestDataCallList: callback is null");
return;
}
- mHandler.obtainMessage(DATA_SERVICE_REQUEST_GET_DATA_CALL_LIST, slotIndex, 0,
+ mHandler.obtainMessage(DATA_SERVICE_REQUEST_REQUEST_DATA_CALL_LIST, slotIndex, 0,
callback).sendToTarget();
}
diff --git a/telephony/java/android/telephony/data/DataServiceCallback.java b/telephony/java/android/telephony/data/DataServiceCallback.java
index 2d0cfe8..5d8d793 100644
--- a/telephony/java/android/telephony/data/DataServiceCallback.java
+++ b/telephony/java/android/telephony/data/DataServiceCallback.java
@@ -140,21 +140,21 @@
}
/**
- * Called to indicate result for the request {@link DataServiceProvider#getDataCallList(
+ * Called to indicate result for the request {@link DataServiceProvider#requestDataCallList(
* DataServiceCallback)}.
*
* @param result The result code. Must be one of the {@link ResultCode}.
* @param dataCallList List of the current active data connection. If no data call is presented,
* set it to an empty list.
*/
- public void onGetDataCallListComplete(@ResultCode int result,
- @NonNull List<DataCallResponse> dataCallList) {
+ public void onRequestDataCallListComplete(@ResultCode int result,
+ @NonNull List<DataCallResponse> dataCallList) {
IDataServiceCallback callback = mCallback.get();
if (callback != null) {
try {
- callback.onGetDataCallListComplete(result, dataCallList);
+ callback.onRequestDataCallListComplete(result, dataCallList);
} catch (RemoteException e) {
- Rlog.e(TAG, "Failed to onGetDataCallListComplete on the remote");
+ Rlog.e(TAG, "Failed to onRequestDataCallListComplete on the remote");
}
}
}
diff --git a/telephony/java/android/telephony/data/IDataService.aidl b/telephony/java/android/telephony/data/IDataService.aidl
index d4d9be8..9c74dcc 100644
--- a/telephony/java/android/telephony/data/IDataService.aidl
+++ b/telephony/java/android/telephony/data/IDataService.aidl
@@ -35,7 +35,7 @@
IDataServiceCallback callback);
void setDataProfile(int slotId, in List<DataProfile> dps, boolean isRoaming,
IDataServiceCallback callback);
- void getDataCallList(int slotId, IDataServiceCallback callback);
+ void requestDataCallList(int slotId, IDataServiceCallback callback);
void registerForDataCallListChanged(int slotId, IDataServiceCallback callback);
void unregisterForDataCallListChanged(int slotId, IDataServiceCallback callback);
}
diff --git a/telephony/java/android/telephony/data/IDataServiceCallback.aidl b/telephony/java/android/telephony/data/IDataServiceCallback.aidl
index 856185b..cec757d 100644
--- a/telephony/java/android/telephony/data/IDataServiceCallback.aidl
+++ b/telephony/java/android/telephony/data/IDataServiceCallback.aidl
@@ -28,6 +28,6 @@
void onDeactivateDataCallComplete(int result);
void onSetInitialAttachApnComplete(int result);
void onSetDataProfileComplete(int result);
- void onGetDataCallListComplete(int result, in List<DataCallResponse> dataCallList);
+ void onRequestDataCallListComplete(int result, in List<DataCallResponse> dataCallList);
void onDataCallListChanged(in List<DataCallResponse> dataCallList);
}
diff --git a/telephony/java/android/telephony/data/IQualifiedNetworksService.aidl b/telephony/java/android/telephony/data/IQualifiedNetworksService.aidl
index 9c80cb7..3bf09bc 100644
--- a/telephony/java/android/telephony/data/IQualifiedNetworksService.aidl
+++ b/telephony/java/android/telephony/data/IQualifiedNetworksService.aidl
@@ -23,6 +23,6 @@
*/
interface IQualifiedNetworksService
{
- oneway void createNetworkAvailabilityUpdater(int slotId, IQualifiedNetworksServiceCallback callback);
- oneway void removeNetworkAvailabilityUpdater(int slotId);
+ oneway void createNetworkAvailabilityProvider(int slotId, IQualifiedNetworksServiceCallback callback);
+ oneway void removeNetworkAvailabilityProvider(int slotId);
}
diff --git a/telephony/java/android/telephony/data/QualifiedNetworksService.java b/telephony/java/android/telephony/data/QualifiedNetworksService.java
index c38f278..0e1751d 100644
--- a/telephony/java/android/telephony/data/QualifiedNetworksService.java
+++ b/telephony/java/android/telephony/data/QualifiedNetworksService.java
@@ -17,7 +17,6 @@
package android.telephony.data;
import android.annotation.NonNull;
-import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.app.Service;
import android.content.Intent;
@@ -34,14 +33,21 @@
import com.android.internal.annotations.VisibleForTesting;
+import java.util.List;
+
/**
- * Base class of the qualified networks service. Services that extend QualifiedNetworksService must
- * register the service in their AndroidManifest to be detected by the framework. They must be
- * protected by the permission "android.permission.BIND_TELEPHONY_QUALIFIED_NETWORKS_SERVICE".
- * The qualified networks service definition in the manifest must follow the following format:
+ * Base class of the qualified networks service, which is a vendor service providing up-to-date
+ * qualified network information to the frameworks for data handover control. A qualified network
+ * is defined as an access network that is ready for bringing up data connection for given APN
+ * types.
+ *
+ * Services that extend QualifiedNetworksService must register the service in their AndroidManifest
+ * to be detected by the framework. They must be protected by the permission
+ * "android.permission.BIND_TELEPHONY_DATA_SERVICE". The qualified networks service definition in
+ * the manifest must follow the following format:
* ...
* <service android:name=".xxxQualifiedNetworksService"
- * android:permission="android.permission.BIND_TELEPHONY_QUALIFIED_NETWORKS_SERVICE" >
+ * android:permission="android.permission.BIND_TELEPHONY_DATA_SERVICE" >
* <intent-filter>
* <action android:name="android.telephony.data.QualifiedNetworksService" />
* </intent-filter>
@@ -55,28 +61,28 @@
public static final String QUALIFIED_NETWORKS_SERVICE_INTERFACE =
"android.telephony.data.QualifiedNetworksService";
- private static final int QNS_CREATE_NETWORK_AVAILABILITY_UPDATER = 1;
- private static final int QNS_REMOVE_NETWORK_AVAILABILITY_UPDATER = 2;
- private static final int QNS_REMOVE_ALL_NETWORK_AVAILABILITY_UPDATERS = 3;
+ private static final int QNS_CREATE_NETWORK_AVAILABILITY_PROVIDER = 1;
+ private static final int QNS_REMOVE_NETWORK_AVAILABILITY_PROVIDER = 2;
+ private static final int QNS_REMOVE_ALL_NETWORK_AVAILABILITY_PROVIDERS = 3;
private static final int QNS_UPDATE_QUALIFIED_NETWORKS = 4;
private final HandlerThread mHandlerThread;
private final QualifiedNetworksServiceHandler mHandler;
- private final SparseArray<NetworkAvailabilityUpdater> mUpdaters = new SparseArray<>();
+ private final SparseArray<NetworkAvailabilityProvider> mProviders = new SparseArray<>();
/** @hide */
@VisibleForTesting
public final IQualifiedNetworksServiceWrapper mBinder = new IQualifiedNetworksServiceWrapper();
/**
- * The abstract class of the network availability updater implementation. The vendor qualified
+ * The abstract class of the network availability provider implementation. The vendor qualified
* network service must extend this class to report the available networks for data
- * connection setup. Note that each instance of network availability updater is associated with
+ * connection setup. Note that each instance of network availability provider is associated with
* one physical SIM slot.
*/
- public abstract class NetworkAvailabilityUpdater implements AutoCloseable {
+ public abstract class NetworkAvailabilityProvider implements AutoCloseable {
private final int mSlotIndex;
private IQualifiedNetworksServiceCallback mCallback;
@@ -89,14 +95,14 @@
/**
* Constructor
- * @param slotIndex SIM slot index the network availability updater associated with.
+ * @param slotIndex SIM slot index the network availability provider associated with.
*/
- public NetworkAvailabilityUpdater(int slotIndex) {
+ public NetworkAvailabilityProvider(int slotIndex) {
mSlotIndex = slotIndex;
}
/**
- * @return SIM slot index the network availability updater associated with.
+ * @return SIM slot index the network availability provider associated with.
*/
public final int getSlotIndex() {
return mSlotIndex;
@@ -121,7 +127,7 @@
}
/**
- * Update the qualified networks list. Network availability updater must invoke this method
+ * Update the qualified networks list. Network availability provider must invoke this method
* whenever the qualified networks changes. If this method is never invoked for certain
* APN types, then frameworks will always use the default (i.e. cellular) data and network
* service.
@@ -129,14 +135,16 @@
* @param apnTypes APN types of the qualified networks. This must be a bitmask combination
* of {@link ApnSetting.ApnType}.
* @param qualifiedNetworkTypes List of network types which are qualified for data
- * connection setup for {@link @apnType} in the preferred order. Each element in the array
- * is a {@link AccessNetworkType}. An empty list or null indicates no networks are qualified
+ * connection setup for {@link @apnType} in the preferred order. Each element in the list
+ * is a {@link AccessNetworkType}. An empty list indicates no networks are qualified
* for data setup.
*/
- public final void updateQualifiedNetworkTypes(@ApnType int apnTypes,
- @Nullable int[] qualifiedNetworkTypes) {
+ public final void updateQualifiedNetworkTypes(
+ @ApnType int apnTypes, @NonNull List<Integer> qualifiedNetworkTypes) {
+ int[] qualifiedNetworkTypesArray =
+ qualifiedNetworkTypes.stream().mapToInt(i->i).toArray();
mHandler.obtainMessage(QNS_UPDATE_QUALIFIED_NETWORKS, mSlotIndex, apnTypes,
- qualifiedNetworkTypes).sendToTarget();
+ qualifiedNetworkTypesArray).sendToTarget();
}
private void onUpdateQualifiedNetworkTypes(@ApnType int apnTypes,
@@ -152,7 +160,7 @@
}
/**
- * Called when the qualified networks updater is removed. The extended class should
+ * Called when the qualified networks provider is removed. The extended class should
* implement this method to perform cleanup works.
*/
@Override
@@ -168,48 +176,48 @@
public void handleMessage(Message message) {
IQualifiedNetworksServiceCallback callback;
final int slotIndex = message.arg1;
- NetworkAvailabilityUpdater updater = mUpdaters.get(slotIndex);
+ NetworkAvailabilityProvider provider = mProviders.get(slotIndex);
switch (message.what) {
- case QNS_CREATE_NETWORK_AVAILABILITY_UPDATER:
- if (mUpdaters.get(slotIndex) != null) {
- loge("Network availability updater for slot " + slotIndex
+ case QNS_CREATE_NETWORK_AVAILABILITY_PROVIDER:
+ if (mProviders.get(slotIndex) != null) {
+ loge("Network availability provider for slot " + slotIndex
+ " already existed.");
return;
}
- updater = createNetworkAvailabilityUpdater(slotIndex);
- if (updater != null) {
- mUpdaters.put(slotIndex, updater);
+ provider = onCreateNetworkAvailabilityProvider(slotIndex);
+ if (provider != null) {
+ mProviders.put(slotIndex, provider);
callback = (IQualifiedNetworksServiceCallback) message.obj;
- updater.registerForQualifiedNetworkTypesChanged(callback);
+ provider.registerForQualifiedNetworkTypesChanged(callback);
} else {
- loge("Failed to create network availability updater. slot index = "
+ loge("Failed to create network availability provider. slot index = "
+ slotIndex);
}
break;
- case QNS_REMOVE_NETWORK_AVAILABILITY_UPDATER:
- if (updater != null) {
- updater.close();
- mUpdaters.remove(slotIndex);
+ case QNS_REMOVE_NETWORK_AVAILABILITY_PROVIDER:
+ if (provider != null) {
+ provider.close();
+ mProviders.remove(slotIndex);
}
break;
- case QNS_REMOVE_ALL_NETWORK_AVAILABILITY_UPDATERS:
- for (int i = 0; i < mUpdaters.size(); i++) {
- updater = mUpdaters.get(i);
- if (updater != null) {
- updater.close();
+ case QNS_REMOVE_ALL_NETWORK_AVAILABILITY_PROVIDERS:
+ for (int i = 0; i < mProviders.size(); i++) {
+ provider = mProviders.get(i);
+ if (provider != null) {
+ provider.close();
}
}
- mUpdaters.clear();
+ mProviders.clear();
break;
case QNS_UPDATE_QUALIFIED_NETWORKS:
- if (updater == null) break;
- updater.onUpdateQualifiedNetworkTypes(message.arg2, (int[]) message.obj);
+ if (provider == null) break;
+ provider.onUpdateQualifiedNetworkTypes(message.arg2, (int[]) message.obj);
break;
}
}
@@ -227,8 +235,8 @@
}
/**
- * Create the instance of {@link NetworkAvailabilityUpdater}. Vendor qualified network service
- * must override this method to facilitate the creation of {@link NetworkAvailabilityUpdater}
+ * Create the instance of {@link NetworkAvailabilityProvider}. Vendor qualified network service
+ * must override this method to facilitate the creation of {@link NetworkAvailabilityProvider}
* instances. The system will call this method after binding the qualified networks service for
* each active SIM slot index.
*
@@ -236,7 +244,7 @@
* @return Qualified networks service instance
*/
@NonNull
- public abstract NetworkAvailabilityUpdater createNetworkAvailabilityUpdater(int slotIndex);
+ public abstract NetworkAvailabilityProvider onCreateNetworkAvailabilityProvider(int slotIndex);
/** @hide */
@Override
@@ -251,7 +259,7 @@
/** @hide */
@Override
public boolean onUnbind(Intent intent) {
- mHandler.obtainMessage(QNS_REMOVE_ALL_NETWORK_AVAILABILITY_UPDATERS).sendToTarget();
+ mHandler.obtainMessage(QNS_REMOVE_ALL_NETWORK_AVAILABILITY_PROVIDERS).sendToTarget();
return false;
}
@@ -267,15 +275,15 @@
*/
private class IQualifiedNetworksServiceWrapper extends IQualifiedNetworksService.Stub {
@Override
- public void createNetworkAvailabilityUpdater(int slotIndex,
- IQualifiedNetworksServiceCallback callback) {
- mHandler.obtainMessage(QNS_CREATE_NETWORK_AVAILABILITY_UPDATER, slotIndex, 0,
+ public void createNetworkAvailabilityProvider(int slotIndex,
+ IQualifiedNetworksServiceCallback callback) {
+ mHandler.obtainMessage(QNS_CREATE_NETWORK_AVAILABILITY_PROVIDER, slotIndex, 0,
callback).sendToTarget();
}
@Override
- public void removeNetworkAvailabilityUpdater(int slotIndex) {
- mHandler.obtainMessage(QNS_REMOVE_NETWORK_AVAILABILITY_UPDATER, slotIndex, 0)
+ public void removeNetworkAvailabilityProvider(int slotIndex) {
+ mHandler.obtainMessage(QNS_REMOVE_NETWORK_AVAILABILITY_PROVIDER, slotIndex, 0)
.sendToTarget();
}
}
diff --git a/telephony/java/android/telephony/emergency/EmergencyNumber.java b/telephony/java/android/telephony/emergency/EmergencyNumber.java
index e68256d..397975f 100644
--- a/telephony/java/android/telephony/emergency/EmergencyNumber.java
+++ b/telephony/java/android/telephony/emergency/EmergencyNumber.java
@@ -302,7 +302,7 @@
*
* @return the dialing number.
*/
- public String getNumber() {
+ public @NonNull String getNumber() {
return mNumber;
}
@@ -311,7 +311,7 @@
*
* @return the country code string (lowercase character) in ISO 3166 format.
*/
- public String getCountryIso() {
+ public @NonNull String getCountryIso() {
return mCountryIso;
}
@@ -320,7 +320,7 @@
*
* @return the Mobile Network Code of the emergency number.
*/
- public String getMnc() {
+ public @NonNull String getMnc() {
return mMnc;
}
@@ -328,6 +328,8 @@
* Returns the bitmask of emergency service categories of the emergency number.
*
* @return bitmask of the emergency service categories
+ *
+ * @hide
*/
public @EmergencyServiceCategories int getEmergencyServiceCategoryBitmask() {
return mEmergencyServiceCategoryBitmask;
@@ -357,7 +359,7 @@
*
* @return a list of the emergency service categories
*/
- public List<Integer> getEmergencyServiceCategories() {
+ public @NonNull List<Integer> getEmergencyServiceCategories() {
List<Integer> categories = new ArrayList<>();
if (serviceUnspecified()) {
categories.add(EMERGENCY_SERVICE_CATEGORY_UNSPECIFIED);
@@ -384,7 +386,7 @@
* number does not have a specified emergency Uniform Resource Name.
*/
public @NonNull List<String> getEmergencyUrns() {
- return mEmergencyUrns;
+ return Collections.unmodifiableList(mEmergencyUrns);
}
/**
@@ -421,6 +423,8 @@
* Returns the bitmask of the sources of the emergency number.
*
* @return bitmask of the emergency number sources
+ *
+ * @hide
*/
public @EmergencyNumberSources int getEmergencyNumberSourceBitmask() {
return mEmergencyNumberSourceBitmask;
@@ -431,7 +435,7 @@
*
* @return a list of emergency number sources
*/
- public List<Integer> getEmergencyNumberSources() {
+ public @NonNull List<Integer> getEmergencyNumberSources() {
List<Integer> sources = new ArrayList<>();
for (Integer source : EMERGENCY_NUMBER_SOURCE_SET) {
if ((mEmergencyNumberSourceBitmask & source) == source) {
diff --git a/telephony/java/android/telephony/euicc/EuiccManager.java b/telephony/java/android/telephony/euicc/EuiccManager.java
index b8a07e4..f1a5778 100644
--- a/telephony/java/android/telephony/euicc/EuiccManager.java
+++ b/telephony/java/android/telephony/euicc/EuiccManager.java
@@ -119,7 +119,11 @@
/**
* Intent action sent by system apps (such as the Settings app) to the Telephony framework to
* enable or disable a subscription. Must be accompanied with {@link #EXTRA_SUBSCRIPTION_ID} and
- * {@link #EXTRA_ENABLE_SUBSCRIPTION}.
+ * {@link #EXTRA_ENABLE_SUBSCRIPTION}, and optionally {@link #EXTRA_FROM_SUBSCRIPTION_ID}.
+ *
+ * <p>Requires the caller to be a privileged process with the
+ * {@link android.permission#CALL_PRIVILEGED} permission for the intent to reach the Telephony
+ * stack.
*
* <p>Unlike {@link #switchToSubscription(int, PendingIntent)}, using this action allows the
* underlying eUICC service (i.e. the LPA app) to control the UI experience during this
@@ -140,6 +144,10 @@
* Intent action sent by system apps (such as the Settings app) to the Telephony framework to
* delete a subscription. Must be accompanied with {@link #EXTRA_SUBSCRIPTION_ID}.
*
+ * <p>Requires the caller to be a privileged process with the
+ * {@link android.permission#CALL_PRIVILEGED} permission for the intent to reach the Telephony
+ * stack.
+ *
* <p>Unlike {@link #deleteSubscription(int, PendingIntent)}, using this action allows the
* underlying eUICC service (i.e. the LPA app) to control the UI experience during this
* operation. The action is received by the Telephony framework, which in turn selects and
@@ -160,6 +168,10 @@
* rename a subscription. Must be accompanied with {@link #EXTRA_SUBSCRIPTION_ID} and
* {@link #EXTRA_SUBSCRIPTION_NICKNAME}.
*
+ * <p>Requires the caller to be a privileged process with the
+ * {@link android.permission#CALL_PRIVILEGED} permission for the intent to reach the Telephony
+ * stack.
+ *
* <p>Unlike {@link #updateSubscriptionNickname(int, String, PendingIntent)}, using this action
* allows the the underlying eUICC service (i.e. the LPA app) to control the UI experience
* during this operation. The action is received by the Telephony framework, which in turn
@@ -260,6 +272,8 @@
* {@link #ACTION_DELETE_SUBSCRIPTION_PRIVILEGED}, and
* {@link #ACTION_RENAME_SUBSCRIPTION_PRIVILEGED} providing the ID of the targeted subscription.
*
+ * <p>Expected type of the extra data: int
+ *
* @hide
*/
@SystemApi
@@ -270,6 +284,8 @@
* Key for an extra set on {@link #ACTION_TOGGLE_SUBSCRIPTION_PRIVILEGED} providing a boolean
* value of whether to enable or disable the targeted subscription.
*
+ * <p>Expected type of the extra data: boolean
+ *
* @hide
*/
@SystemApi
@@ -280,6 +296,8 @@
* Key for an extra set on {@link #ACTION_RENAME_SUBSCRIPTION_PRIVILEGED} providing a new
* nickname for the targeted subscription.
*
+ * <p>Expected type of the extra data: String
+ *
* @hide
*/
@SystemApi
@@ -287,6 +305,22 @@
"android.telephony.euicc.extra.SUBSCRIPTION_NICKNAME";
/**
+ * Key for an extra set on {@link #ACTION_TOGGLE_SUBSCRIPTION_PRIVILEGED} providing the ID of
+ * the subscription we're toggling from. This extra is optional and is only used for UI
+ * purposes by the underlying eUICC service (i.e. the LPA app), such as displaying a dialog
+ * titled "Switch X with Y". If set, the provided subscription will be used as the "from"
+ * subscription in UI (the "X" in the dialog example). Otherwise, the currently active
+ * subscription that will be disabled is the "from" subscription.
+ *
+ * <p>Expected type of the extra data: int
+ *
+ * @hide
+ */
+ @SystemApi
+ public static final String EXTRA_FROM_SUBSCRIPTION_ID =
+ "android.telephony.euicc.extra.FROM_SUBSCRIPTION_ID";
+
+ /**
* Optional meta-data attribute for a carrier app providing an icon to use to represent the
* carrier. If not provided, the app's launcher icon will be used as a fallback.
*/
diff --git a/telephony/java/android/telephony/ims/ImsCallProfile.java b/telephony/java/android/telephony/ims/ImsCallProfile.java
index 907dbbd..568c11b 100644
--- a/telephony/java/android/telephony/ims/ImsCallProfile.java
+++ b/telephony/java/android/telephony/ims/ImsCallProfile.java
@@ -17,6 +17,7 @@
package android.telephony.ims;
import android.annotation.IntDef;
+import android.annotation.NonNull;
import android.annotation.SystemApi;
import android.annotation.UnsupportedAppUsage;
import android.os.Bundle;
@@ -837,7 +838,7 @@
* 3gpp 22.101, Section 10 - Emergency Calls.
*/
@VisibleForTesting
- public void setEmergencyUrns(List<String> emergencyUrns) {
+ public void setEmergencyUrns(@NonNull List<String> emergencyUrns) {
mEmergencyUrns = emergencyUrns;
}
@@ -911,7 +912,7 @@
* Reference: 3gpp 24.503, Section 5.1.6.8.1 - General;
* 3gpp 22.101, Section 10 - Emergency Calls.
*/
- public List<String> getEmergencyUrns() {
+ public @NonNull List<String> getEmergencyUrns() {
return mEmergencyUrns;
}
diff --git a/telephony/java/android/telephony/ims/ImsException.java b/telephony/java/android/telephony/ims/ImsException.java
index bdaad5b..8c686f7 100644
--- a/telephony/java/android/telephony/ims/ImsException.java
+++ b/telephony/java/android/telephony/ims/ImsException.java
@@ -19,6 +19,7 @@
import android.annotation.IntDef;
import android.annotation.Nullable;
import android.annotation.SystemApi;
+import android.content.pm.PackageManager;
import android.text.TextUtils;
import java.lang.annotation.Retention;
@@ -30,7 +31,7 @@
* @hide
*/
@SystemApi
-public class ImsException extends Exception {
+public final class ImsException extends Exception {
/**
* The operation has failed due to an unknown or unspecified error.
@@ -48,7 +49,9 @@
/**
* This device or carrier configuration does not support IMS for this subscription.
* <p>
- * This is a permanent configuration error and there should be no retry.
+ * This is a permanent configuration error and there should be no retry. Usually this is
+ * because {@link PackageManager#FEATURE_TELEPHONY_IMS} is not available
+ * or the device has no ImsService implementation to service this request.
*/
public static final int CODE_ERROR_UNSUPPORTED_OPERATION = 2;
diff --git a/telephony/java/android/telephony/ims/ImsMmTelManager.java b/telephony/java/android/telephony/ims/ImsMmTelManager.java
index 10457fc..e9aede7 100644
--- a/telephony/java/android/telephony/ims/ImsMmTelManager.java
+++ b/telephony/java/android/telephony/ims/ImsMmTelManager.java
@@ -25,6 +25,8 @@
import android.annotation.RequiresPermission;
import android.annotation.SystemApi;
import android.content.Context;
+import android.content.pm.IPackageManager;
+import android.content.pm.PackageManager;
import android.net.Uri;
import android.os.Binder;
import android.os.RemoteException;
@@ -314,7 +316,7 @@
private int mSubId;
/**
- * Create an instance of ImsManager for the subscription id specified.
+ * Create an instance of {@link ImsMmTelManager} for the subscription id specified.
*
* @param subId The ID of the subscription that this ImsMmTelManager will use.
* @see android.telephony.SubscriptionManager#getActiveSubscriptionInfoList()
@@ -366,12 +368,14 @@
if (executor == null) {
throw new IllegalArgumentException("Must include a non-null Executor.");
}
+ if (!isImsAvailableOnDevice()) {
+ throw new ImsException("IMS not available on device.",
+ ImsException.CODE_ERROR_UNSUPPORTED_OPERATION);
+ }
c.setExecutor(executor);
try {
getITelephony().registerImsRegistrationCallback(mSubId, c.getBinder());
- } catch (RemoteException e) {
- throw e.rethrowAsRuntimeException();
- } catch (IllegalStateException e) {
+ } catch (RemoteException | IllegalStateException e) {
throw new ImsException(e.getMessage(), ImsException.CODE_ERROR_SERVICE_UNAVAILABLE);
}
}
@@ -434,6 +438,10 @@
if (executor == null) {
throw new IllegalArgumentException("Must include a non-null Executor.");
}
+ if (!isImsAvailableOnDevice()) {
+ throw new ImsException("IMS not available on device.",
+ ImsException.CODE_ERROR_UNSUPPORTED_OPERATION);
+ }
c.setExecutor(executor);
try {
getITelephony().registerMmTelCapabilityCallback(mSubId, c.getBinder());
@@ -800,6 +808,22 @@
}
}
+ private static boolean isImsAvailableOnDevice() {
+ IPackageManager pm = IPackageManager.Stub.asInterface(ServiceManager.getService("package"));
+ if (pm == null) {
+ // For some reason package manger is not available.. This will fail internally anyways,
+ // so do not throw error and allow.
+ return true;
+ }
+ try {
+ return pm.hasSystemFeature(PackageManager.FEATURE_TELEPHONY_IMS, 0);
+ } catch (RemoteException e) {
+ // For some reason package manger is not available.. This will fail internally anyways,
+ // so do not throw error and allow.
+ }
+ return true;
+ }
+
private static ITelephony getITelephony() {
ITelephony binder = ITelephony.Stub.asInterface(
ServiceManager.getService(Context.TELEPHONY_SERVICE));
diff --git a/telephony/java/android/telephony/ims/ImsReasonInfo.java b/telephony/java/android/telephony/ims/ImsReasonInfo.java
index d8d2d9e..ace3caf 100644
--- a/telephony/java/android/telephony/ims/ImsReasonInfo.java
+++ b/telephony/java/android/telephony/ims/ImsReasonInfo.java
@@ -142,6 +142,11 @@
* Call was disconnected because a handover is not feasible due to network conditions.
*/
public static final int CODE_LOCAL_HO_NOT_FEASIBLE = 149;
+ /**
+ * This device does not support IMS.
+ * @hide
+ */
+ public static final int CODE_LOCAL_IMS_NOT_SUPPORTED_ON_DEVICE = 150;
/*
* TIMEOUT (IMS -> Telephony)
diff --git a/telephony/java/android/telephony/ims/ProvisioningManager.java b/telephony/java/android/telephony/ims/ProvisioningManager.java
index d12cda8..8cdf6a2 100644
--- a/telephony/java/android/telephony/ims/ProvisioningManager.java
+++ b/telephony/java/android/telephony/ims/ProvisioningManager.java
@@ -24,6 +24,8 @@
import android.annotation.SystemApi;
import android.annotation.WorkerThread;
import android.content.Context;
+import android.content.pm.IPackageManager;
+import android.content.pm.PackageManager;
import android.os.Binder;
import android.os.RemoteException;
import android.os.ServiceManager;
@@ -209,12 +211,14 @@
@RequiresPermission(Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
public void registerProvisioningChangedCallback(@NonNull @CallbackExecutor Executor executor,
@NonNull Callback callback) throws ImsException {
+ if (!isImsAvailableOnDevice()) {
+ throw new ImsException("IMS not available on device.",
+ ImsException.CODE_ERROR_UNSUPPORTED_OPERATION);
+ }
callback.setExecutor(executor);
try {
getITelephony().registerImsProvisioningChangedCallback(mSubId, callback.getBinder());
- } catch (RemoteException e) {
- throw e.rethrowAsRuntimeException();
- } catch (IllegalStateException e) {
+ } catch (RemoteException | IllegalStateException e) {
throw new ImsException(e.getMessage(), ImsException.CODE_ERROR_SERVICE_UNAVAILABLE);
}
}
@@ -232,8 +236,7 @@
@RequiresPermission(Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
public void unregisterProvisioningChangedCallback(@NonNull Callback callback) {
try {
- getITelephony().unregisterImsProvisioningChangedCallback(mSubId,
- callback.getBinder());
+ getITelephony().unregisterImsProvisioningChangedCallback(mSubId, callback.getBinder());
} catch (RemoteException e) {
throw e.rethrowAsRuntimeException();
}
@@ -373,6 +376,22 @@
}
}
+ private static boolean isImsAvailableOnDevice() {
+ IPackageManager pm = IPackageManager.Stub.asInterface(ServiceManager.getService("package"));
+ if (pm == null) {
+ // For some reason package manger is not available.. This will fail internally anyways,
+ // so do not throw error and allow.
+ return true;
+ }
+ try {
+ return pm.hasSystemFeature(PackageManager.FEATURE_TELEPHONY_IMS, 0);
+ } catch (RemoteException e) {
+ // For some reason package manger is not available.. This will fail internally anyways,
+ // so do not throw error and allow.
+ }
+ return true;
+ }
+
private static ITelephony getITelephony() {
ITelephony binder = ITelephony.Stub.asInterface(
ServiceManager.getService(Context.TELEPHONY_SERVICE));
diff --git a/telephony/java/android/telephony/ims/feature/ImsFeature.java b/telephony/java/android/telephony/ims/feature/ImsFeature.java
index b55866b..5e3f398 100644
--- a/telephony/java/android/telephony/ims/feature/ImsFeature.java
+++ b/telephony/java/android/telephony/ims/feature/ImsFeature.java
@@ -210,6 +210,7 @@
/**
* Contains the capabilities defined and supported by an ImsFeature in the form of a bit mask.
* @hide
+ * @deprecated Use {@link MmTelFeature.MmTelCapabilities} instead.
*/
@SystemApi // SystemApi only because it was leaked through type usage in a previous release.
public static class Capabilities {
diff --git a/telephony/java/com/android/internal/telephony/ITelephony.aidl b/telephony/java/com/android/internal/telephony/ITelephony.aidl
index 9e1332a..cbb9b88 100644
--- a/telephony/java/com/android/internal/telephony/ITelephony.aidl
+++ b/telephony/java/com/android/internal/telephony/ITelephony.aidl
@@ -553,6 +553,20 @@
void setCellInfoListRate(int rateInMillis);
/**
+ * Opens a logical channel to the ICC card using the physical slot index.
+ *
+ * Input parameters equivalent to TS 27.007 AT+CCHO command.
+ *
+ * @param slotIndex The physical slot index of the target ICC card
+ * @param callingPackage the name of the package making the call.
+ * @param AID Application id. See ETSI 102.221 and 101.220.
+ * @param p2 P2 parameter (described in ISO 7816-4).
+ * @return an IccOpenLogicalChannelResponse object.
+ */
+ IccOpenLogicalChannelResponse iccOpenLogicalChannelBySlot(
+ int slotIndex, String callingPackage, String AID, int p2);
+
+ /**
* Opens a logical channel to the ICC card.
*
* Input parameters equivalent to TS 27.007 AT+CCHO command.
@@ -567,12 +581,24 @@
int subId, String callingPackage, String AID, int p2);
/**
+ * Closes a previously opened logical channel to the ICC card using the physical slot index.
+ *
+ * Input parameters equivalent to TS 27.007 AT+CCHC command.
+ *
+ * @param slotIndex The physical slot index of the target ICC card
+ * @param channel is the channel id to be closed as returned by a
+ * successful iccOpenLogicalChannel.
+ * @return true if the channel was closed successfully.
+ */
+ boolean iccCloseLogicalChannelBySlot(int slotIndex, int channel);
+
+ /**
* Closes a previously opened logical channel to the ICC card.
*
* Input parameters equivalent to TS 27.007 AT+CCHC command.
*
* @param subId The subscription to use.
- * @param channel is the channel id to be closed as retruned by a
+ * @param channel is the channel id to be closed as returned by a
* successful iccOpenLogicalChannel.
* @return true if the channel was closed successfully.
*/
@@ -580,12 +606,33 @@
boolean iccCloseLogicalChannel(int subId, int channel);
/**
+ * Transmit an APDU to the ICC card over a logical channel using the physical slot index.
+ *
+ * Input parameters equivalent to TS 27.007 AT+CGLA command.
+ *
+ * @param slotIndex The physical slot index of the target ICC card
+ * @param channel is the channel id to be closed as returned by a
+ * successful iccOpenLogicalChannel.
+ * @param cla Class of the APDU command.
+ * @param instruction Instruction of the APDU command.
+ * @param p1 P1 value of the APDU command.
+ * @param p2 P2 value of the APDU command.
+ * @param p3 P3 value of the APDU command. If p3 is negative a 4 byte APDU
+ * is sent to the SIM.
+ * @param data Data to be sent with the APDU.
+ * @return The APDU response from the ICC card with the status appended at
+ * the end.
+ */
+ String iccTransmitApduLogicalChannelBySlot(int slotIndex, int channel, int cla, int instruction,
+ int p1, int p2, int p3, String data);
+
+ /**
* Transmit an APDU to the ICC card over a logical channel.
*
* Input parameters equivalent to TS 27.007 AT+CGLA command.
*
* @param subId The subscription to use.
- * @param channel is the channel id to be closed as retruned by a
+ * @param channel is the channel id to be closed as returned by a
* successful iccOpenLogicalChannel.
* @param cla Class of the APDU command.
* @param instruction Instruction of the APDU command.
@@ -602,6 +649,26 @@
int p1, int p2, int p3, String data);
/**
+ * Transmit an APDU to the ICC card over the basic channel using the physical slot index.
+ *
+ * Input parameters equivalent to TS 27.007 AT+CSIM command.
+ *
+ * @param slotIndex The physical slot index of the target ICC card
+ * @param callingPackage the name of the package making the call.
+ * @param cla Class of the APDU command.
+ * @param instruction Instruction of the APDU command.
+ * @param p1 P1 value of the APDU command.
+ * @param p2 P2 value of the APDU command.
+ * @param p3 P3 value of the APDU command. If p3 is negative a 4 byte APDU
+ * is sent to the SIM.
+ * @param data Data to be sent with the APDU.
+ * @return The APDU response from the ICC card with the status appended at
+ * the end.
+ */
+ String iccTransmitApduBasicChannelBySlot(int slotIndex, String callingPackage, int cla,
+ int instruction, int p1, int p2, int p3, String data);
+
+ /**
* Transmit an APDU to the ICC card over the basic channel.
*
* Input parameters equivalent to TS 27.007 AT+CSIM command.
@@ -1765,12 +1832,12 @@
/**
* Return the emergency number list from all the active subscriptions.
*/
- Map getCurrentEmergencyNumberList(String callingPackage);
+ Map getEmergencyNumberList(String callingPackage);
/**
* Identify if the number is emergency number, based on all the active subscriptions.
*/
- boolean isCurrentEmergencyNumber(String number, boolean exactMatch);
+ boolean isEmergencyNumber(String number, boolean exactMatch);
/**
* Return a list of certs in hex string from loaded carrier privileges access rules.
@@ -1844,15 +1911,18 @@
* Indicate if the enablement of multi SIM functionality is restricted.
* @hide
*/
- void setMultisimCarrierRestriction(boolean isMultisimCarrierRestricted);
+ void setMultiSimCarrierRestriction(boolean isMultiSimCarrierRestricted);
/**
* Returns if the usage of multiple SIM cards at the same time is supported.
*
* @param callingPackage The package making the call.
- * @return true if multisim is supported, false otherwise.
+ * @return {@link #MULTISIM_ALLOWED} if the device supports multiple SIMs.
+ * {@link #MULTISIM_NOT_SUPPORTED_BY_HARDWARE} if the device does not support multiple SIMs.
+ * {@link #MULTISIM_NOT_SUPPORTED_BY_CARRIER} in the device supports multiple SIMs, but the
+ * functionality is restricted by the carrier.
*/
- boolean isMultisimSupported(String callingPackage);
+ int isMultiSimSupported(String callingPackage);
/**
* Switch configs to enable multi-sim or switch back to single-sim
diff --git a/tests/ActivityManagerPerfTests/test-app/Android.bp b/tests/ActivityManagerPerfTests/test-app/Android.bp
new file mode 100644
index 0000000..ef9d587
--- /dev/null
+++ b/tests/ActivityManagerPerfTests/test-app/Android.bp
@@ -0,0 +1,21 @@
+// Copyright (C) 2018 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+android_test {
+ name: "ActivityManagerPerfTestsTestApp",
+ srcs: ["src/**/*.java"],
+ static_libs: ["ActivityManagerPerfTestsUtils"],
+ min_sdk_version: "25",
+ sdk_version: "current",
+}
diff --git a/tests/ActivityManagerPerfTests/test-app/Android.mk b/tests/ActivityManagerPerfTests/test-app/Android.mk
deleted file mode 100644
index 33d15d2..0000000
--- a/tests/ActivityManagerPerfTests/test-app/Android.mk
+++ /dev/null
@@ -1,31 +0,0 @@
-# Copyright (C) 2018 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-LOCAL_PATH := $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := tests
-
-LOCAL_SRC_FILES := \
- $(call all-java-files-under, src)
-
-LOCAL_STATIC_JAVA_LIBRARIES := \
- ActivityManagerPerfTestsUtils
-
-LOCAL_MIN_SDK_VERSION := 25
-
-LOCAL_PACKAGE_NAME := ActivityManagerPerfTestsTestApp
-LOCAL_SDK_VERSION := current
-
-include $(BUILD_PACKAGE)
diff --git a/tests/ActivityManagerPerfTests/tests/Android.bp b/tests/ActivityManagerPerfTests/tests/Android.bp
new file mode 100644
index 0000000..268715c
--- /dev/null
+++ b/tests/ActivityManagerPerfTests/tests/Android.bp
@@ -0,0 +1,27 @@
+// Copyright (C) 2018 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+android_test {
+ name: "ActivityManagerPerfTests",
+ srcs: ["src/**/*.java"],
+ static_libs: [
+ "android-support-test",
+ "apct-perftests-utils",
+ "ActivityManagerPerfTestsUtils",
+ ],
+ platform_apis: true,
+ min_sdk_version: "25",
+ // For android.permission.FORCE_STOP_PACKAGES permission
+ certificate: "platform",
+}
diff --git a/tests/ActivityManagerPerfTests/tests/Android.mk b/tests/ActivityManagerPerfTests/tests/Android.mk
deleted file mode 100644
index f23a665..0000000
--- a/tests/ActivityManagerPerfTests/tests/Android.mk
+++ /dev/null
@@ -1,36 +0,0 @@
-# Copyright (C) 2018 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-LOCAL_PATH := $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := tests
-
-LOCAL_SRC_FILES := \
- $(call all-java-files-under, src)
-
-LOCAL_STATIC_JAVA_LIBRARIES := \
- android-support-test \
- apct-perftests-utils \
- ActivityManagerPerfTestsUtils
-
-LOCAL_PACKAGE_NAME := ActivityManagerPerfTests
-LOCAL_PRIVATE_PLATFORM_APIS := true
-
-LOCAL_MIN_SDK_VERSION := 25
-
-# For android.permission.FORCE_STOP_PACKAGES permission
-LOCAL_CERTIFICATE := platform
-
-include $(BUILD_PACKAGE)
diff --git a/tests/ActivityManagerPerfTests/utils/Android.bp b/tests/ActivityManagerPerfTests/utils/Android.bp
new file mode 100644
index 0000000..c052656
--- /dev/null
+++ b/tests/ActivityManagerPerfTests/utils/Android.bp
@@ -0,0 +1,27 @@
+// Copyright (C) 2018 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+java_test {
+ name: "ActivityManagerPerfTestsUtils",
+ sdk_version: "current",
+ srcs: [
+ "src/**/*.java",
+ "src/com/android/frameworks/perftests/am/util/ITimeReceiverCallback.aidl",
+ ],
+ static_libs: [
+ "android-support-test",
+ "junit",
+ "ub-uiautomator",
+ ],
+}
diff --git a/tests/ActivityManagerPerfTests/utils/Android.mk b/tests/ActivityManagerPerfTests/utils/Android.mk
deleted file mode 100644
index 60c9423..0000000
--- a/tests/ActivityManagerPerfTests/utils/Android.mk
+++ /dev/null
@@ -1,32 +0,0 @@
-# Copyright (C) 2018 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-LOCAL_PATH := $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := tests
-LOCAL_SDK_VERSION := current
-
-LOCAL_SRC_FILES := \
- $(call all-java-files-under, src) \
- src/com/android/frameworks/perftests/am/util/ITimeReceiverCallback.aidl
-
-LOCAL_STATIC_JAVA_LIBRARIES := \
- android-support-test \
- junit \
- ub-uiautomator
-
-LOCAL_MODULE := ActivityManagerPerfTestsUtils
-
-include $(BUILD_STATIC_JAVA_LIBRARY)
diff --git a/tests/AppLaunch/Android.bp b/tests/AppLaunch/Android.bp
new file mode 100644
index 0000000..0f07da6
--- /dev/null
+++ b/tests/AppLaunch/Android.bp
@@ -0,0 +1,13 @@
+android_test {
+ name: "AppLaunch",
+ // Only compile source java files in this apk.
+ srcs: ["src/**/*.java"],
+ platform_apis: true,
+ certificate: "platform",
+ libs: [
+ "android.test.base",
+ "android.test.runner",
+ ],
+ static_libs: ["android-support-test"],
+ test_suites: ["device-tests"],
+}
diff --git a/tests/AppLaunch/Android.mk b/tests/AppLaunch/Android.mk
deleted file mode 100644
index 1fb548b..0000000
--- a/tests/AppLaunch/Android.mk
+++ /dev/null
@@ -1,22 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := tests
-
-# Only compile source java files in this apk.
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
-
-LOCAL_PACKAGE_NAME := AppLaunch
-LOCAL_PRIVATE_PLATFORM_APIS := true
-
-LOCAL_CERTIFICATE := platform
-LOCAL_JAVA_LIBRARIES := android.test.base android.test.runner
-
-LOCAL_STATIC_JAVA_LIBRARIES := android-support-test
-
-LOCAL_COMPATIBILITY_SUITE := device-tests
-
-include $(BUILD_PACKAGE)
-
-# Use the following include to make our test apk.
-include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/tests/AppLaunchWear/Android.bp b/tests/AppLaunchWear/Android.bp
new file mode 100644
index 0000000..6a8b382
--- /dev/null
+++ b/tests/AppLaunchWear/Android.bp
@@ -0,0 +1,13 @@
+android_test {
+ name: "AppLaunchWear",
+ // Only compile source java files in this apk.
+ srcs: ["src/**/*.java"],
+ platform_apis: true,
+ certificate: "platform",
+ libs: [
+ "android.test.base",
+ "android.test.runner",
+ ],
+ static_libs: ["android-support-test"],
+ test_suites: ["device-tests"],
+}
diff --git a/tests/AppLaunchWear/Android.mk b/tests/AppLaunchWear/Android.mk
deleted file mode 100644
index 6d08366..0000000
--- a/tests/AppLaunchWear/Android.mk
+++ /dev/null
@@ -1,22 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := tests
-
-# Only compile source java files in this apk.
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
-
-LOCAL_PACKAGE_NAME := AppLaunchWear
-LOCAL_PRIVATE_PLATFORM_APIS := true
-
-LOCAL_CERTIFICATE := platform
-LOCAL_JAVA_LIBRARIES := android.test.base android.test.runner
-
-LOCAL_STATIC_JAVA_LIBRARIES := android-support-test
-
-LOCAL_COMPATIBILITY_SUITE := device-tests
-
-include $(BUILD_PACKAGE)
-
-# Use the following include to make our test apk.
-include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/tests/BackgroundDexOptServiceIntegrationTests/Android.bp b/tests/BackgroundDexOptServiceIntegrationTests/Android.bp
new file mode 100644
index 0000000..036f845
--- /dev/null
+++ b/tests/BackgroundDexOptServiceIntegrationTests/Android.bp
@@ -0,0 +1,24 @@
+//
+// Copyright (C) 2017 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+android_test {
+ name: "BackgroundDexOptServiceIntegrationTests",
+ srcs: ["src/**/*.java"],
+ static_libs: ["android-support-test"],
+ platform_apis: true,
+ test_suites: ["device-tests"],
+ certificate: "platform",
+}
diff --git a/tests/BackgroundDexOptServiceIntegrationTests/Android.mk b/tests/BackgroundDexOptServiceIntegrationTests/Android.mk
deleted file mode 100644
index b10305d..0000000
--- a/tests/BackgroundDexOptServiceIntegrationTests/Android.mk
+++ /dev/null
@@ -1,35 +0,0 @@
-#
-# Copyright (C) 2017 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-# We only want this apk build for tests.
-LOCAL_MODULE_TAGS := tests
-
-# Include all test java files.
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
-
-LOCAL_STATIC_JAVA_LIBRARIES := \
- android-support-test \
-
-LOCAL_PACKAGE_NAME := BackgroundDexOptServiceIntegrationTests
-LOCAL_PRIVATE_PLATFORM_APIS := true
-LOCAL_COMPATIBILITY_SUITE := device-tests
-
-LOCAL_CERTIFICATE := platform
-
-include $(BUILD_PACKAGE)
diff --git a/tests/Compatibility/Android.bp b/tests/Compatibility/Android.bp
new file mode 100644
index 0000000..a0c3761
--- /dev/null
+++ b/tests/Compatibility/Android.bp
@@ -0,0 +1,22 @@
+// Copyright (C) 2012 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+android_test {
+ name: "AppCompatibilityTest",
+ static_libs: ["android-support-test"],
+ // Include all test java files.
+ srcs: ["src/**/*.java"],
+ platform_apis: true,
+ certificate: "platform",
+}
diff --git a/tests/Compatibility/Android.mk b/tests/Compatibility/Android.mk
deleted file mode 100644
index 9c47a26..0000000
--- a/tests/Compatibility/Android.mk
+++ /dev/null
@@ -1,31 +0,0 @@
-# Copyright (C) 2012 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-LOCAL_PATH := $(call my-dir)
-include $(CLEAR_VARS)
-
-# We only want this apk build for tests.
-LOCAL_MODULE_TAGS := tests
-LOCAL_STATIC_JAVA_LIBRARIES := android-support-test
-# Include all test java files.
-LOCAL_SRC_FILES := \
- $(call all-java-files-under, src)
-
-
-LOCAL_PACKAGE_NAME := AppCompatibilityTest
-LOCAL_PRIVATE_PLATFORM_APIS := true
-LOCAL_CERTIFICATE := platform
-include $(BUILD_PACKAGE)
-
-include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/tests/Internal/Android.bp b/tests/Internal/Android.bp
new file mode 100644
index 0000000..db3e03b
--- /dev/null
+++ b/tests/Internal/Android.bp
@@ -0,0 +1,18 @@
+android_test {
+ name: "InternalTests",
+ proto: {
+ type: "nano",
+ },
+ // Include some source files directly to be able to access package members
+ srcs: ["src/**/*.java"],
+ libs: ["android.test.runner"],
+ static_libs: [
+ "junit",
+ "android-support-test",
+ "mockito-target-minus-junit4",
+ ],
+ java_resource_dirs: ["res"],
+ certificate: "platform",
+ platform_apis: true,
+ test_suites: ["device-tests"],
+}
diff --git a/tests/Internal/Android.mk b/tests/Internal/Android.mk
deleted file mode 100644
index da56696..0000000
--- a/tests/Internal/Android.mk
+++ /dev/null
@@ -1,24 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_USE_AAPT2 := true
-LOCAL_MODULE_TAGS := tests
-
-LOCAL_PROTOC_OPTIMIZE_TYPE := nano
-
-# Include some source files directly to be able to access package members
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
-
-LOCAL_JAVA_LIBRARIES := android.test.runner
-LOCAL_STATIC_JAVA_LIBRARIES := junit \
- android-support-test \
- mockito-target-minus-junit4
-
-LOCAL_JAVA_RESOURCE_DIRS := res
-LOCAL_CERTIFICATE := platform
-
-LOCAL_PACKAGE_NAME := InternalTests
-LOCAL_PRIVATE_PLATFORM_APIS := true
-LOCAL_COMPATIBILITY_SUITE := device-tests
-
-include $(BUILD_PACKAGE)
diff --git a/tests/JankBench/app/src/main/jni/Android.bp.converted b/tests/JankBench/app/src/main/jni/Android.bp.converted
index 9fecf15..b53c79a 100644
--- a/tests/JankBench/app/src/main/jni/Android.bp.converted
+++ b/tests/JankBench/app/src/main/jni/Android.bp.converted
@@ -12,12 +12,20 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+<<<<<<< HEAD
cc_library_shared {
name: "libnativebench",
cflags: [
"-Wno-unused-parameter",
"-Wno-unused-variable",
],
+=======
+// ANDROIDMK TRANSLATION WARNING: No 'include $(CLEAR_VARS)' detected before first assignment; clearing vars now
+
+cc_library_shared {
+ name: "libnativebench",
+ cflags: ["-Wno-unused-parameter"],
+>>>>>>> Convert Android.mk file to Android.bp
srcs: [
"Bench.cpp",
"WorkerPool.cpp",
diff --git a/tests/RcsTests/Android.bp b/tests/RcsTests/Android.bp
new file mode 100644
index 0000000..81c6df0
--- /dev/null
+++ b/tests/RcsTests/Android.bp
@@ -0,0 +1,17 @@
+android_test {
+ name: "RcsTests",
+ // Only compile source java files in this apk.
+ srcs: ["src/**/*.java"],
+ platform_apis: true,
+ certificate: "platform",
+ libs: [
+ "android.test.runner",
+ "android.test.base",
+ ],
+ static_libs: [
+ "junit",
+ "android-support-test",
+ "mockito-target-minus-junit4",
+ "truth-prebuilt",
+ ],
+}
diff --git a/tests/RcsTests/Android.mk b/tests/RcsTests/Android.mk
deleted file mode 100644
index 7b348d7..0000000
--- a/tests/RcsTests/Android.mk
+++ /dev/null
@@ -1,19 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := tests
-
-# Only compile source java files in this apk.
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
-
-LOCAL_PACKAGE_NAME := RcsTests
-LOCAL_PRIVATE_PLATFORM_APIS := true
-
-LOCAL_CERTIFICATE := platform
-LOCAL_JAVA_LIBRARIES := android.test.runner android.test.base
-LOCAL_STATIC_JAVA_LIBRARIES := junit android-support-test mockito-target-minus-junit4 truth-prebuilt
-
-include $(BUILD_PACKAGE)
-
-# Use the following include to make our test apk.
-include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/tests/ServiceCrashTest/Android.bp b/tests/ServiceCrashTest/Android.bp
new file mode 100644
index 0000000..b646ae7
--- /dev/null
+++ b/tests/ServiceCrashTest/Android.bp
@@ -0,0 +1,12 @@
+android_test {
+ name: "ServiceCrashTest",
+ // Only compile source java files in this apk.
+ srcs: ["src/**/*.java"],
+ platform_apis: true,
+ certificate: "platform",
+ libs: ["android.test.base"],
+ static_libs: [
+ "compatibility-device-util",
+ "android-support-test",
+ ],
+}
diff --git a/tests/ServiceCrashTest/Android.mk b/tests/ServiceCrashTest/Android.mk
deleted file mode 100644
index d1f6450..0000000
--- a/tests/ServiceCrashTest/Android.mk
+++ /dev/null
@@ -1,20 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := tests
-
-# Only compile source java files in this apk.
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
-
-LOCAL_PACKAGE_NAME := ServiceCrashTest
-LOCAL_PRIVATE_PLATFORM_APIS := true
-
-LOCAL_CERTIFICATE := platform
-LOCAL_JAVA_LIBRARIES := android.test.base
-
-LOCAL_STATIC_JAVA_LIBRARIES := compatibility-device-util android-support-test
-
-include $(BUILD_PACKAGE)
-
-# Use the following include to make our test apk.
-include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/tests/SurfaceComposition/Android.bp b/tests/SurfaceComposition/Android.bp
new file mode 100644
index 0000000..53e4d52
--- /dev/null
+++ b/tests/SurfaceComposition/Android.bp
@@ -0,0 +1,32 @@
+// Copyright (C) 2015 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+android_test {
+ name: "SurfaceComposition",
+ // Don't include this package in any target
+ // When built, explicitly put it in the data partition.
+ dex_preopt: {
+ enabled: false,
+ },
+ optimize: {
+ enabled: false,
+ },
+ srcs: ["src/**/*.java"],
+ static_libs: ["junit"],
+ libs: [
+ "android.test.runner.stubs",
+ "android.test.base.stubs",
+ ],
+ sdk_version: "current",
+}
diff --git a/tests/SurfaceComposition/Android.mk b/tests/SurfaceComposition/Android.mk
deleted file mode 100644
index f59458d..0000000
--- a/tests/SurfaceComposition/Android.mk
+++ /dev/null
@@ -1,38 +0,0 @@
-# Copyright (C) 2015 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-LOCAL_PATH:= $(call my-dir)
-
-include $(CLEAR_VARS)
-
-# Don't include this package in any target
-LOCAL_MODULE_TAGS := tests
-# When built, explicitly put it in the data partition.
-LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
-
-LOCAL_DEX_PREOPT := false
-
-LOCAL_PROGUARD_ENABLED := disabled
-
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
-
-LOCAL_STATIC_JAVA_LIBRARIES := junit
-
-LOCAL_JAVA_LIBRARIES := android.test.runner.stubs android.test.base.stubs
-
-LOCAL_PACKAGE_NAME := SurfaceComposition
-
-LOCAL_SDK_VERSION := current
-
-include $(BUILD_PACKAGE)
diff --git a/tests/UsbHostExternalManagmentTest/AoapTestDevice/Android.bp b/tests/UsbHostExternalManagmentTest/AoapTestDevice/Android.bp
new file mode 100644
index 0000000..c7e9df0
--- /dev/null
+++ b/tests/UsbHostExternalManagmentTest/AoapTestDevice/Android.bp
@@ -0,0 +1,27 @@
+// Copyright (C) 2016 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+//
+
+//#################################################
+
+android_test {
+ name: "AoapTestDeviceApp",
+ srcs: ["src/**/*.java"],
+ resource_dirs: ["res"],
+ platform_apis: true,
+ optimize: {
+ enabled: false,
+ },
+}
diff --git a/tests/UsbHostExternalManagmentTest/AoapTestDevice/Android.mk b/tests/UsbHostExternalManagmentTest/AoapTestDevice/Android.mk
deleted file mode 100644
index cd7aaed..0000000
--- a/tests/UsbHostExternalManagmentTest/AoapTestDevice/Android.mk
+++ /dev/null
@@ -1,36 +0,0 @@
-# Copyright (C) 2016 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-
-LOCAL_PATH:= $(call my-dir)
-
-##################################################
-
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
-
-LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
-
-LOCAL_PACKAGE_NAME := AoapTestDeviceApp
-LOCAL_PRIVATE_PLATFORM_APIS := true
-
-LOCAL_MODULE_TAGS := tests
-LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
-
-LOCAL_PROGUARD_ENABLED := disabled
-
-include $(BUILD_PACKAGE)
-
diff --git a/tests/UsbHostExternalManagmentTest/AoapTestHost/Android.bp b/tests/UsbHostExternalManagmentTest/AoapTestHost/Android.bp
new file mode 100644
index 0000000..6fa58cb
--- /dev/null
+++ b/tests/UsbHostExternalManagmentTest/AoapTestHost/Android.bp
@@ -0,0 +1,27 @@
+// Copyright (C) 2016 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+//
+
+//#################################################
+
+android_test {
+ name: "AoapTestHostApp",
+ srcs: ["src/**/*.java"],
+ resource_dirs: ["res"],
+ platform_apis: true,
+ optimize: {
+ enabled: false,
+ },
+}
diff --git a/tests/UsbHostExternalManagmentTest/AoapTestHost/Android.mk b/tests/UsbHostExternalManagmentTest/AoapTestHost/Android.mk
deleted file mode 100644
index bd8a51b..0000000
--- a/tests/UsbHostExternalManagmentTest/AoapTestHost/Android.mk
+++ /dev/null
@@ -1,36 +0,0 @@
-# Copyright (C) 2016 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-
-LOCAL_PATH:= $(call my-dir)
-
-##################################################
-
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
-
-LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
-
-LOCAL_PACKAGE_NAME := AoapTestHostApp
-LOCAL_PRIVATE_PLATFORM_APIS := true
-
-LOCAL_MODULE_TAGS := tests
-LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
-
-LOCAL_PROGUARD_ENABLED := disabled
-
-include $(BUILD_PACKAGE)
-
diff --git a/tests/UsbHostExternalManagmentTest/UsbHostExternalManagmentTestApp/Android.bp b/tests/UsbHostExternalManagmentTest/UsbHostExternalManagmentTestApp/Android.bp
new file mode 100644
index 0000000..edd4205
--- /dev/null
+++ b/tests/UsbHostExternalManagmentTest/UsbHostExternalManagmentTestApp/Android.bp
@@ -0,0 +1,32 @@
+// Copyright (C) 2016 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+//
+
+//#################################################
+
+// TODO: should this be android_helper_test_app?
+android_app {
+ name: "UsbHostExternalManagementTestApp",
+ srcs: ["src/**/*.java"],
+ resource_dirs: ["res"],
+ platform_apis: true,
+ privileged: true,
+ // TODO remove tests tag
+ //LOCAL_MODULE_TAGS := tests
+ //LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
+ optimize: {
+ enabled: false,
+ },
+}
diff --git a/tests/UsbHostExternalManagmentTest/UsbHostExternalManagmentTestApp/Android.mk b/tests/UsbHostExternalManagmentTest/UsbHostExternalManagmentTestApp/Android.mk
deleted file mode 100644
index fed454e..0000000
--- a/tests/UsbHostExternalManagmentTest/UsbHostExternalManagmentTestApp/Android.mk
+++ /dev/null
@@ -1,38 +0,0 @@
-# Copyright (C) 2016 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-
-LOCAL_PATH:= $(call my-dir)
-
-##################################################
-
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
-
-LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
-
-LOCAL_PACKAGE_NAME := UsbHostExternalManagementTestApp
-LOCAL_PRIVATE_PLATFORM_APIS := true
-
-LOCAL_PRIVILEGED_MODULE := true
-# TODO remove tests tag
-#LOCAL_MODULE_TAGS := tests
-#LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
-
-LOCAL_PROGUARD_ENABLED := disabled
-
-include $(BUILD_PACKAGE)
-
diff --git a/tests/UsbTests/Android.bp b/tests/UsbTests/Android.bp
new file mode 100644
index 0000000..7dc7c85b2
--- /dev/null
+++ b/tests/UsbTests/Android.bp
@@ -0,0 +1,34 @@
+//
+// Copyright (C) 2018 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+android_test {
+ name: "UsbTests",
+ srcs: ["**/*.java"],
+ static_libs: [
+ "frameworks-base-testutils",
+ "android-support-test",
+ "mockito-target-inline-minus-junit4",
+ "platform-test-annotations",
+ "services.core",
+ "services.net",
+ "services.usb",
+ "truth-prebuilt",
+ ],
+ jni_libs: ["libdexmakerjvmtiagent"],
+ certificate: "platform",
+ platform_apis: true,
+ test_suites: ["device-tests"],
+}
diff --git a/tests/UsbTests/Android.mk b/tests/UsbTests/Android.mk
deleted file mode 100644
index 4e215cc..0000000
--- a/tests/UsbTests/Android.mk
+++ /dev/null
@@ -1,45 +0,0 @@
-#
-# Copyright (C) 2018 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-LOCAL_PATH:= $(call my-dir)
-
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := tests
-
-LOCAL_SRC_FILES := $(call all-subdir-java-files)
-
-LOCAL_STATIC_JAVA_LIBRARIES := \
- frameworks-base-testutils \
- android-support-test \
- mockito-target-inline-minus-junit4 \
- platform-test-annotations \
- services.core \
- services.net \
- services.usb \
- truth-prebuilt \
-
-LOCAL_JNI_SHARED_LIBRARIES := \
- libdexmakerjvmtiagent \
-
-LOCAL_CERTIFICATE := platform
-
-LOCAL_PACKAGE_NAME := UsbTests
-LOCAL_PRIVATE_PLATFORM_APIS := true
-
-LOCAL_COMPATIBILITY_SUITE := device-tests
-
-include $(BUILD_PACKAGE)
diff --git a/tests/WindowAnimationJank/Android.bp b/tests/WindowAnimationJank/Android.bp
new file mode 100644
index 0000000..60e8f74
--- /dev/null
+++ b/tests/WindowAnimationJank/Android.bp
@@ -0,0 +1,25 @@
+// Copyright (C) 2015 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+android_test {
+ name: "WindowAnimationJank",
+ srcs: ["src/**/*.java"],
+ static_libs: [
+ "ub-uiautomator",
+ "ub-janktesthelper",
+ "junit",
+ ],
+ libs: ["android.test.base.stubs"],
+ sdk_version: "current",
+}
diff --git a/tests/WindowAnimationJank/Android.mk b/tests/WindowAnimationJank/Android.mk
deleted file mode 100644
index 7800a80..0000000
--- a/tests/WindowAnimationJank/Android.mk
+++ /dev/null
@@ -1,36 +0,0 @@
-# Copyright (C) 2015 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-LOCAL_PATH:= $(call my-dir)
-
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := tests
-
-LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
-
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
-
-LOCAL_PACKAGE_NAME := WindowAnimationJank
-
-LOCAL_STATIC_JAVA_LIBRARIES := \
- ub-uiautomator \
- ub-janktesthelper \
- junit
-
-LOCAL_JAVA_LIBRARIES := android.test.base.stubs
-
-LOCAL_SDK_VERSION := current
-
-include $(BUILD_PACKAGE)
diff --git a/tests/net/Android.bp b/tests/net/Android.bp
index 2539c0f..c62d85e 100644
--- a/tests/net/Android.bp
+++ b/tests/net/Android.bp
@@ -13,7 +13,6 @@
"mockito-target-minus-junit4",
"platform-test-annotations",
"services.core",
- "services.ipmemorystore",
"services.net",
],
libs: [
diff --git a/tests/net/java/android/net/IpMemoryStoreTest.java b/tests/net/java/android/net/IpMemoryStoreTest.java
index 57ecc8f..18c6768 100644
--- a/tests/net/java/android/net/IpMemoryStoreTest.java
+++ b/tests/net/java/android/net/IpMemoryStoreTest.java
@@ -16,6 +16,9 @@
package android.net;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.Mockito.doAnswer;
+
import android.content.Context;
import androidx.test.filters.SmallTest;
@@ -33,13 +36,25 @@
@Mock
Context mMockContext;
@Mock
+ NetworkStackClient mNetworkStackClient;
+ @Mock
IIpMemoryStore mMockService;
IpMemoryStore mStore;
@Before
public void setUp() {
MockitoAnnotations.initMocks(this);
- mStore = new IpMemoryStore(mMockContext, mMockService);
+ doAnswer(invocation -> {
+ ((IIpMemoryStoreCallbacks) invocation.getArgument(0))
+ .onIpMemoryStoreFetched(mMockService);
+ return null;
+ }).when(mNetworkStackClient).fetchIpMemoryStore(any());
+ mStore = new IpMemoryStore(mMockContext) {
+ @Override
+ protected NetworkStackClient getNetworkStackClient() {
+ return mNetworkStackClient;
+ }
+ };
}
@Test
diff --git a/tests/net/java/android/net/LinkAddressTest.java b/tests/net/java/android/net/LinkAddressTest.java
index be7bd1b..d462441b 100644
--- a/tests/net/java/android/net/LinkAddressTest.java
+++ b/tests/net/java/android/net/LinkAddressTest.java
@@ -81,14 +81,14 @@
assertEquals(25, address.getPrefixLength());
assertEquals(0, address.getFlags());
assertEquals(RT_SCOPE_UNIVERSE, address.getScope());
- assertTrue(address.isIPv4());
+ assertTrue(address.isIpv4());
address = new LinkAddress(V6_ADDRESS, 127);
assertEquals(V6_ADDRESS, address.getAddress());
assertEquals(127, address.getPrefixLength());
assertEquals(0, address.getFlags());
assertEquals(RT_SCOPE_UNIVERSE, address.getScope());
- assertTrue(address.isIPv6());
+ assertTrue(address.isIpv6());
// Nonsensical flags/scopes or combinations thereof are acceptable.
address = new LinkAddress(V6 + "/64", IFA_F_DEPRECATED | IFA_F_PERMANENT, RT_SCOPE_LINK);
@@ -96,14 +96,14 @@
assertEquals(64, address.getPrefixLength());
assertEquals(IFA_F_DEPRECATED | IFA_F_PERMANENT, address.getFlags());
assertEquals(RT_SCOPE_LINK, address.getScope());
- assertTrue(address.isIPv6());
+ assertTrue(address.isIpv6());
address = new LinkAddress(V4 + "/23", 123, 456);
assertEquals(V4_ADDRESS, address.getAddress());
assertEquals(23, address.getPrefixLength());
assertEquals(123, address.getFlags());
assertEquals(456, address.getScope());
- assertTrue(address.isIPv4());
+ assertTrue(address.isIpv4());
// InterfaceAddress doesn't have a constructor. Fetch some from an interface.
List<InterfaceAddress> addrs = NetworkInterface.getByName("lo").getInterfaceAddresses();
diff --git a/tests/net/java/android/net/LinkPropertiesTest.java b/tests/net/java/android/net/LinkPropertiesTest.java
index 9a7d487..4177291 100644
--- a/tests/net/java/android/net/LinkPropertiesTest.java
+++ b/tests/net/java/android/net/LinkPropertiesTest.java
@@ -405,8 +405,8 @@
LinkProperties lp = new LinkProperties();
// No addresses.
- assertFalse(lp.hasIPv4Address());
- assertFalse(lp.hasGlobalIPv6Address());
+ assertFalse(lp.hasIpv4Address());
+ assertFalse(lp.hasGlobalIpv6Address());
// Addresses on stacked links don't count.
LinkProperties stacked = new LinkProperties();
@@ -414,53 +414,53 @@
lp.addStackedLink(stacked);
stacked.addLinkAddress(LINKADDRV4);
stacked.addLinkAddress(LINKADDRV6);
- assertTrue(stacked.hasIPv4Address());
- assertTrue(stacked.hasGlobalIPv6Address());
- assertFalse(lp.hasIPv4Address());
- assertFalse(lp.hasGlobalIPv6Address());
+ assertTrue(stacked.hasIpv4Address());
+ assertTrue(stacked.hasGlobalIpv6Address());
+ assertFalse(lp.hasIpv4Address());
+ assertFalse(lp.hasGlobalIpv6Address());
lp.removeStackedLink("stacked");
- assertFalse(lp.hasIPv4Address());
- assertFalse(lp.hasGlobalIPv6Address());
+ assertFalse(lp.hasIpv4Address());
+ assertFalse(lp.hasGlobalIpv6Address());
// Addresses on the base link.
- // Check the return values of hasIPvXAddress and ensure the add/remove methods return true
+ // Check the return values of hasIpvXAddress and ensure the add/remove methods return true
// iff something changes.
assertEquals(0, lp.getLinkAddresses().size());
assertTrue(lp.addLinkAddress(LINKADDRV6));
assertEquals(1, lp.getLinkAddresses().size());
- assertFalse(lp.hasIPv4Address());
- assertTrue(lp.hasGlobalIPv6Address());
+ assertFalse(lp.hasIpv4Address());
+ assertTrue(lp.hasGlobalIpv6Address());
assertTrue(lp.removeLinkAddress(LINKADDRV6));
assertEquals(0, lp.getLinkAddresses().size());
assertTrue(lp.addLinkAddress(LINKADDRV6LINKLOCAL));
assertEquals(1, lp.getLinkAddresses().size());
- assertFalse(lp.hasGlobalIPv6Address());
+ assertFalse(lp.hasGlobalIpv6Address());
assertTrue(lp.addLinkAddress(LINKADDRV4));
assertEquals(2, lp.getLinkAddresses().size());
- assertTrue(lp.hasIPv4Address());
- assertFalse(lp.hasGlobalIPv6Address());
+ assertTrue(lp.hasIpv4Address());
+ assertFalse(lp.hasGlobalIpv6Address());
assertTrue(lp.addLinkAddress(LINKADDRV6));
assertEquals(3, lp.getLinkAddresses().size());
- assertTrue(lp.hasIPv4Address());
- assertTrue(lp.hasGlobalIPv6Address());
+ assertTrue(lp.hasIpv4Address());
+ assertTrue(lp.hasGlobalIpv6Address());
assertTrue(lp.removeLinkAddress(LINKADDRV6LINKLOCAL));
assertEquals(2, lp.getLinkAddresses().size());
- assertTrue(lp.hasIPv4Address());
- assertTrue(lp.hasGlobalIPv6Address());
+ assertTrue(lp.hasIpv4Address());
+ assertTrue(lp.hasGlobalIpv6Address());
// Adding an address twice has no effect.
// Removing an address that's not present has no effect.
assertFalse(lp.addLinkAddress(LINKADDRV4));
assertEquals(2, lp.getLinkAddresses().size());
- assertTrue(lp.hasIPv4Address());
+ assertTrue(lp.hasIpv4Address());
assertTrue(lp.removeLinkAddress(LINKADDRV4));
assertEquals(1, lp.getLinkAddresses().size());
- assertFalse(lp.hasIPv4Address());
+ assertFalse(lp.hasIpv4Address());
assertFalse(lp.removeLinkAddress(LINKADDRV4));
assertEquals(1, lp.getLinkAddresses().size());
@@ -546,8 +546,8 @@
assertFalse("v4only:addr+dns", lp4.isProvisioned());
lp4.addRoute(new RouteInfo(GATEWAY1));
assertTrue("v4only:addr+dns+route", lp4.isProvisioned());
- assertTrue("v4only:addr+dns+route", lp4.isIPv4Provisioned());
- assertFalse("v4only:addr+dns+route", lp4.isIPv6Provisioned());
+ assertTrue("v4only:addr+dns+route", lp4.isIpv4Provisioned());
+ assertFalse("v4only:addr+dns+route", lp4.isIpv6Provisioned());
LinkProperties lp6 = new LinkProperties();
assertFalse("v6only:empty", lp6.isProvisioned());
@@ -558,11 +558,11 @@
lp6.addRoute(new RouteInfo(GATEWAY61));
assertFalse("v6only:fe80+dns+route", lp6.isProvisioned());
lp6.addLinkAddress(LINKADDRV6);
- assertTrue("v6only:fe80+global+dns+route", lp6.isIPv6Provisioned());
+ assertTrue("v6only:fe80+global+dns+route", lp6.isIpv6Provisioned());
assertTrue("v6only:fe80+global+dns+route", lp6.isProvisioned());
lp6.removeLinkAddress(LINKADDRV6LINKLOCAL);
- assertFalse("v6only:global+dns+route", lp6.isIPv4Provisioned());
- assertTrue("v6only:global+dns+route", lp6.isIPv6Provisioned());
+ assertFalse("v6only:global+dns+route", lp6.isIpv4Provisioned());
+ assertTrue("v6only:global+dns+route", lp6.isIpv6Provisioned());
assertTrue("v6only:global+dns+route", lp6.isProvisioned());
LinkProperties lp46 = new LinkProperties();
@@ -572,12 +572,12 @@
lp46.addDnsServer(DNS6);
assertFalse("dualstack:missing-routes", lp46.isProvisioned());
lp46.addRoute(new RouteInfo(GATEWAY1));
- assertTrue("dualstack:v4-provisioned", lp46.isIPv4Provisioned());
- assertFalse("dualstack:v4-provisioned", lp46.isIPv6Provisioned());
+ assertTrue("dualstack:v4-provisioned", lp46.isIpv4Provisioned());
+ assertFalse("dualstack:v4-provisioned", lp46.isIpv6Provisioned());
assertTrue("dualstack:v4-provisioned", lp46.isProvisioned());
lp46.addRoute(new RouteInfo(GATEWAY61));
- assertTrue("dualstack:both-provisioned", lp46.isIPv4Provisioned());
- assertTrue("dualstack:both-provisioned", lp46.isIPv6Provisioned());
+ assertTrue("dualstack:both-provisioned", lp46.isIpv4Provisioned());
+ assertTrue("dualstack:both-provisioned", lp46.isIpv6Provisioned());
assertTrue("dualstack:both-provisioned", lp46.isProvisioned());
// A link with an IPv6 address and default route, but IPv4 DNS server.
@@ -585,8 +585,8 @@
mixed.addLinkAddress(LINKADDRV6);
mixed.addDnsServer(DNS1);
mixed.addRoute(new RouteInfo(GATEWAY61));
- assertFalse("mixed:addr6+route6+dns4", mixed.isIPv4Provisioned());
- assertFalse("mixed:addr6+route6+dns4", mixed.isIPv6Provisioned());
+ assertFalse("mixed:addr6+route6+dns4", mixed.isIpv4Provisioned());
+ assertFalse("mixed:addr6+route6+dns4", mixed.isIpv6Provisioned());
assertFalse("mixed:addr6+route6+dns4", mixed.isProvisioned());
}
@@ -617,16 +617,16 @@
v6lp.addLinkAddress(LINKADDRV6);
v6lp.addRoute(new RouteInfo(GATEWAY61));
v6lp.addDnsServer(DNS6);
- assertFalse(v6lp.isIPv4Provisioned());
- assertTrue(v6lp.isIPv6Provisioned());
+ assertFalse(v6lp.isIpv4Provisioned());
+ assertTrue(v6lp.isIpv6Provisioned());
assertTrue(v6lp.isProvisioned());
LinkProperties v46lp = new LinkProperties(v6lp);
v46lp.addLinkAddress(LINKADDRV4);
v46lp.addRoute(new RouteInfo(GATEWAY1));
v46lp.addDnsServer(DNS1);
- assertTrue(v46lp.isIPv4Provisioned());
- assertTrue(v46lp.isIPv6Provisioned());
+ assertTrue(v46lp.isIpv4Provisioned());
+ assertTrue(v46lp.isIpv6Provisioned());
assertTrue(v46lp.isProvisioned());
assertEquals(ProvisioningChange.STILL_PROVISIONED,
diff --git a/tests/net/java/android/net/TcpKeepalivePacketDataTest.java b/tests/net/java/android/net/TcpKeepalivePacketDataTest.java
index 1f2dd27..372ffcd 100644
--- a/tests/net/java/android/net/TcpKeepalivePacketDataTest.java
+++ b/tests/net/java/android/net/TcpKeepalivePacketDataTest.java
@@ -21,12 +21,9 @@
import static org.junit.Assert.fail;
import android.net.SocketKeepalive.InvalidPacketException;
-import android.net.TcpKeepalivePacketData.TcpSocketInfo;
import com.android.internal.util.TestUtils;
-import libcore.net.InetAddressUtils;
-
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -37,14 +34,14 @@
@RunWith(JUnit4.class)
public final class TcpKeepalivePacketDataTest {
+ private static final byte[] IPV4_KEEPALIVE_SRC_ADDR = {10, 0, 0, 1};
+ private static final byte[] IPV4_KEEPALIVE_DST_ADDR = {10, 0, 0, 5};
@Before
public void setUp() {}
@Test
- public void testV4TcpKeepalivePacket() {
- final InetAddress srcAddr = InetAddressUtils.parseNumericAddress("192.168.0.1");
- final InetAddress dstAddr = InetAddressUtils.parseNumericAddress("192.168.0.10");
+ public void testV4TcpKeepalivePacket() throws Exception {
final int srcPort = 1234;
final int dstPort = 4321;
final int seq = 0x11111111;
@@ -52,20 +49,28 @@
final int wnd = 8000;
final int wndScale = 2;
TcpKeepalivePacketData resultData = null;
- TcpSocketInfo testInfo = new TcpSocketInfo(
- srcAddr, srcPort, dstAddr, dstPort, seq, ack, wnd, wndScale);
+ final TcpKeepalivePacketDataParcelable testInfo = new TcpKeepalivePacketDataParcelable();
+ testInfo.srcAddress = IPV4_KEEPALIVE_SRC_ADDR;
+ testInfo.srcPort = srcPort;
+ testInfo.dstAddress = IPV4_KEEPALIVE_DST_ADDR;
+ testInfo.dstPort = dstPort;
+ testInfo.seq = seq;
+ testInfo.ack = ack;
+ testInfo.rcvWnd = wnd;
+ testInfo.rcvWndScale = wndScale;
try {
resultData = TcpKeepalivePacketData.tcpKeepalivePacket(testInfo);
} catch (InvalidPacketException e) {
fail("InvalidPacketException: " + e);
}
- assertEquals(testInfo.srcAddress, resultData.srcAddress);
- assertEquals(testInfo.dstAddress, resultData.dstAddress);
+ assertEquals(InetAddress.getByAddress(testInfo.srcAddress), resultData.srcAddress);
+ assertEquals(InetAddress.getByAddress(testInfo.dstAddress), resultData.dstAddress);
assertEquals(testInfo.srcPort, resultData.srcPort);
assertEquals(testInfo.dstPort, resultData.dstPort);
assertEquals(testInfo.seq, resultData.tcpSeq);
assertEquals(testInfo.ack, resultData.tcpAck);
+ assertEquals(testInfo.rcvWnd, resultData.tcpWnd);
assertEquals(testInfo.rcvWndScale, resultData.tcpWndScale);
TestUtils.assertParcelingIsLossless(resultData, TcpKeepalivePacketData.CREATOR);
@@ -78,11 +83,11 @@
byte[] ip = new byte[4];
buf = ByteBuffer.wrap(packet, 12, 4);
buf.get(ip);
- assertArrayEquals(ip, srcAddr.getAddress());
+ assertArrayEquals(ip, IPV4_KEEPALIVE_SRC_ADDR);
// Destination IP address.
buf = ByteBuffer.wrap(packet, 16, 4);
buf.get(ip);
- assertArrayEquals(ip, dstAddr.getAddress());
+ assertArrayEquals(ip, IPV4_KEEPALIVE_DST_ADDR);
buf = ByteBuffer.wrap(packet, 20, 12);
// Source port.
@@ -102,25 +107,32 @@
@Test
public void testParcel() throws Exception {
- final InetAddress srcAddr = InetAddresses.parseNumericAddress("192.168.0.1");
- final InetAddress dstAddr = InetAddresses.parseNumericAddress("192.168.0.10");
final int srcPort = 1234;
final int dstPort = 4321;
final int sequence = 0x11111111;
final int ack = 0x22222222;
final int wnd = 48_000;
final int wndScale = 2;
+ final TcpKeepalivePacketDataParcelable testInfo = new TcpKeepalivePacketDataParcelable();
+ testInfo.srcAddress = IPV4_KEEPALIVE_SRC_ADDR;
+ testInfo.srcPort = srcPort;
+ testInfo.dstAddress = IPV4_KEEPALIVE_DST_ADDR;
+ testInfo.dstPort = dstPort;
+ testInfo.seq = sequence;
+ testInfo.ack = ack;
+ testInfo.rcvWnd = wnd;
+ testInfo.rcvWndScale = wndScale;
TcpKeepalivePacketData testData = null;
TcpKeepalivePacketDataParcelable resultData = null;
- TcpSocketInfo testInfo = new TcpSocketInfo(
- srcAddr, srcPort, dstAddr, dstPort, sequence, ack, wnd, wndScale);
testData = TcpKeepalivePacketData.tcpKeepalivePacket(testInfo);
resultData = testData.toStableParcelable();
- assertArrayEquals(resultData.srcAddress, srcAddr.getAddress());
- assertArrayEquals(resultData.dstAddress, dstAddr.getAddress());
+ assertArrayEquals(resultData.srcAddress, IPV4_KEEPALIVE_SRC_ADDR);
+ assertArrayEquals(resultData.dstAddress, IPV4_KEEPALIVE_DST_ADDR);
assertEquals(resultData.srcPort, srcPort);
assertEquals(resultData.dstPort, dstPort);
assertEquals(resultData.seq, sequence);
assertEquals(resultData.ack, ack);
+ assertEquals(resultData.rcvWnd, wnd);
+ assertEquals(resultData.rcvWndScale, wndScale);
}
}
diff --git a/tests/net/java/android/net/apf/ApfCapabilitiesTest.java b/tests/net/java/android/net/apf/ApfCapabilitiesTest.java
new file mode 100644
index 0000000..75752c3
--- /dev/null
+++ b/tests/net/java/android/net/apf/ApfCapabilitiesTest.java
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2019 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.net.apf;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotEquals;
+
+import android.net.shared.ParcelableTestUtil;
+
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
+import com.android.internal.util.TestUtils;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+@RunWith(AndroidJUnit4.class)
+@SmallTest
+public class ApfCapabilitiesTest {
+ @Test
+ public void testParcelUnparcel() {
+ final ApfCapabilities caps = new ApfCapabilities(123, 456, 789);
+ ParcelableTestUtil.assertFieldCountEquals(3, ApfCapabilities.class);
+
+ TestUtils.assertParcelingIsLossless(caps, ApfCapabilities.CREATOR);
+ }
+
+ @Test
+ public void testEquals() {
+ assertEquals(new ApfCapabilities(1, 2, 3), new ApfCapabilities(1, 2, 3));
+ assertNotEquals(new ApfCapabilities(2, 2, 3), new ApfCapabilities(1, 2, 3));
+ assertNotEquals(new ApfCapabilities(1, 3, 3), new ApfCapabilities(1, 2, 3));
+ assertNotEquals(new ApfCapabilities(1, 2, 4), new ApfCapabilities(1, 2, 3));
+ }
+}
diff --git a/tests/net/java/android/net/shared/LinkPropertiesParcelableUtilTest.java b/tests/net/java/android/net/shared/LinkPropertiesParcelableUtilTest.java
deleted file mode 100644
index 2d0e03d..0000000
--- a/tests/net/java/android/net/shared/LinkPropertiesParcelableUtilTest.java
+++ /dev/null
@@ -1,184 +0,0 @@
-/*
- * Copyright (C) 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.net.shared;
-
-import static android.net.shared.LinkPropertiesParcelableUtil.fromStableParcelable;
-import static android.net.shared.LinkPropertiesParcelableUtil.toStableParcelable;
-import static android.net.shared.ParcelableTestUtil.assertFieldCountEquals;
-
-import static org.junit.Assert.assertEquals;
-
-import android.net.InetAddresses;
-import android.net.IpPrefix;
-import android.net.LinkAddress;
-import android.net.LinkProperties;
-import android.net.ProxyInfo;
-import android.net.RouteInfo;
-import android.net.Uri;
-
-import androidx.test.filters.SmallTest;
-import androidx.test.runner.AndroidJUnit4;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-import java.util.Arrays;
-import java.util.Collections;
-
-/**
- * Tests for {@link LinkPropertiesParcelableUtil}
- */
-@RunWith(AndroidJUnit4.class)
-@SmallTest
-public class LinkPropertiesParcelableUtilTest {
- private LinkProperties mLinkProperties;
-
- private static final String TEST_LINKPROPS_IFACE = "TEST_IFACE";
-
- @Before
- public void setUp() {
- mLinkProperties = new LinkProperties();
- mLinkProperties.setInterfaceName(TEST_LINKPROPS_IFACE);
- mLinkProperties.setLinkAddresses(Arrays.asList(
- new LinkAddress(InetAddresses.parseNumericAddress("192.168.0.42"), 16),
- new LinkAddress(InetAddresses.parseNumericAddress("2001:db8::7"), 42)));
- mLinkProperties.setDnsServers(Arrays.asList(
- InetAddresses.parseNumericAddress("2001:db8::42"),
- InetAddresses.parseNumericAddress("192.168.1.1")
- ));
- mLinkProperties.setValidatedPrivateDnsServers(Arrays.asList(
- InetAddresses.parseNumericAddress("2001:db8::43"),
- InetAddresses.parseNumericAddress("192.168.42.43")
- ));
- mLinkProperties.setPcscfServers(Arrays.asList(
- InetAddresses.parseNumericAddress("2001:db8::47"),
- InetAddresses.parseNumericAddress("192.168.42.47")
- ));
- mLinkProperties.setUsePrivateDns(true);
- mLinkProperties.setPrivateDnsServerName("test.example.com");
- mLinkProperties.setDomains("test1.example.com,test2.example.com");
- mLinkProperties.addRoute(new RouteInfo(
- new IpPrefix(InetAddresses.parseNumericAddress("2001:db8::44"), 45),
- InetAddresses.parseNumericAddress("2001:db8::45"),
- TEST_LINKPROPS_IFACE,
- RouteInfo.RTN_UNICAST
- ));
- mLinkProperties.addRoute(new RouteInfo(
- new IpPrefix(InetAddresses.parseNumericAddress("192.168.44.45"), 16),
- InetAddresses.parseNumericAddress("192.168.45.1"),
- TEST_LINKPROPS_IFACE,
- RouteInfo.RTN_THROW
- ));
- mLinkProperties.setHttpProxy(new ProxyInfo("test3.example.com", 8000,
- "excl1.example.com,excl2.example.com"));
- mLinkProperties.setMtu(5000);
- mLinkProperties.setTcpBufferSizes("1,2,3,4,5,6");
- mLinkProperties.setNat64Prefix(
- new IpPrefix(InetAddresses.parseNumericAddress("2001:db8::48"), 96));
-
- // Verify that this test does not miss any new field added later.
- // If any added field is not included in LinkProperties#equals, assertLinkPropertiesEquals
- // must also be updated.
- assertFieldCountEquals(14, LinkProperties.class);
- }
-
- @Test
- public void testParcelUnparcel() {
- doParcelUnparcelTest();
- }
-
- @Test
- public void testParcelUnparcel_NullInterface() {
- mLinkProperties.setInterfaceName(null);
- doParcelUnparcelTest();
- }
-
- @Test
- public void testParcelUnparcel_NullPrivateDnsServer() {
- mLinkProperties.setPrivateDnsServerName(null);
- doParcelUnparcelTest();
- }
-
- @Test
- public void testParcelUnparcel_NullDomains() {
- mLinkProperties.setDomains(null);
- doParcelUnparcelTest();
- }
-
- @Test
- public void testParcelUnparcel_NullProxy() {
- mLinkProperties.setHttpProxy(null);
- doParcelUnparcelTest();
- }
-
- @Test
- public void testParcelUnparcel_NullTcpBufferSizes() {
- mLinkProperties.setTcpBufferSizes(null);
- doParcelUnparcelTest();
- }
-
- @Test
- public void testParcelUnparcel_EmptyLinkAddresses() {
- mLinkProperties.setLinkAddresses(Collections.emptyList());
- doParcelUnparcelTest();
- }
-
- @Test
- public void testParcelUnparcel_EmptyDnses() {
- mLinkProperties.setDnsServers(Collections.emptyList());
- doParcelUnparcelTest();
- }
-
- @Test
- public void testParcelUnparcel_EmptyValidatedPrivateDnses() {
- mLinkProperties.setValidatedPrivateDnsServers(Collections.emptyList());
- doParcelUnparcelTest();
- }
-
- @Test
- public void testParcelUnparcel_EmptyRoutes() {
- for (RouteInfo r : mLinkProperties.getAllRoutes()) {
- mLinkProperties.removeRoute(r);
- }
- doParcelUnparcelTest();
- }
-
- @Test
- public void testParcelUnparcel_PacFileProxyInfo() {
- mLinkProperties.setHttpProxy(new ProxyInfo(Uri.parse("http://pacfile.example.com")));
- doParcelUnparcelTest();
- }
-
- @Test
- public void testParcelUnparcel_NullNat64Prefix() {
- mLinkProperties.setNat64Prefix(null);
- doParcelUnparcelTest();
- }
-
- private void doParcelUnparcelTest() {
- final LinkProperties unparceled = fromStableParcelable(toStableParcelable(mLinkProperties));
- assertLinkPropertiesEquals(mLinkProperties, unparceled);
- }
-
- private static void assertLinkPropertiesEquals(LinkProperties expected, LinkProperties actual) {
- assertEquals(expected, actual);
-
- // Equality on stacked links is not tested as they should not be passed to processes using
- // LinkPropertiesParcelable.
- }
-}
diff --git a/tests/net/java/com/android/server/ConnectivityServiceTest.java b/tests/net/java/com/android/server/ConnectivityServiceTest.java
index 9a3a8cd..d3616aa 100644
--- a/tests/net/java/com/android/server/ConnectivityServiceTest.java
+++ b/tests/net/java/com/android/server/ConnectivityServiceTest.java
@@ -60,7 +60,6 @@
import static android.net.NetworkPolicyManager.RULE_NONE;
import static android.net.NetworkPolicyManager.RULE_REJECT_ALL;
import static android.net.NetworkPolicyManager.RULE_REJECT_METERED;
-import static android.net.shared.NetworkParcelableUtil.fromStableParcelable;
import static com.android.internal.util.TestUtils.waitForIdleHandler;
import static com.android.internal.util.TestUtils.waitForIdleLooper;
@@ -125,7 +124,6 @@
import android.net.NetworkInfo;
import android.net.NetworkInfo.DetailedState;
import android.net.NetworkMisc;
-import android.net.NetworkParcelable;
import android.net.NetworkRequest;
import android.net.NetworkSpecifier;
import android.net.NetworkStackClient;
@@ -497,13 +495,12 @@
try {
doAnswer(validateAnswer).when(mNetworkMonitor).notifyNetworkConnected();
doAnswer(validateAnswer).when(mNetworkMonitor).forceReevaluation(anyInt());
- doAnswer(validateAnswer).when(mNetworkMonitor).notifyAcceptPartialConnectivity();
+ doAnswer(validateAnswer).when(mNetworkMonitor).setAcceptPartialConnectivity();
} catch (RemoteException e) {
fail(e.getMessage());
}
- final ArgumentCaptor<NetworkParcelable> nmNetworkCaptor =
- ArgumentCaptor.forClass(NetworkParcelable.class);
+ final ArgumentCaptor<Network> nmNetworkCaptor = ArgumentCaptor.forClass(Network.class);
final ArgumentCaptor<INetworkMonitorCallbacks> nmCbCaptor =
ArgumentCaptor.forClass(INetworkMonitorCallbacks.class);
doNothing().when(mNetworkStack).makeNetworkMonitor(
@@ -543,8 +540,7 @@
}
};
- assertEquals(
- mNetworkAgent.netId, fromStableParcelable(nmNetworkCaptor.getValue()).netId);
+ assertEquals(mNetworkAgent.netId, nmNetworkCaptor.getValue().netId);
mNmCallbacks = nmCbCaptor.getValue();
try {
@@ -2554,7 +2550,7 @@
verifyActiveNetwork(TRANSPORT_CELLULAR);
}
- // TODO: deflake and re-enable
+ // TODO(b/128426024): deflake and re-enable
// @Test
public void testPartialConnectivity() {
// Register network callback.
@@ -2589,7 +2585,7 @@
waitForIdle();
try {
verify(mWiFiNetworkAgent.mNetworkMonitor,
- timeout(TIMEOUT_MS).times(1)).notifyAcceptPartialConnectivity();
+ timeout(TIMEOUT_MS).times(1)).setAcceptPartialConnectivity();
} catch (RemoteException e) {
fail(e.getMessage());
}
@@ -2645,7 +2641,7 @@
waitForIdle();
try {
verify(mWiFiNetworkAgent.mNetworkMonitor,
- timeout(TIMEOUT_MS).times(1)).notifyAcceptPartialConnectivity();
+ timeout(TIMEOUT_MS).times(1)).setAcceptPartialConnectivity();
} catch (RemoteException e) {
fail(e.getMessage());
}
diff --git a/tests/net/java/com/android/server/NetworkManagementServiceTest.java b/tests/net/java/com/android/server/NetworkManagementServiceTest.java
index 6fb3225..968b307 100644
--- a/tests/net/java/com/android/server/NetworkManagementServiceTest.java
+++ b/tests/net/java/com/android/server/NetworkManagementServiceTest.java
@@ -16,6 +16,7 @@
package com.android.server;
+import static org.mockito.Mockito.doNothing;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.reset;
@@ -23,11 +24,11 @@
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyNoMoreInteractions;
+import android.annotation.NonNull;
import android.content.Context;
import android.net.INetd;
+import android.net.INetdUnsolicitedEventListener;
import android.net.LinkAddress;
-import android.net.LocalServerSocket;
-import android.net.LocalSocket;
import android.os.BatteryStats;
import android.os.Binder;
import android.os.IBinder;
@@ -43,12 +44,11 @@
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
+import org.mockito.ArgumentCaptor;
+import org.mockito.Captor;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
-import java.io.IOException;
-import java.io.OutputStream;
-
/**
* Tests for {@link NetworkManagementService}.
*/
@@ -56,16 +56,16 @@
@SmallTest
public class NetworkManagementServiceTest {
- private static final String SOCKET_NAME = "__test__NetworkManagementServiceTest";
private NetworkManagementService mNMService;
- private LocalServerSocket mServerSocket;
- private LocalSocket mSocket;
- private OutputStream mOutputStream;
@Mock private Context mContext;
@Mock private IBatteryStats.Stub mBatteryStatsService;
@Mock private INetd.Stub mNetdService;
+ @NonNull
+ @Captor
+ private ArgumentCaptor<INetdUnsolicitedEventListener> mUnsolListenerCaptor;
+
private final SystemServices mServices = new SystemServices() {
@Override
public IBinder getService(String name) {
@@ -88,32 +88,15 @@
@Before
public void setUp() throws Exception {
MockitoAnnotations.initMocks(this);
-
- // Set up a sheltered test environment.
- mServerSocket = new LocalServerSocket(SOCKET_NAME);
-
+ doNothing().when(mNetdService)
+ .registerUnsolicitedEventListener(mUnsolListenerCaptor.capture());
// Start the service and wait until it connects to our socket.
- mNMService = NetworkManagementService.create(mContext, SOCKET_NAME, mServices);
- mSocket = mServerSocket.accept();
- mOutputStream = mSocket.getOutputStream();
+ mNMService = NetworkManagementService.create(mContext, mServices);
}
@After
public void tearDown() throws Exception {
mNMService.shutdown();
- // Once NetworkManagementService#shutdown() actually does something and shutdowns
- // the underlying NativeDaemonConnector, the block below should be uncommented.
- // if (mOutputStream != null) mOutputStream.close();
- // if (mSocket != null) mSocket.close();
- // if (mServerSocket != null) mServerSocket.close();
- }
-
- /**
- * Sends a message on the netd socket and gives the events some time to make it back.
- */
- private void sendMessage(String message) throws IOException {
- // Strings are null-terminated, so add "\0" at the end.
- mOutputStream.write((message + "\0").getBytes());
}
private static <T> T expectSoon(T mock) {
@@ -131,125 +114,78 @@
// Forget everything that happened to the mock so far, so we can explicitly verify
// everything that happens and does not happen to it from now on.
- reset(observer);
- // Now send NetworkManagementService messages and ensure that the observer methods are
- // called. After every valid message we expect a callback soon after; to ensure that
+ INetdUnsolicitedEventListener unsolListener = mUnsolListenerCaptor.getValue();
+ reset(observer);
+ // Now call unsolListener methods and ensure that the observer methods are
+ // called. After every method we expect a callback soon after; to ensure that
// invalid messages don't cause any callbacks, we call verifyNoMoreInteractions at the end.
/**
* Interface changes.
*/
- sendMessage("600 Iface added rmnet12");
+ unsolListener.onInterfaceAdded("rmnet12");
expectSoon(observer).interfaceAdded("rmnet12");
- sendMessage("600 Iface removed eth1");
+ unsolListener.onInterfaceRemoved("eth1");
expectSoon(observer).interfaceRemoved("eth1");
- sendMessage("607 Iface removed eth1");
- // Invalid code.
-
- sendMessage("600 Iface borked lo down");
- // Invalid event.
-
- sendMessage("600 Iface changed clat4 up again");
- // Extra tokens.
-
- sendMessage("600 Iface changed clat4 up");
+ unsolListener.onInterfaceChanged("clat4", true);
expectSoon(observer).interfaceStatusChanged("clat4", true);
- sendMessage("600 Iface linkstate rmnet0 down");
+ unsolListener.onInterfaceLinkStateChanged("rmnet0", false);
expectSoon(observer).interfaceLinkStateChanged("rmnet0", false);
- sendMessage("600 IFACE linkstate clat4 up");
- // Invalid group.
-
/**
* Bandwidth control events.
*/
- sendMessage("601 limit alert data rmnet_usb0");
+ unsolListener.onQuotaLimitReached("data", "rmnet_usb0");
expectSoon(observer).limitReached("data", "rmnet_usb0");
- sendMessage("601 invalid alert data rmnet0");
- // Invalid group.
-
- sendMessage("601 limit increased data rmnet0");
- // Invalid event.
-
-
/**
* Interface class activity.
*/
-
- sendMessage("613 IfaceClass active 1 1234 10012");
+ unsolListener.onInterfaceClassActivityChanged(true, 1, 1234, 0);
expectSoon(observer).interfaceClassDataActivityChanged("1", true, 1234);
- sendMessage("613 IfaceClass idle 9 5678");
+ unsolListener.onInterfaceClassActivityChanged(false, 9, 5678, 0);
expectSoon(observer).interfaceClassDataActivityChanged("9", false, 5678);
- sendMessage("613 IfaceClass reallyactive 9 4321");
+ unsolListener.onInterfaceClassActivityChanged(false, 9, 4321, 0);
expectSoon(observer).interfaceClassDataActivityChanged("9", false, 4321);
- sendMessage("613 InterfaceClass reallyactive 1");
- // Invalid group.
-
-
/**
* IP address changes.
*/
- sendMessage("614 Address updated fe80::1/64 wlan0 128 253");
+ unsolListener.onInterfaceAddressUpdated("fe80::1/64", "wlan0", 128, 253);
expectSoon(observer).addressUpdated("wlan0", new LinkAddress("fe80::1/64", 128, 253));
- // There is no "added", so we take this as "removed".
- sendMessage("614 Address added fe80::1/64 wlan0 128 253");
+ unsolListener.onInterfaceAddressRemoved("fe80::1/64", "wlan0", 128, 253);
expectSoon(observer).addressRemoved("wlan0", new LinkAddress("fe80::1/64", 128, 253));
- sendMessage("614 Address removed 2001:db8::1/64 wlan0 1 0");
+ unsolListener.onInterfaceAddressRemoved("2001:db8::1/64", "wlan0", 1, 0);
expectSoon(observer).addressRemoved("wlan0", new LinkAddress("2001:db8::1/64", 1, 0));
- sendMessage("614 Address removed 2001:db8::1/64 wlan0 1");
- // Not enough arguments.
-
- sendMessage("666 Address removed 2001:db8::1/64 wlan0 1 0");
- // Invalid code.
-
-
/**
* DNS information broadcasts.
*/
- sendMessage("615 DnsInfo servers rmnet_usb0 3600 2001:db8::1");
+ unsolListener.onInterfaceDnsServerInfo("rmnet_usb0", 3600, new String[]{"2001:db8::1"});
expectSoon(observer).interfaceDnsServerInfo("rmnet_usb0", 3600,
new String[]{"2001:db8::1"});
- sendMessage("615 DnsInfo servers wlan0 14400 2001:db8::1,2001:db8::2");
+ unsolListener.onInterfaceDnsServerInfo("wlan0", 14400,
+ new String[]{"2001:db8::1", "2001:db8::2"});
expectSoon(observer).interfaceDnsServerInfo("wlan0", 14400,
new String[]{"2001:db8::1", "2001:db8::2"});
// We don't check for negative lifetimes, only for parse errors.
- sendMessage("615 DnsInfo servers wlan0 -3600 ::1");
+ unsolListener.onInterfaceDnsServerInfo("wlan0", -3600, new String[]{"::1"});
expectSoon(observer).interfaceDnsServerInfo("wlan0", -3600,
new String[]{"::1"});
- sendMessage("615 DnsInfo servers wlan0 SIXHUNDRED ::1");
- // Non-numeric lifetime.
-
- sendMessage("615 DnsInfo servers wlan0 2001:db8::1");
- // Missing lifetime.
-
- sendMessage("615 DnsInfo servers wlan0 3600");
- // No servers.
-
- sendMessage("615 DnsInfo servers 3600 wlan0 2001:db8::1,2001:db8::2");
- // Non-numeric lifetime.
-
- sendMessage("615 DnsInfo wlan0 7200 2001:db8::1,2001:db8::2");
- // Invalid tokens.
-
- sendMessage("666 DnsInfo servers wlan0 5400 2001:db8::1");
- // Invalid code.
-
// No syntax checking on the addresses.
- sendMessage("615 DnsInfo servers wlan0 600 ,::,,foo,::1,");
+ unsolListener.onInterfaceDnsServerInfo("wlan0", 600,
+ new String[]{"", "::", "", "foo", "::1"});
expectSoon(observer).interfaceDnsServerInfo("wlan0", 600,
new String[]{"", "::", "", "foo", "::1"});
diff --git a/tests/net/java/com/android/server/connectivity/TetheringTest.java b/tests/net/java/com/android/server/connectivity/TetheringTest.java
index fdba723..6c42ac3 100644
--- a/tests/net/java/com/android/server/connectivity/TetheringTest.java
+++ b/tests/net/java/com/android/server/connectivity/TetheringTest.java
@@ -550,7 +550,7 @@
mTetheringDependencies.ipv6CoordinatorNotifyList) {
NetworkState ipv6OnlyState = buildMobileUpstreamState(false, true, false);
ipSrv.sendMessage(IpServer.CMD_IPV6_TETHER_UPDATE, 0, 0,
- upstreamState.linkProperties.isIPv6Provisioned()
+ upstreamState.linkProperties.isIpv6Provisioned()
? ipv6OnlyState.linkProperties
: null);
}
diff --git a/tests/net/java/com/android/server/net/NetworkStatsCollectionTest.java b/tests/net/java/com/android/server/net/NetworkStatsCollectionTest.java
index 830c928..9b4f49c 100644
--- a/tests/net/java/com/android/server/net/NetworkStatsCollectionTest.java
+++ b/tests/net/java/com/android/server/net/NetworkStatsCollectionTest.java
@@ -101,6 +101,7 @@
@After
public void tearDown() throws Exception {
RecurrenceRule.sClock = sOriginalClock;
+ NetworkTemplate.resetForceAllNetworkTypes();
}
private void setClock(Instant instant) {
diff --git a/tests/net/java/com/android/server/net/NetworkStatsServiceTest.java b/tests/net/java/com/android/server/net/NetworkStatsServiceTest.java
index 598448b..bce526d 100644
--- a/tests/net/java/com/android/server/net/NetworkStatsServiceTest.java
+++ b/tests/net/java/com/android/server/net/NetworkStatsServiceTest.java
@@ -19,6 +19,7 @@
import static android.content.Intent.ACTION_UID_REMOVED;
import static android.content.Intent.EXTRA_UID;
import static android.net.ConnectivityManager.TYPE_MOBILE;
+import static android.net.ConnectivityManager.TYPE_VPN;
import static android.net.ConnectivityManager.TYPE_WIFI;
import static android.net.ConnectivityManager.TYPE_WIMAX;
import static android.net.NetworkStats.DEFAULT_NETWORK_ALL;
@@ -41,6 +42,7 @@
import static android.net.NetworkStats.UID_ALL;
import static android.net.NetworkStatsHistory.FIELD_ALL;
import static android.net.NetworkTemplate.buildTemplateMobileAll;
+import static android.net.NetworkTemplate.buildTemplateMobileWildcard;
import static android.net.NetworkTemplate.buildTemplateWifiWildcard;
import static android.net.TrafficStats.MB_IN_BYTES;
import static android.net.TrafficStats.UID_REMOVED;
@@ -132,6 +134,8 @@
private static final String TEST_IFACE = "test0";
private static final String TEST_IFACE2 = "test1";
+ private static final String TUN_IFACE = "test_nss_tun0";
+
private static final long TEST_START = 1194220800000L;
private static final String IMSI_1 = "310004";
@@ -145,10 +149,12 @@
private static final int UID_RED = 1001;
private static final int UID_BLUE = 1002;
private static final int UID_GREEN = 1003;
-
+ private static final int UID_VPN = 1004;
private static final Network WIFI_NETWORK = new Network(100);
private static final Network MOBILE_NETWORK = new Network(101);
+ private static final Network VPN_NETWORK = new Network(102);
+
private static final Network[] NETWORKS_WIFI = new Network[]{ WIFI_NETWORK };
private static final Network[] NETWORKS_MOBILE = new Network[]{ MOBILE_NETWORK };
@@ -914,7 +920,113 @@
assertNetworkTotal(sTemplateImsi1, 2048L, 16L, 512L, 4L, 0);
assertUidTotal(sTemplateImsi1, UID_RED, 128L, 2L, 128L, 2L, 0);
assertUidTotal(sTemplateImsi1, UID_TETHERING, 1920L, 14L, 384L, 2L, 0);
+ }
+ @Test
+ public void vpnWithOneUnderlyingIface() throws Exception {
+ // WiFi network is connected and VPN is using WiFi (which has TEST_IFACE).
+ expectDefaultSettings();
+ NetworkState[] networkStates = new NetworkState[] {buildWifiState(), buildVpnState()};
+ VpnInfo[] vpnInfos = new VpnInfo[] {createVpnInfo(TEST_IFACE)};
+ expectNetworkStatsUidDetail(buildEmptyStats());
+ expectBandwidthControlCheck();
+
+ mService.forceUpdateIfaces(
+ new Network[] {WIFI_NETWORK, VPN_NETWORK},
+ vpnInfos,
+ networkStates,
+ getActiveIface(networkStates));
+ // create some traffic (assume 10 bytes of MTU for VPN interface and 1 byte encryption
+ // overhead per packet):
+ // 1000 bytes (100 packets) were sent/received by UID_RED over VPN.
+ // 500 bytes (50 packets) were sent/received by UID_BLUE over VPN.
+ // VPN sent/received 1650 bytes (150 packets) over WiFi.
+ // Of 1650 bytes over WiFi, expect 1000 bytes attributed to UID_RED, 500 bytes attributed to
+ // UID_BLUE, and 150 bytes attributed to UID_VPN for both rx/tx traffic.
+ incrementCurrentTime(HOUR_IN_MILLIS);
+ expectNetworkStatsUidDetail(new NetworkStats(getElapsedRealtime(), 3)
+ .addValues(TUN_IFACE, UID_RED, SET_DEFAULT, TAG_NONE, 1000L, 100L, 1000L, 100L, 1L)
+ .addValues(TUN_IFACE, UID_BLUE, SET_DEFAULT, TAG_NONE, 500L, 50L, 500L, 50L, 1L)
+ .addValues(
+ TEST_IFACE, UID_VPN, SET_DEFAULT, TAG_NONE, 1650L, 150L, 1650L, 150L, 2L));
+
+ forcePollAndWaitForIdle();
+
+ assertUidTotal(sTemplateWifi, UID_RED, 1000L, 100L, 1000L, 100L, 1);
+ assertUidTotal(sTemplateWifi, UID_BLUE, 500L, 50L, 500L, 50L, 1);
+ assertUidTotal(sTemplateWifi, UID_VPN, 150L, 0L, 150L, 0L, 2);
+ }
+
+ @Test
+ public void vpnWithOneUnderlyingIface_withCompression() throws Exception {
+ // WiFi network is connected and VPN is using WiFi (which has TEST_IFACE).
+ expectDefaultSettings();
+ NetworkState[] networkStates = new NetworkState[] {buildWifiState(), buildVpnState()};
+ VpnInfo[] vpnInfos = new VpnInfo[] {createVpnInfo(TEST_IFACE)};
+ expectNetworkStatsUidDetail(buildEmptyStats());
+ expectBandwidthControlCheck();
+
+ mService.forceUpdateIfaces(
+ new Network[] {WIFI_NETWORK, VPN_NETWORK},
+ vpnInfos,
+ networkStates,
+ getActiveIface(networkStates));
+ // create some traffic (assume 10 bytes of MTU for VPN interface and 1 byte encryption
+ // overhead per packet):
+ // 1000 bytes (100 packets) were sent/received by UID_RED over VPN.
+ // 3000 bytes (300 packets) were sent/received by UID_BLUE over VPN.
+ // VPN sent/received 1000 bytes (100 packets) over WiFi.
+ // Of 1000 bytes over WiFi, expect 250 bytes attributed UID_RED and 750 bytes to UID_BLUE,
+ // with nothing attributed to UID_VPN for both rx/tx traffic.
+ incrementCurrentTime(HOUR_IN_MILLIS);
+ expectNetworkStatsUidDetail(new NetworkStats(getElapsedRealtime(), 3)
+ .addValues(TUN_IFACE, UID_RED, SET_DEFAULT, TAG_NONE, 1000L, 100L, 1000L, 100L, 1L)
+ .addValues(TUN_IFACE, UID_BLUE, SET_DEFAULT, TAG_NONE, 3000L, 300L, 3000L, 300L, 1L)
+ .addValues(
+ TEST_IFACE, UID_VPN, SET_DEFAULT, TAG_NONE, 1000L, 100L, 1000L, 100L, 0L));
+
+ forcePollAndWaitForIdle();
+
+ assertUidTotal(sTemplateWifi, UID_RED, 250L, 25L, 250L, 25L, 0);
+ assertUidTotal(sTemplateWifi, UID_BLUE, 750L, 75L, 750L, 75L, 0);
+ assertUidTotal(sTemplateWifi, UID_VPN, 0L, 0L, 0L, 0L, 0);
+ }
+
+ @Test
+ public void vpnWithIncorrectUnderlyingIface() throws Exception {
+ // WiFi and Cell networks are connected and VPN is using Cell (which has TEST_IFACE2),
+ // but has declared only WiFi (TEST_IFACE) in its underlying network set.
+ expectDefaultSettings();
+ NetworkState[] networkStates =
+ new NetworkState[] {
+ buildWifiState(), buildMobile4gState(TEST_IFACE2), buildVpnState()
+ };
+ VpnInfo[] vpnInfos = new VpnInfo[] {createVpnInfo(TEST_IFACE)};
+ expectNetworkStatsUidDetail(buildEmptyStats());
+ expectBandwidthControlCheck();
+
+ mService.forceUpdateIfaces(
+ new Network[] {WIFI_NETWORK, VPN_NETWORK},
+ vpnInfos,
+ networkStates,
+ getActiveIface(networkStates));
+ // create some traffic (assume 10 bytes of MTU for VPN interface and 1 byte encryption
+ // overhead per packet):
+ // 1000 bytes (100 packets) were sent/received by UID_RED over VPN.
+ // VPN sent/received 1100 bytes (100 packets) over Cell.
+ // Of 1100 bytes over Cell, expect all of it attributed to UID_VPN for both rx/tx traffic.
+ incrementCurrentTime(HOUR_IN_MILLIS);
+ expectNetworkStatsUidDetail(new NetworkStats(getElapsedRealtime(), 2)
+ .addValues(TUN_IFACE, UID_RED, SET_DEFAULT, TAG_NONE, 1000L, 100L, 1000L, 100L, 1L)
+ .addValues(
+ TEST_IFACE2, UID_VPN, SET_DEFAULT, TAG_NONE, 1100L, 100L, 1100L, 100L, 1L));
+
+ forcePollAndWaitForIdle();
+
+ assertUidTotal(sTemplateWifi, UID_RED, 0L, 0L, 0L, 0L, 0);
+ assertUidTotal(sTemplateWifi, UID_VPN, 0L, 0L, 0L, 0L, 0);
+ assertUidTotal(buildTemplateMobileWildcard(), UID_RED, 0L, 0L, 0L, 0L, 0);
+ assertUidTotal(buildTemplateMobileWildcard(), UID_VPN, 1100L, 100L, 1100L, 100L, 1);
}
@Test
@@ -1262,6 +1374,22 @@
return new NetworkStats(getElapsedRealtime(), 0);
}
+ private static NetworkState buildVpnState() {
+ final NetworkInfo info = new NetworkInfo(TYPE_VPN, 0, null, null);
+ info.setDetailedState(DetailedState.CONNECTED, null, null);
+ final LinkProperties prop = new LinkProperties();
+ prop.setInterfaceName(TUN_IFACE);
+ return new NetworkState(info, prop, new NetworkCapabilities(), VPN_NETWORK, null, null);
+ }
+
+ private static VpnInfo createVpnInfo(String underlyingIface) {
+ VpnInfo info = new VpnInfo();
+ info.ownerUid = UID_VPN;
+ info.vpnIface = TUN_IFACE;
+ info.primaryUnderlyingIface = underlyingIface;
+ return info;
+ }
+
private long getElapsedRealtime() {
return mElapsedRealtime;
}
diff --git a/tools/aapt2/Android.bp b/tools/aapt2/Android.bp
index 750fb56..3669890 100644
--- a/tools/aapt2/Android.bp
+++ b/tools/aapt2/Android.bp
@@ -187,3 +187,22 @@
static_libs: ["libaapt2"],
defaults: ["aapt2_defaults"],
}
+
+// ==========================================================
+// Dist the protos
+// ==========================================================
+genrule {
+ name: "aapt2-protos",
+ tools: [":soong_zip"],
+ srcs: [
+ "Configuration.proto",
+ "Resources.proto",
+ ],
+ out: ["aapt2-protos.zip"],
+ cmd: "mkdir $(genDir)/protos && " +
+ "cp $(in) $(genDir)/protos && " +
+ "$(location :soong_zip) -o $(out) -C $(genDir)/protos -D $(genDir)/protos",
+ dist: {
+ targets: ["sdk_repo"],
+ },
+}